Skip to content

Commit 7db36b1

Browse files
committed
Obvious eslint fixes
1 parent 2316d66 commit 7db36b1

File tree

87 files changed

+2162
-2116
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+2162
-2116
lines changed

.editorconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
indent_style = space
8+
indent_size = 2
9+
end_of_line = lf
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true
12+
13+
[*.md]
14+
insert_final_newline = false
15+
trim_trailing_whitespace = false

.eslintignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
*.js.map
33
*.d.ts
44

5-
node_modules
6-
dist
5+
node_modules/
6+
dist/

.eslintrc.js

+40-31
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,44 @@
11
module.exports = {
2-
"env": {
3-
"browser": true,
4-
"es2021": true,
5-
"node": true
2+
env: {
3+
browser: true,
4+
es6: true,
5+
node: true
66
},
7-
"extends": [
8-
"eslint:recommended",
9-
"plugin:@typescript-eslint/recommended"
10-
],
11-
"overrides": [
12-
{
13-
"env": {
14-
"node": true
15-
},
16-
"files": [
17-
".eslintrc.{js,cjs}"
18-
],
19-
"parserOptions": {
20-
"sourceType": "script"
21-
}
22-
}
23-
],
24-
"parser": "@typescript-eslint/parser",
25-
"parserOptions": {
26-
"ecmaVersion": "latest",
27-
"sourceType": "module"
7+
extends: ['@microsoft/eslint-config-msgraph'],
8+
parser: '@typescript-eslint/parser',
9+
parserOptions: {
10+
project: [
11+
'packages/abstractions/tsconfig.json',
12+
'packages/authentication/azure/tsconfig.json',
13+
'packages/authentication/azure/tsconfig.json',
14+
'packages/http/fetch/tsconfig.json',
15+
'packages/serialization/form/tsconfig.json',
16+
'packages/serialization/json/tsconfig.json',
17+
'packages/serialization/multipart/tsconfig.json',
18+
'packages/authentication/azure/tsconfig.json',
19+
'packages/test/tsconfig.json'
20+
],
21+
sourceType: 'module'
2822
},
29-
"plugins": [
30-
"@typescript-eslint"
31-
],
32-
"rules": {
33-
"@typescript-eslint/consistent-type-imports": "error"
23+
plugins: ['eslint-plugin-jsdoc', 'eslint-plugin-prefer-arrow', 'eslint-plugin-react', '@typescript-eslint', 'header'],
24+
root: true,
25+
ignorePatterns: ['.eslintrc.js', '*.mjs'],
26+
rules: {
27+
'@typescript-eslint/no-explicit-any': 'warn',
28+
// prefer-nullish-coalescing requires strictNullChecking to be turned on
29+
'@typescript-eslint/prefer-nullish-coalescing': 'off',
30+
'header/header': [
31+
2,
32+
'block',
33+
[
34+
'*',
35+
' * -------------------------------------------------------------------------------------------',
36+
' * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.',
37+
' * See License in the project root for license information.',
38+
' * -------------------------------------------------------------------------------------------',
39+
' '
40+
],
41+
1
42+
]
3443
}
35-
}
44+
};

0 commit comments

Comments
 (0)