forked from microsoft/vscode-powerquery-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
144 lines (144 loc) · 5.16 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
module.exports = {
root: true,
parser: "@typescript-eslint/parser",
parserOptions: { project: "./tsconfig.json" },
plugins: ["@typescript-eslint", "security", "prettier", "license-header"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"plugin:security/recommended",
],
rules: {
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }],
"@typescript-eslint/typedef": [
"error",
{
arrowParameter: true,
variableDeclaration: true,
variableDeclarationIgnoreFunction: true,
arrayDestructuring: true,
memberVariableDeclaration: true,
objectDestructuring: true,
parameter: true,
propertyDeclaration: true,
},
],
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/consistent-type-assertions": ["warn", { assertionStyle: "as" }],
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/space-infix-ops": "error",
"@typescript-eslint/switch-exhaustiveness-check": "error",
"@typescript-eslint/unified-signatures": "error",
"prettier/prettier": ["error"],
"security/detect-non-literal-fs-filename": "off",
"license-header/header": ["error", "./resources/license-header.js"],
"array-callback-return": "error",
"arrow-body-style": ["error", "as-needed"],
"constructor-super": "error",
"max-len": [
"warn",
{
code: 120,
ignorePattern: "^(?!.*/(/|\\*) .* .*).*$",
},
],
"no-async-promise-executor": "error",
"no-await-in-loop": "error",
"no-class-assign": "error",
"no-compare-neg-zero": "error",
"no-cond-assign": "error",
"no-constant-condition": "error",
"no-dupe-else-if": "error",
"no-dupe-keys": "error",
"no-duplicate-imports": "error",
"no-restricted-globals": "error",
"no-eval": "error",
"no-extra-boolean-cast": "error",
"no-fallthrough": "error",
"no-func-assign": "error",
"no-global-assign": "error",
"no-implicit-coercion": "error",
"no-implicit-globals": "error",
"no-implied-eval": "error",
"no-invalid-this": "error",
"no-irregular-whitespace": "error",
"no-lone-blocks": "error",
"no-lonely-if": "error",
"no-loss-of-precision": "error",
"no-nested-ternary": "error",
"no-self-assign": "error",
"no-self-compare": "error",
"no-sparse-arrays": "error",
"no-this-before-super": "error",
"no-unreachable": "error",
"no-unsafe-optional-chaining": "error",
"no-unused-private-class-members": "error",
"no-useless-backreference": "error",
"no-useless-catch": "error",
"no-useless-computed-key": "error",
"no-useless-concat": "error",
"no-useless-rename": "error",
"no-useless-return": "error",
"object-shorthand": ["error", "always"],
"one-var": ["error", "never"],
"padding-line-between-statements": [
"warn",
{
blankLine: "always",
prev: "*",
next: [
"class",
"do",
"for",
"function",
"if",
"multiline-block-like",
"multiline-const",
"multiline-expression",
"multiline-let",
"multiline-var",
"switch",
"try",
"while",
],
},
{
blankLine: "always",
prev: [
"class",
"do",
"for",
"function",
"if",
"multiline-block-like",
"multiline-const",
"multiline-expression",
"multiline-let",
"multiline-var",
"switch",
"try",
"while",
],
next: "*",
},
{
blankLine: "always",
prev: "*",
next: ["continue", "return"],
},
],
"prefer-template": "error",
"require-atomic-updates": "error",
"require-await": "warn",
"security/detect-object-injection": "off",
"spaced-comment": ["warn", "always"],
"sort-imports": ["error", { allowSeparatedGroups: true, ignoreCase: true }],
"valid-typeof": "error",
},
};