Skip to content

Commit 949240f

Browse files
committed
Updated dependencies
- Simplified eslint configs - Replaced ts-node with tsx
1 parent a610bac commit 949240f

18 files changed

Lines changed: 1481 additions & 1277 deletions

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[*]
2+
indent_style = space
3+
indent_size = 2
4+
insert_final_newline = true

.vscode/settings.json

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
{
2-
"cSpell.ignoreWords": [
3-
"graphtutorial",
4-
"odata"
5-
],
6-
"cSpell.words": [
7-
"graphapponlytutorial"
8-
]
2+
"cSpell.ignoreWords": [
3+
"graphapponlytutorial",
4+
"graphtutorial",
5+
"odata"
6+
],
7+
"cSpell.overrides": [
8+
{
9+
"filename": "package.json",
10+
"ignoreWords": [
11+
"ganchev"
12+
]
13+
}
14+
]
915
}

app-auth/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# How to run the completed project
22

3+
<!-- markdownlint-disable MD060 -->
4+
35
## Prerequisites
46

57
To run the completed project in this folder, you need the following:
@@ -81,5 +83,5 @@ In your command-line interface (CLI), navigate to the project directory and run
8183
8284
```Shell
8385
npm install
84-
npx ts-node index.ts
86+
npm start
8587
```
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT license.
3+
4+
// cSpell:ignore ganchev
5+
6+
import { defineConfig } from 'eslint/config';
7+
8+
import tseslint from 'typescript-eslint';
9+
import eslintPrettierRecommended from 'eslint-plugin-prettier/recommended';
10+
import header from '@tony.ganchev/eslint-plugin-header';
11+
12+
export default defineConfig(
13+
{
14+
ignores: ['**/dist'],
15+
},
16+
tseslint.configs.recommended,
17+
eslintPrettierRecommended,
18+
{
19+
files: ['**/**.{ts,js}'],
20+
21+
languageOptions: {
22+
parser: tseslint.parser,
23+
ecmaVersion: 6,
24+
sourceType: 'module',
25+
},
26+
27+
plugins: {
28+
header,
29+
'@typescript-eslint': tseslint.plugin,
30+
},
31+
32+
rules: {
33+
'no-unused-vars': 'off',
34+
'@typescript-eslint/no-unused-vars': [
35+
'error',
36+
{
37+
args: 'all',
38+
argsIgnorePattern: '^_',
39+
caughtErrors: 'all',
40+
caughtErrorsIgnorePattern: '^_',
41+
destructuredArrayIgnorePattern: '^_',
42+
varsIgnorePattern: '^_',
43+
},
44+
],
45+
'header/header': [
46+
'error',
47+
'line',
48+
[
49+
' Copyright (c) Microsoft Corporation.',
50+
' Licensed under the MIT license.',
51+
],
52+
2,
53+
],
54+
'prettier/prettier': [
55+
'error',
56+
{
57+
singleQuote: true,
58+
jsxSingleQuote: true,
59+
endOfLine: 'auto',
60+
printWidth: 80,
61+
},
62+
],
63+
},
64+
},
65+
);

app-auth/graphapponlytutorial/eslint.config.mjs

Lines changed: 0 additions & 55 deletions
This file was deleted.

app-auth/graphapponlytutorial/graphHelper.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import { ClientSecretCredential } from '@azure/identity';
77
import { Client, PageCollection } from '@microsoft/microsoft-graph-client';
88
// prettier-ignore
99
import { TokenCredentialAuthenticationProvider } from
10-
'@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials';
10+
'@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials/index.js';
1111

12-
import { AppSettings } from './appSettings';
12+
import { AppSettings } from './appSettings.js';
1313

1414
let _settings: AppSettings | undefined = undefined;
1515
let _clientSecretCredential: ClientSecretCredential | undefined = undefined;

app-auth/graphapponlytutorial/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
import * as readline from 'readline-sync';
66
import { User } from '@microsoft/microsoft-graph-types';
77

8-
import settings, { AppSettings } from './appSettings';
9-
import * as graphHelper from './graphHelper';
8+
import settings, { AppSettings } from './appSettings.js';
9+
import * as graphHelper from './graphHelper.js';
1010

1111
async function main() {
1212
console.log('TypeScript Graph Tutorial');

0 commit comments

Comments
 (0)