@commission-on-post/eslint-config-recommended 0.8.3 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/config.js +148 -0
- package/package.json +16 -15
- package/.eslintrc.js +0 -1099
- package/index.js +0 -3
package/README.md
CHANGED
|
@@ -32,10 +32,10 @@ $ npm install @commission-on-post/eslint-config-recommended -D
|
|
|
32
32
|
### Peer Dependencies
|
|
33
33
|
| Package | Version |
|
|
34
34
|
|---------|---------|
|
|
35
|
-
| @typescript-eslint/eslint-plugin | >=
|
|
36
|
-
| @typescript-eslint/parser | >=
|
|
37
|
-
| eslint | >=
|
|
38
|
-
| typescript | >=5.
|
|
35
|
+
| @typescript-eslint/eslint-plugin | >=8.18.0 |
|
|
36
|
+
| @typescript-eslint/parser | >=8.18.0 |
|
|
37
|
+
| eslint | >=9.16.0 |
|
|
38
|
+
| typescript | >=5.7.2 |
|
|
39
39
|
---
|
|
40
40
|
### Workspace Setup
|
|
41
41
|
#### Suggested VS Code Extensions
|
package/config.js
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
languageOptions: {
|
|
3
|
+
parserOptions: {
|
|
4
|
+
projectService: true,
|
|
5
|
+
tsconfigRootDir: import.meta.dirname,
|
|
6
|
+
},
|
|
7
|
+
},
|
|
8
|
+
ignores: ["*/*.mjs"],
|
|
9
|
+
rules: {
|
|
10
|
+
"@typescript-eslint/adjacent-overload-signatures": "error",
|
|
11
|
+
"@typescript-eslint/consistent-generic-constructors": ["error", "type-annotation"],
|
|
12
|
+
"@typescript-eslint/explicit-function-return-type": "error",
|
|
13
|
+
"@typescript-eslint/explicit-module-boundary-types": "error",
|
|
14
|
+
|
|
15
|
+
"@typescript-eslint/naming-convention": ["warn", {
|
|
16
|
+
selector: ["classProperty", "objectLiteralProperty", "parameter", "variable"],
|
|
17
|
+
format: ["camelCase", "snake_case"],
|
|
18
|
+
leadingUnderscore: "allow",
|
|
19
|
+
}, {
|
|
20
|
+
selector: ["classMethod", "function", "typeMethod"],
|
|
21
|
+
format: ["camelCase"],
|
|
22
|
+
leadingUnderscore: "allow",
|
|
23
|
+
}, {
|
|
24
|
+
selector: ["interface", "class"],
|
|
25
|
+
format: ["PascalCase"],
|
|
26
|
+
}, {
|
|
27
|
+
selector: ["class"],
|
|
28
|
+
format: ["PascalCase", "camelCase"],
|
|
29
|
+
}],
|
|
30
|
+
|
|
31
|
+
"@typescript-eslint/no-confusing-non-null-assertion": "error",
|
|
32
|
+
"@typescript-eslint/no-confusing-void-expression": "error",
|
|
33
|
+
"@typescript-eslint/no-dynamic-delete": "error",
|
|
34
|
+
"no-empty-function": "off",
|
|
35
|
+
"@typescript-eslint/no-empty-function": "warn",
|
|
36
|
+
"@typescript-eslint/no-empty-interface": "error",
|
|
37
|
+
"@typescript-eslint/no-inferrable-types": "error",
|
|
38
|
+
"no-invalid-this": "off",
|
|
39
|
+
"@typescript-eslint/no-invalid-this": "error",
|
|
40
|
+
"@typescript-eslint/no-invalid-void-type": "error",
|
|
41
|
+
|
|
42
|
+
"@typescript-eslint/no-misused-promises": ["error", {
|
|
43
|
+
checksVoidReturn: false,
|
|
44
|
+
}],
|
|
45
|
+
|
|
46
|
+
"@typescript-eslint/no-mixed-enums": "error",
|
|
47
|
+
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": "error",
|
|
48
|
+
"@typescript-eslint/no-require-imports": "error",
|
|
49
|
+
"no-shadow": "off",
|
|
50
|
+
"@typescript-eslint/no-shadow": "error",
|
|
51
|
+
"@typescript-eslint/no-unnecessary-condition": "error",
|
|
52
|
+
"@typescript-eslint/no-unsafe-argument": "off",
|
|
53
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
54
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
55
|
+
"@typescript-eslint/no-unsafe-member-access": "off",
|
|
56
|
+
"no-unused-expressions": "off",
|
|
57
|
+
"@typescript-eslint/no-unused-expressions": "error",
|
|
58
|
+
"no-unused-vars": "warn",
|
|
59
|
+
"@typescript-eslint/no-unused-vars": "warn",
|
|
60
|
+
"no-use-before-define": "off",
|
|
61
|
+
"@typescript-eslint/no-use-before-define": "warn",
|
|
62
|
+
"@typescript-eslint/no-useless-constructor": "error",
|
|
63
|
+
"@typescript-eslint/no-useless-empty-export": "error",
|
|
64
|
+
"@typescript-eslint/non-nullable-type-assertion-style": "error",
|
|
65
|
+
"@typescript-eslint/parameter-properties": "error",
|
|
66
|
+
"@typescript-eslint/prefer-for-of": "warn",
|
|
67
|
+
"@typescript-eslint/prefer-function-type": "error",
|
|
68
|
+
"@typescript-eslint/prefer-includes": "error",
|
|
69
|
+
"@typescript-eslint/prefer-optional-chain": "error",
|
|
70
|
+
"@typescript-eslint/prefer-readonly": "error",
|
|
71
|
+
"@typescript-eslint/prefer-reduce-type-parameter": "error",
|
|
72
|
+
"@typescript-eslint/prefer-string-starts-ends-with": "error",
|
|
73
|
+
"@typescript-eslint/promise-function-async": "error",
|
|
74
|
+
"@typescript-eslint/require-array-sort-compare": "warn",
|
|
75
|
+
"@typescript-eslint/switch-exhaustiveness-check": "error",
|
|
76
|
+
"@typescript-eslint/unified-signatures": "error",
|
|
77
|
+
"array-callback-return": "warn",
|
|
78
|
+
"no-const-assign": "warn",
|
|
79
|
+
"no-constant-binary-expression": "error",
|
|
80
|
+
"no-debugger": "warn",
|
|
81
|
+
"no-fallthrough": "warn",
|
|
82
|
+
|
|
83
|
+
"no-irregular-whitespace": ["error", {
|
|
84
|
+
skipStrings: true,
|
|
85
|
+
skipTemplates: true,
|
|
86
|
+
skipJSXText: true,
|
|
87
|
+
}],
|
|
88
|
+
|
|
89
|
+
"no-new-native-nonconstructor": "error",
|
|
90
|
+
"no-promise-executor-return": "warn",
|
|
91
|
+
"no-self-compare": "warn",
|
|
92
|
+
"no-sparse-arrays": "warn",
|
|
93
|
+
"no-template-curly-in-string": "off",
|
|
94
|
+
"no-unreachable-loop": "error",
|
|
95
|
+
"no-unsafe-negation": "warn",
|
|
96
|
+
"no-unused-private-class-members": "warn",
|
|
97
|
+
"require-atomic-updates": "warn",
|
|
98
|
+
"block-scoped-var": "warn",
|
|
99
|
+
"capitalized-comments": "error",
|
|
100
|
+
"class-methods-use-this": "warn",
|
|
101
|
+
complexity: "warn",
|
|
102
|
+
"default-case": "error",
|
|
103
|
+
"default-case-last": "warn",
|
|
104
|
+
eqeqeq: "error",
|
|
105
|
+
|
|
106
|
+
"max-depth": ["warn", {
|
|
107
|
+
max: 5,
|
|
108
|
+
}],
|
|
109
|
+
|
|
110
|
+
"max-params": ["warn", {
|
|
111
|
+
max: 4,
|
|
112
|
+
}],
|
|
113
|
+
|
|
114
|
+
"no-alert": "warn",
|
|
115
|
+
"no-caller": "error",
|
|
116
|
+
"no-case-declarations": "warn",
|
|
117
|
+
"no-console": "warn",
|
|
118
|
+
"no-div-regex": "warn",
|
|
119
|
+
"no-else-return": "error",
|
|
120
|
+
"no-empty": "warn",
|
|
121
|
+
"no-empty-static-block": "warn",
|
|
122
|
+
"no-extra-label": "error",
|
|
123
|
+
"no-global-assign": "error",
|
|
124
|
+
"no-implied-eval": "error",
|
|
125
|
+
"no-label-var": "error",
|
|
126
|
+
"no-lone-blocks": "warn",
|
|
127
|
+
"no-lonely-if": "error",
|
|
128
|
+
"no-multi-str": "warn",
|
|
129
|
+
"no-return-assign": "error",
|
|
130
|
+
"no-sequences": "error",
|
|
131
|
+
"no-undef-init": "error",
|
|
132
|
+
"no-undefined": "warn",
|
|
133
|
+
"no-unneeded-ternary": "error",
|
|
134
|
+
"no-useless-call": "warn",
|
|
135
|
+
"no-useless-computed-key": "error",
|
|
136
|
+
"no-useless-rename": "error",
|
|
137
|
+
"no-useless-return": "error",
|
|
138
|
+
"no-var": "error",
|
|
139
|
+
"object-shorthand": "error",
|
|
140
|
+
"prefer-arrow-callback": "error",
|
|
141
|
+
"prefer-const": "warn",
|
|
142
|
+
"prefer-exponentiation-operator": "error",
|
|
143
|
+
"prefer-numeric-literals": "error",
|
|
144
|
+
"prefer-object-has-own": "error",
|
|
145
|
+
"prefer-object-spread": "error",
|
|
146
|
+
"require-unicode-regexp": "warn",
|
|
147
|
+
}
|
|
148
|
+
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commission-on-post/eslint-config-recommended",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "ESLint config using recommended state practices for the Commission on POST",
|
|
5
|
-
"main": "
|
|
5
|
+
"main": "./config.js",
|
|
6
6
|
"author": "Ryan W. Bell",
|
|
7
7
|
"license": "UNLICENSED",
|
|
8
|
+
"type": "module",
|
|
8
9
|
"repository": {
|
|
9
10
|
"type": "git",
|
|
10
11
|
"url": "git+https://github.com/Commission-on-POST/eslint_recommended_style.git"
|
|
11
12
|
},
|
|
12
13
|
"homepage": "https://github.com/Commission-on-POST/eslint_recommended_style#readme",
|
|
13
14
|
"scripts": {
|
|
15
|
+
"repack": "(del *.tgz 2> NUL || exit 0) && npm pack",
|
|
16
|
+
"build": "tsc --pretty && echo REMEMBER TO COPY ./eslint.config.mjs TO DIST FOLDER",
|
|
17
|
+
"prepublishOnly": "npm version patch",
|
|
14
18
|
"start": "node ."
|
|
15
19
|
},
|
|
16
20
|
"keywords": [
|
|
@@ -20,19 +24,16 @@
|
|
|
20
24
|
"tslint",
|
|
21
25
|
"recommended"
|
|
22
26
|
],
|
|
23
|
-
"peerDependencies": {
|
|
24
|
-
"@typescript-eslint/eslint-plugin": ">=6.2.1",
|
|
25
|
-
"@typescript-eslint/parser": ">=6.2.1",
|
|
26
|
-
"eslint-import-resolver-typescript": ">=3.5.5",
|
|
27
|
-
"eslint": ">=8.46.0",
|
|
28
|
-
"typescript": ">=5.1.6"
|
|
29
|
-
},
|
|
30
27
|
"devDependencies": {
|
|
31
|
-
"@
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"eslint
|
|
35
|
-
|
|
36
|
-
|
|
28
|
+
"@eslint/js": "^9.17.0",
|
|
29
|
+
"eslint": "^9.17.0",
|
|
30
|
+
"typescript": "^5.7.2",
|
|
31
|
+
"typescript-eslint": "^8.19.0"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"@eslint/js": ">= 9.17.0",
|
|
35
|
+
"eslint": ">= 9.17.0",
|
|
36
|
+
"typescript": ">= 5.7.2",
|
|
37
|
+
"typescript-eslint": ">= 8.19.0"
|
|
37
38
|
}
|
|
38
39
|
}
|
package/.eslintrc.js
DELETED
|
@@ -1,1099 +0,0 @@
|
|
|
1
|
-
module.exports = {
|
|
2
|
-
parser: "@typescript-eslint/parser",
|
|
3
|
-
parserOptions: {
|
|
4
|
-
"project": "./tsconfig.json"
|
|
5
|
-
},
|
|
6
|
-
extends: [
|
|
7
|
-
"eslint:recommended",
|
|
8
|
-
"plugin:import/recommended",
|
|
9
|
-
"plugin:import/typescript",
|
|
10
|
-
"plugin:@typescript-eslint/recommended",
|
|
11
|
-
"plugin:@typescript-eslint/recommended-requiring-type-checking"
|
|
12
|
-
],
|
|
13
|
-
plugins: [
|
|
14
|
-
"@typescript-eslint",
|
|
15
|
-
"import"
|
|
16
|
-
],
|
|
17
|
-
rules: {
|
|
18
|
-
/*
|
|
19
|
-
* ESLint provides rules, but it doesn't support TypeScript syntax; it may crash, ignores the syntax, or falsely report against the rule.
|
|
20
|
-
* For these cases, typescript-eslint creates extension rules; rules within the plugin that has the same functionality, but also supports TypeScript.
|
|
21
|
-
*/
|
|
22
|
-
"@typescript-eslint/brace-style": [
|
|
23
|
-
"warn",
|
|
24
|
-
"1tbs",
|
|
25
|
-
{
|
|
26
|
-
"allowSingleLine": false
|
|
27
|
-
}
|
|
28
|
-
],
|
|
29
|
-
"@typescript-eslint/comma-dangle": [
|
|
30
|
-
"warn",
|
|
31
|
-
"never"
|
|
32
|
-
],
|
|
33
|
-
"@typescript-eslint/comma-spacing": [
|
|
34
|
-
"warn",
|
|
35
|
-
{
|
|
36
|
-
"after": true,
|
|
37
|
-
"before": false
|
|
38
|
-
}
|
|
39
|
-
],
|
|
40
|
-
"@typescript-eslint/default-param-last": [
|
|
41
|
-
"error"
|
|
42
|
-
],
|
|
43
|
-
"@typescript-eslint/dot-notation": [
|
|
44
|
-
"off"
|
|
45
|
-
// This was turned off because .catch was being transformed to ["catch"]
|
|
46
|
-
// "warn",
|
|
47
|
-
// {
|
|
48
|
-
// "allowIndexSignaturePropertyAccess": true,
|
|
49
|
-
// "allowKeywords": false,
|
|
50
|
-
// "allowPrivateClassPropertyAccess": false,
|
|
51
|
-
// "allowProtectedClassPropertyAccess": false
|
|
52
|
-
// }
|
|
53
|
-
],
|
|
54
|
-
"@typescript-eslint/func-call-spacing": [
|
|
55
|
-
"warn",
|
|
56
|
-
"never"
|
|
57
|
-
],
|
|
58
|
-
"@typescript-eslint/indent": [
|
|
59
|
-
"warn",
|
|
60
|
-
4
|
|
61
|
-
],
|
|
62
|
-
"@typescript-eslint/init-declarations": [
|
|
63
|
-
"error",
|
|
64
|
-
"always"
|
|
65
|
-
],
|
|
66
|
-
"@typescript-eslint/no-unsafe-argument": [
|
|
67
|
-
"off" // Unfortunately working with JS APIs necessitates working with functions that accept an any type
|
|
68
|
-
],
|
|
69
|
-
"@typescript-eslint/no-unsafe-call": [
|
|
70
|
-
"off" // Unfortunately working with JS APIs necessitates working with functions that accept an any type
|
|
71
|
-
],
|
|
72
|
-
"@typescript-eslint/no-unsafe-member-access": [
|
|
73
|
-
"off" // Unfortunately working with JS APIs necessitates working with functions that accept an any type
|
|
74
|
-
],
|
|
75
|
-
"@typescript-eslint/no-unsafe-assignment": [
|
|
76
|
-
"off" // Unfortunately working with JS APIs necessitates working with functions that accept an any type
|
|
77
|
-
],
|
|
78
|
-
"@typescript-eslint/keyword-spacing": [
|
|
79
|
-
"warn",
|
|
80
|
-
{
|
|
81
|
-
"overrides": {
|
|
82
|
-
"from": { "before": true, "after": true },
|
|
83
|
-
"as": { "before": true, "after": true }
|
|
84
|
-
// { keyword: {before: <boolean>, after: <boolean>}}
|
|
85
|
-
// "abstract", "as", "async", "await", "boolean", "break", "byte", "case", "catch", "char",
|
|
86
|
-
// "class", "const", "continue", "debugger", "default", "delete", "do", "double", "else", "enum",
|
|
87
|
-
// "export", "extends", "false", "final", "finally", "float", "for", "from", "function", "get",
|
|
88
|
-
// "goto", "if", "implements", "import", "in", "instanceof", "int", "interface", "let", "long",
|
|
89
|
-
// "native", "new", "null", "of", "package", "private", "protected", "public", "return", "set",
|
|
90
|
-
// "short", "static", "super", "switch", "synchronized", "this", "throw", "throws", "transient",
|
|
91
|
-
// "true", "try", "typeof", "var", "void", "volatile", "while", "with", "yield"
|
|
92
|
-
},
|
|
93
|
-
"after": true,
|
|
94
|
-
"before": false
|
|
95
|
-
}
|
|
96
|
-
],
|
|
97
|
-
"@typescript-eslint/lines-between-class-members": [
|
|
98
|
-
"warn",
|
|
99
|
-
"always",
|
|
100
|
-
{
|
|
101
|
-
"exceptAfterSingleLine": true
|
|
102
|
-
}
|
|
103
|
-
],
|
|
104
|
-
"@typescript-eslint/no-array-constructor": [
|
|
105
|
-
"warn"
|
|
106
|
-
],
|
|
107
|
-
"@typescript-eslint/no-dupe-class-members": [
|
|
108
|
-
"error"
|
|
109
|
-
],
|
|
110
|
-
"import/no-duplicates": [
|
|
111
|
-
"warn",
|
|
112
|
-
{
|
|
113
|
-
"prefer-inline": true
|
|
114
|
-
}
|
|
115
|
-
],
|
|
116
|
-
"import/no-named-as-default": [
|
|
117
|
-
"off"
|
|
118
|
-
],
|
|
119
|
-
"@typescript-eslint/no-empty-function": [
|
|
120
|
-
"warn",
|
|
121
|
-
{
|
|
122
|
-
"allow": [
|
|
123
|
-
"arrowFunctions",
|
|
124
|
-
"generatorFunctions",
|
|
125
|
-
"generatorMethods",
|
|
126
|
-
"constructors",
|
|
127
|
-
"asyncMethods"
|
|
128
|
-
]
|
|
129
|
-
}
|
|
130
|
-
],
|
|
131
|
-
"@typescript-eslint/no-extra-parens": [
|
|
132
|
-
"off"
|
|
133
|
-
],
|
|
134
|
-
"@typescript-eslint/no-extra-semi": [
|
|
135
|
-
"warn"
|
|
136
|
-
],
|
|
137
|
-
"@typescript-eslint/no-implied-eval": [
|
|
138
|
-
"error"
|
|
139
|
-
],
|
|
140
|
-
"@typescript-eslint/no-inferrable-types": [
|
|
141
|
-
"off"
|
|
142
|
-
],
|
|
143
|
-
"@typescript-eslint/no-invalid-this": [
|
|
144
|
-
"error"
|
|
145
|
-
],
|
|
146
|
-
"@typescript-eslint/no-loop-func": [
|
|
147
|
-
"error"
|
|
148
|
-
],
|
|
149
|
-
"@typescript-eslint/no-loss-of-precision": [
|
|
150
|
-
"error"
|
|
151
|
-
],
|
|
152
|
-
"@typescript-eslint/unbound-method":[
|
|
153
|
-
"off"
|
|
154
|
-
],
|
|
155
|
-
"@typescript-eslint/no-magic-numbers": [
|
|
156
|
-
"warn",
|
|
157
|
-
{
|
|
158
|
-
"ignore": [
|
|
159
|
-
-1,
|
|
160
|
-
0,
|
|
161
|
-
1,
|
|
162
|
-
2,
|
|
163
|
-
69,
|
|
164
|
-
420
|
|
165
|
-
]
|
|
166
|
-
}
|
|
167
|
-
],
|
|
168
|
-
"@typescript-eslint/no-redeclare": [
|
|
169
|
-
"error",
|
|
170
|
-
{
|
|
171
|
-
"builtinGlobals": true,
|
|
172
|
-
"ignoreDeclarationMerge": true
|
|
173
|
-
}
|
|
174
|
-
],
|
|
175
|
-
"@typescript-eslint/no-restricted-imports": [
|
|
176
|
-
"off"
|
|
177
|
-
],
|
|
178
|
-
"@typescript-eslint/no-shadow": [
|
|
179
|
-
"warn" // This rule might cause some issues, feel free to disable
|
|
180
|
-
],
|
|
181
|
-
"@typescript-eslint/no-throw-literal": [
|
|
182
|
-
"warn"
|
|
183
|
-
],
|
|
184
|
-
"@typescript-eslint/no-unused-expressions": [
|
|
185
|
-
"warn"
|
|
186
|
-
],
|
|
187
|
-
"@typescript-eslint/no-unused-vars": [
|
|
188
|
-
"warn",
|
|
189
|
-
{
|
|
190
|
-
//"varsIgnorePattern": ,
|
|
191
|
-
"args": "none", // With restful request chains this rule gets a bit verbose when set to anything else
|
|
192
|
-
//"argsIgnorePattern": ,
|
|
193
|
-
"caughtErrors": "none",
|
|
194
|
-
//"caughtErrorsIgnorePattern":
|
|
195
|
-
"vars": "all", //. You can use the /* exported variableName */ comment block to indicate that this variable is being exported and therefore should not be considered unused.
|
|
196
|
-
"ignoreRestSiblings": false
|
|
197
|
-
}
|
|
198
|
-
],
|
|
199
|
-
"@typescript-eslint/no-use-before-define": [
|
|
200
|
-
"error",
|
|
201
|
-
{
|
|
202
|
-
"classes": false,
|
|
203
|
-
"enums": true,
|
|
204
|
-
"functions": false,
|
|
205
|
-
"ignoreTypeReferences": true,
|
|
206
|
-
"typedefs": true,
|
|
207
|
-
"variables": true
|
|
208
|
-
}
|
|
209
|
-
],
|
|
210
|
-
"@typescript-eslint/no-useless-constructor": [
|
|
211
|
-
"off"
|
|
212
|
-
],
|
|
213
|
-
"@typescript-eslint/object-curly-spacing": [
|
|
214
|
-
"warn",
|
|
215
|
-
"always"
|
|
216
|
-
],
|
|
217
|
-
"@typescript-eslint/padding-line-between-statements": [
|
|
218
|
-
"off" // If inconsistent spacing between functions, returns, or class members starts to become an issue consider revisiting.
|
|
219
|
-
],
|
|
220
|
-
"@typescript-eslint/quotes": [
|
|
221
|
-
"warn",
|
|
222
|
-
"double"
|
|
223
|
-
],
|
|
224
|
-
"@typescript-eslint/require-await": [
|
|
225
|
-
"error"
|
|
226
|
-
],
|
|
227
|
-
"@typescript-eslint/return-await": [
|
|
228
|
-
"off"
|
|
229
|
-
],
|
|
230
|
-
"@typescript-eslint/semi": [
|
|
231
|
-
"warn",
|
|
232
|
-
"always"
|
|
233
|
-
],
|
|
234
|
-
"@typescript-eslint/space-before-function-paren": [
|
|
235
|
-
"warn",
|
|
236
|
-
{
|
|
237
|
-
"anonymous": "never",
|
|
238
|
-
"asyncArrow": "always",
|
|
239
|
-
"named": "never"
|
|
240
|
-
}
|
|
241
|
-
],
|
|
242
|
-
"@typescript-eslint/space-infix-ops": [
|
|
243
|
-
"warn",
|
|
244
|
-
{
|
|
245
|
-
"int32Hint": true
|
|
246
|
-
}
|
|
247
|
-
],
|
|
248
|
-
"array-bracket-newline": [
|
|
249
|
-
"warn",
|
|
250
|
-
"consistent"
|
|
251
|
-
],
|
|
252
|
-
"array-bracket-spacing": [
|
|
253
|
-
"warn",
|
|
254
|
-
"always",
|
|
255
|
-
{
|
|
256
|
-
"arraysInArrays": false,
|
|
257
|
-
"objectsInArrays": true,
|
|
258
|
-
"singleValue": false
|
|
259
|
-
}
|
|
260
|
-
],
|
|
261
|
-
"arrow-body-style": [
|
|
262
|
-
"warn",
|
|
263
|
-
"as-needed"
|
|
264
|
-
],
|
|
265
|
-
"arrow-parens": [
|
|
266
|
-
"warn",
|
|
267
|
-
"always"
|
|
268
|
-
],
|
|
269
|
-
"arrow-spacing": [
|
|
270
|
-
"warn",
|
|
271
|
-
{
|
|
272
|
-
"after": true,
|
|
273
|
-
"before": true
|
|
274
|
-
}
|
|
275
|
-
],
|
|
276
|
-
"block-spacing": [
|
|
277
|
-
"warn",
|
|
278
|
-
"always"
|
|
279
|
-
],
|
|
280
|
-
"camelcase": [
|
|
281
|
-
"warn",
|
|
282
|
-
{
|
|
283
|
-
"properties": "always",
|
|
284
|
-
"ignoreDestructuring": false, // You may need to change this if importing from a third part library and using the spread operator.
|
|
285
|
-
"ignoreGlobals": true,
|
|
286
|
-
"ignoreImports": false // You may need to disable this if convention dictates importing as non-camelcase
|
|
287
|
-
}
|
|
288
|
-
],
|
|
289
|
-
"comma-style": [
|
|
290
|
-
"warn",
|
|
291
|
-
"last"
|
|
292
|
-
],
|
|
293
|
-
"complexity": [
|
|
294
|
-
"error",
|
|
295
|
-
15
|
|
296
|
-
],
|
|
297
|
-
"computed-property-spacing": [
|
|
298
|
-
"warn",
|
|
299
|
-
"always"
|
|
300
|
-
],
|
|
301
|
-
"curly": [
|
|
302
|
-
"warn",
|
|
303
|
-
"all"
|
|
304
|
-
],
|
|
305
|
-
"default-case": [
|
|
306
|
-
"warn"
|
|
307
|
-
],
|
|
308
|
-
"default-case-last": [
|
|
309
|
-
"error"
|
|
310
|
-
],
|
|
311
|
-
"dot-location": [
|
|
312
|
-
"warn",
|
|
313
|
-
"property"
|
|
314
|
-
],
|
|
315
|
-
"eol-last": [
|
|
316
|
-
"warn",
|
|
317
|
-
"always"
|
|
318
|
-
],
|
|
319
|
-
"eqeqeq": [
|
|
320
|
-
"warn",
|
|
321
|
-
"always"
|
|
322
|
-
],
|
|
323
|
-
"func-style": [
|
|
324
|
-
"error",
|
|
325
|
-
"declaration",
|
|
326
|
-
{
|
|
327
|
-
"allowArrowFunctions": true
|
|
328
|
-
}
|
|
329
|
-
],
|
|
330
|
-
"function-call-argument-newline": [
|
|
331
|
-
"warn",
|
|
332
|
-
"consistent"
|
|
333
|
-
],
|
|
334
|
-
"function-paren-newline": [
|
|
335
|
-
"warn",
|
|
336
|
-
"multiline"
|
|
337
|
-
],
|
|
338
|
-
"generator-star-spacing": [
|
|
339
|
-
"warn",
|
|
340
|
-
{
|
|
341
|
-
"after": true,
|
|
342
|
-
"before": true
|
|
343
|
-
}
|
|
344
|
-
],
|
|
345
|
-
"implicit-arrow-linebreak": [
|
|
346
|
-
"warn",
|
|
347
|
-
"beside"
|
|
348
|
-
],
|
|
349
|
-
"jsx-quotes": [
|
|
350
|
-
"warn",
|
|
351
|
-
"prefer-double"
|
|
352
|
-
],
|
|
353
|
-
"key-spacing": [
|
|
354
|
-
"warn",
|
|
355
|
-
{
|
|
356
|
-
"align": "colon", // This may become obnoxious consider other settings before removing
|
|
357
|
-
"mode": "minimum",
|
|
358
|
-
"afterColon": true,
|
|
359
|
-
"beforeColon": false
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
],
|
|
363
|
-
"linebreak-style": [
|
|
364
|
-
"warn",
|
|
365
|
-
"windows"
|
|
366
|
-
],
|
|
367
|
-
"max-classes-per-file": [
|
|
368
|
-
"warn",
|
|
369
|
-
1
|
|
370
|
-
],
|
|
371
|
-
"max-len": [
|
|
372
|
-
"warn",
|
|
373
|
-
{
|
|
374
|
-
"code": 160,
|
|
375
|
-
"tabWidth": 4,
|
|
376
|
-
"ignoreComments": true,
|
|
377
|
-
"ignoreRegExpLiterals": true,
|
|
378
|
-
"ignoreStrings": true,
|
|
379
|
-
"ignoreTemplateLiterals": true,
|
|
380
|
-
"ignoreTrailingComments": true,
|
|
381
|
-
"ignoreUrls": true
|
|
382
|
-
}
|
|
383
|
-
],
|
|
384
|
-
"max-nested-callbacks": [
|
|
385
|
-
"warn",
|
|
386
|
-
8
|
|
387
|
-
],
|
|
388
|
-
"max-statements-per-line": [
|
|
389
|
-
"warn",
|
|
390
|
-
{
|
|
391
|
-
"max": 1
|
|
392
|
-
}
|
|
393
|
-
],
|
|
394
|
-
"multiline-ternary": [
|
|
395
|
-
"error",
|
|
396
|
-
"always-multiline"
|
|
397
|
-
],
|
|
398
|
-
"new-parens": [
|
|
399
|
-
"error",
|
|
400
|
-
"always"
|
|
401
|
-
],
|
|
402
|
-
"newline-per-chained-call": [
|
|
403
|
-
"error",
|
|
404
|
-
{
|
|
405
|
-
"ignoreChainWithDepth": 3
|
|
406
|
-
}
|
|
407
|
-
],
|
|
408
|
-
"no-alert": [
|
|
409
|
-
"warn"
|
|
410
|
-
],
|
|
411
|
-
"no-caller": [
|
|
412
|
-
"error"
|
|
413
|
-
],
|
|
414
|
-
"no-confusing-arrow": [
|
|
415
|
-
"error",
|
|
416
|
-
{
|
|
417
|
-
"allowParens": true
|
|
418
|
-
}
|
|
419
|
-
],
|
|
420
|
-
"no-console": [
|
|
421
|
-
"warn"
|
|
422
|
-
],
|
|
423
|
-
"no-continue": [
|
|
424
|
-
"error"
|
|
425
|
-
],
|
|
426
|
-
"no-else-return": [
|
|
427
|
-
"warn",
|
|
428
|
-
{
|
|
429
|
-
"allowElseIf": true
|
|
430
|
-
}
|
|
431
|
-
],
|
|
432
|
-
"no-empty": [
|
|
433
|
-
"warn",
|
|
434
|
-
{
|
|
435
|
-
"allowEmptyCatch": true
|
|
436
|
-
}
|
|
437
|
-
],
|
|
438
|
-
"no-eval": [
|
|
439
|
-
"error"
|
|
440
|
-
],
|
|
441
|
-
"no-extend-native": [
|
|
442
|
-
"error"
|
|
443
|
-
],
|
|
444
|
-
"no-extra-boolean-cast": [
|
|
445
|
-
"warn"
|
|
446
|
-
],
|
|
447
|
-
"no-floating-decimal": [
|
|
448
|
-
"error"
|
|
449
|
-
],
|
|
450
|
-
"no-iterator": [
|
|
451
|
-
"error"
|
|
452
|
-
],
|
|
453
|
-
"no-labels": [
|
|
454
|
-
"error"
|
|
455
|
-
],
|
|
456
|
-
"no-lone-blocks": [
|
|
457
|
-
"error"
|
|
458
|
-
],
|
|
459
|
-
"no-lonely-if": [
|
|
460
|
-
"warn"
|
|
461
|
-
],
|
|
462
|
-
"no-multi-assign": [
|
|
463
|
-
"error"
|
|
464
|
-
],
|
|
465
|
-
"no-multi-spaces": [
|
|
466
|
-
"warn",
|
|
467
|
-
{
|
|
468
|
-
"exceptions": {
|
|
469
|
-
"ImportDeclaration": true,
|
|
470
|
-
"Property": true,
|
|
471
|
-
"VariableDeclarator": true
|
|
472
|
-
},
|
|
473
|
-
"ignoreEOLComments": true
|
|
474
|
-
}
|
|
475
|
-
],
|
|
476
|
-
"no-multi-str": [
|
|
477
|
-
"warn"
|
|
478
|
-
],
|
|
479
|
-
"no-multiple-empty-lines": [
|
|
480
|
-
"warn",
|
|
481
|
-
{
|
|
482
|
-
"max": 2,
|
|
483
|
-
"maxBOF": 1,
|
|
484
|
-
"maxEOF": 2
|
|
485
|
-
}
|
|
486
|
-
],
|
|
487
|
-
"no-new-func": [
|
|
488
|
-
"error"
|
|
489
|
-
],
|
|
490
|
-
"no-new-object": [
|
|
491
|
-
"error"
|
|
492
|
-
],
|
|
493
|
-
"no-new-wrappers": [
|
|
494
|
-
"warn"
|
|
495
|
-
],
|
|
496
|
-
"no-octal-escape": [
|
|
497
|
-
"error"
|
|
498
|
-
],
|
|
499
|
-
"no-proto": [
|
|
500
|
-
"error"
|
|
501
|
-
],
|
|
502
|
-
"no-return-assign": [
|
|
503
|
-
"warn"
|
|
504
|
-
],
|
|
505
|
-
"no-script-url": [
|
|
506
|
-
"error"
|
|
507
|
-
],
|
|
508
|
-
"no-sequences": [
|
|
509
|
-
"error"
|
|
510
|
-
],
|
|
511
|
-
"no-trailing-spaces": [
|
|
512
|
-
"warn",
|
|
513
|
-
{
|
|
514
|
-
"ignoreComments": true,
|
|
515
|
-
"skipBlankLines": true
|
|
516
|
-
}
|
|
517
|
-
],
|
|
518
|
-
"no-unneeded-ternary": [
|
|
519
|
-
"warn"
|
|
520
|
-
],
|
|
521
|
-
"no-useless-computed-key": [
|
|
522
|
-
"warn" // This turns "var a = { [0]: 0 };" into var a = { 0: 0 }; May be annoying
|
|
523
|
-
],
|
|
524
|
-
"no-useless-concat": [
|
|
525
|
-
"warn"
|
|
526
|
-
],
|
|
527
|
-
"no-useless-rename": [
|
|
528
|
-
"error"
|
|
529
|
-
],
|
|
530
|
-
"no-useless-return": [
|
|
531
|
-
"warn"
|
|
532
|
-
],
|
|
533
|
-
"no-var": [
|
|
534
|
-
"error"
|
|
535
|
-
],
|
|
536
|
-
"no-void": [
|
|
537
|
-
"error"
|
|
538
|
-
],
|
|
539
|
-
"no-warning-comments": [
|
|
540
|
-
"warn",
|
|
541
|
-
{
|
|
542
|
-
"location": "anywhere",
|
|
543
|
-
"terms": [
|
|
544
|
-
"todo",
|
|
545
|
-
"hack",
|
|
546
|
-
"fixme",
|
|
547
|
-
"yikes"
|
|
548
|
-
]
|
|
549
|
-
}
|
|
550
|
-
],
|
|
551
|
-
"no-whitespace-before-property": [
|
|
552
|
-
"warn"
|
|
553
|
-
],
|
|
554
|
-
"nonblock-statement-body-position": [
|
|
555
|
-
"warn",
|
|
556
|
-
"below"
|
|
557
|
-
],
|
|
558
|
-
"object-curly-newline": [
|
|
559
|
-
"warn",
|
|
560
|
-
{
|
|
561
|
-
"ExportDeclaration": "never",
|
|
562
|
-
"ImportDeclaration": "never",
|
|
563
|
-
"ObjectExpression": {
|
|
564
|
-
"minProperties": 2 // Updated from 3
|
|
565
|
-
},
|
|
566
|
-
"ObjectPattern": {
|
|
567
|
-
"multiline": true
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
],
|
|
571
|
-
/*
|
|
572
|
-
*"object-shorthand": [1
|
|
573
|
-
* "warn",
|
|
574
|
-
* "consistent-as-needed"
|
|
575
|
-
*],
|
|
576
|
-
*/
|
|
577
|
-
"one-var": [
|
|
578
|
-
"error",
|
|
579
|
-
{
|
|
580
|
-
"const": "never",
|
|
581
|
-
"let": "never",
|
|
582
|
-
"var": "never",
|
|
583
|
-
"separateRequires": true
|
|
584
|
-
}
|
|
585
|
-
],
|
|
586
|
-
"operator-assignment": [
|
|
587
|
-
"warn",
|
|
588
|
-
"always"
|
|
589
|
-
],
|
|
590
|
-
"prefer-arrow-callback": [
|
|
591
|
-
"warn"
|
|
592
|
-
],
|
|
593
|
-
"prefer-const": [
|
|
594
|
-
"warn"
|
|
595
|
-
],
|
|
596
|
-
"prefer-exponentiation-operator": [
|
|
597
|
-
"error"
|
|
598
|
-
],
|
|
599
|
-
"prefer-numeric-literals": [
|
|
600
|
-
"error"
|
|
601
|
-
],
|
|
602
|
-
"prefer-object-spread": [
|
|
603
|
-
"warn"
|
|
604
|
-
],
|
|
605
|
-
"prefer-promise-reject-errors": [
|
|
606
|
-
"error"
|
|
607
|
-
],
|
|
608
|
-
"prefer-rest-params": [
|
|
609
|
-
"error"
|
|
610
|
-
],
|
|
611
|
-
"prefer-spread": [
|
|
612
|
-
"warn"
|
|
613
|
-
],
|
|
614
|
-
"prefer-template": [
|
|
615
|
-
"warn"
|
|
616
|
-
],
|
|
617
|
-
"quote-props": [
|
|
618
|
-
"warn",
|
|
619
|
-
"as-needed" // more options required?
|
|
620
|
-
],
|
|
621
|
-
"radix": [
|
|
622
|
-
"error",
|
|
623
|
-
"as-needed"
|
|
624
|
-
],
|
|
625
|
-
"require-unicode-regexp": [
|
|
626
|
-
"off"
|
|
627
|
-
],
|
|
628
|
-
"rest-spread-spacing": [
|
|
629
|
-
"error",
|
|
630
|
-
"never"
|
|
631
|
-
],
|
|
632
|
-
"semi-spacing": [
|
|
633
|
-
"warn",
|
|
634
|
-
{
|
|
635
|
-
"after": true,
|
|
636
|
-
"before": false
|
|
637
|
-
}
|
|
638
|
-
],
|
|
639
|
-
"semi-style": [
|
|
640
|
-
"warn",
|
|
641
|
-
"last"
|
|
642
|
-
],
|
|
643
|
-
"sort-imports": [
|
|
644
|
-
"off"
|
|
645
|
-
// This rule has proven overly obnoxious for not much gain in code readability
|
|
646
|
-
// The auto-fixer for this rule cannot reorder imports just sub-modules
|
|
647
|
-
// "warn",
|
|
648
|
-
// {
|
|
649
|
-
// "allowSeparatedGroups": true,
|
|
650
|
-
// "ignoreCase": true
|
|
651
|
-
// }
|
|
652
|
-
],
|
|
653
|
-
"sort-keys": [
|
|
654
|
-
"warn",
|
|
655
|
-
"asc",
|
|
656
|
-
{
|
|
657
|
-
"minKeys": 8,
|
|
658
|
-
"caseSensitive": false,
|
|
659
|
-
"natural": false
|
|
660
|
-
}
|
|
661
|
-
],
|
|
662
|
-
"space-before-blocks": [
|
|
663
|
-
"warn",
|
|
664
|
-
{
|
|
665
|
-
"classes": "never",
|
|
666
|
-
"functions": "never",
|
|
667
|
-
"keywords": "never"
|
|
668
|
-
}
|
|
669
|
-
],
|
|
670
|
-
"space-in-parens": [
|
|
671
|
-
"warn",
|
|
672
|
-
"never"
|
|
673
|
-
],
|
|
674
|
-
"space-unary-ops": [
|
|
675
|
-
"warn",
|
|
676
|
-
{
|
|
677
|
-
"nonwords": false,
|
|
678
|
-
"words": true
|
|
679
|
-
}
|
|
680
|
-
],
|
|
681
|
-
"spaced-comment": [
|
|
682
|
-
"warn",
|
|
683
|
-
"always",
|
|
684
|
-
{
|
|
685
|
-
"exceptions": [
|
|
686
|
-
"-",
|
|
687
|
-
"+",
|
|
688
|
-
"~"
|
|
689
|
-
]
|
|
690
|
-
}
|
|
691
|
-
],
|
|
692
|
-
"switch-colon-spacing": [
|
|
693
|
-
"warn",
|
|
694
|
-
{
|
|
695
|
-
"after": true,
|
|
696
|
-
"before": false
|
|
697
|
-
}
|
|
698
|
-
],
|
|
699
|
-
"symbol-description": [
|
|
700
|
-
"warn"
|
|
701
|
-
],
|
|
702
|
-
"template-curly-spacing": [
|
|
703
|
-
"warn",
|
|
704
|
-
"never"
|
|
705
|
-
],
|
|
706
|
-
"template-tag-spacing": [
|
|
707
|
-
"warn",
|
|
708
|
-
"never"
|
|
709
|
-
],
|
|
710
|
-
"unicode-bom": [
|
|
711
|
-
"error",
|
|
712
|
-
"never"
|
|
713
|
-
],
|
|
714
|
-
"wrap-iife": [
|
|
715
|
-
"error",
|
|
716
|
-
"outside",
|
|
717
|
-
{
|
|
718
|
-
"functionPrototypeMethods": false
|
|
719
|
-
}
|
|
720
|
-
],
|
|
721
|
-
"wrap-regex": [
|
|
722
|
-
"error"
|
|
723
|
-
],
|
|
724
|
-
"yield-star-spacing": [
|
|
725
|
-
"warn",
|
|
726
|
-
"both"
|
|
727
|
-
],
|
|
728
|
-
"yoda": [
|
|
729
|
-
"warn",
|
|
730
|
-
"never",
|
|
731
|
-
{
|
|
732
|
-
"onlyEquality": true
|
|
733
|
-
}
|
|
734
|
-
],
|
|
735
|
-
// ~~~~~ Rules exclusive to the typescript eslint extension (not inherited from recommended)
|
|
736
|
-
"@typescript-eslint/array-type": [
|
|
737
|
-
"warn",
|
|
738
|
-
{
|
|
739
|
-
"default": "array",
|
|
740
|
-
"readonly": "array"
|
|
741
|
-
}
|
|
742
|
-
],
|
|
743
|
-
"@typescript-eslint/ban-tslint-comment": [
|
|
744
|
-
"off"
|
|
745
|
-
],
|
|
746
|
-
"@typescript-eslint/class-literal-property-style": [
|
|
747
|
-
"warn",
|
|
748
|
-
"fields"
|
|
749
|
-
],
|
|
750
|
-
"@typescript-eslint/consistent-indexed-object-style": [
|
|
751
|
-
"warn",
|
|
752
|
-
"record"
|
|
753
|
-
],
|
|
754
|
-
"@typescript-eslint/consistent-type-assertions": [
|
|
755
|
-
"error",
|
|
756
|
-
{
|
|
757
|
-
"assertionStyle": "as",
|
|
758
|
-
"objectLiteralTypeAssertions": "never"
|
|
759
|
-
}
|
|
760
|
-
],
|
|
761
|
-
"@typescript-eslint/consistent-type-definitions": [
|
|
762
|
-
"warn",
|
|
763
|
-
"interface"
|
|
764
|
-
],
|
|
765
|
-
"@typescript-eslint/consistent-type-exports": [
|
|
766
|
-
"off"
|
|
767
|
-
],
|
|
768
|
-
"@typescript-eslint/consistent-type-imports": [
|
|
769
|
-
"warn",
|
|
770
|
-
{
|
|
771
|
-
"prefer": "no-type-imports",
|
|
772
|
-
"disallowTypeAnnotations": false
|
|
773
|
-
}
|
|
774
|
-
],
|
|
775
|
-
"@typescript-eslint/explicit-function-return-type": [
|
|
776
|
-
"warn",
|
|
777
|
-
{
|
|
778
|
-
"allowExpressions": false,
|
|
779
|
-
"allowTypedFunctionExpressions": true,
|
|
780
|
-
"allowHigherOrderFunctions": false,
|
|
781
|
-
"allowDirectConstAssertionInArrowFunctions": true,
|
|
782
|
-
"allowConciseArrowFunctionExpressionsStartingWithVoid": true
|
|
783
|
-
}
|
|
784
|
-
],
|
|
785
|
-
"@typescript-eslint/explicit-member-accessibility": [
|
|
786
|
-
"error",
|
|
787
|
-
{
|
|
788
|
-
"accessibility": "explicit",
|
|
789
|
-
"overrides": {
|
|
790
|
-
"constructors": "no-public" // Might want to add arrow functions here
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
],
|
|
794
|
-
"@typescript-eslint/explicit-module-boundary-types": [
|
|
795
|
-
"warn"
|
|
796
|
-
], // Not really sure how you are able to have non-strict with other rules but guess i'll turn this on
|
|
797
|
-
"@typescript-eslint/member-delimiter-style": [
|
|
798
|
-
"warn"
|
|
799
|
-
],
|
|
800
|
-
"@typescript-eslint/method-signature-style": [
|
|
801
|
-
"warn",
|
|
802
|
-
"method"
|
|
803
|
-
],
|
|
804
|
-
// "@typescript-eslint/naming-convention":[], // I think other rules cover camelCase so this just feel redundant
|
|
805
|
-
"@typescript-eslint/no-base-to-string": [
|
|
806
|
-
"warn"
|
|
807
|
-
],
|
|
808
|
-
"@typescript-eslint/no-confusing-non-null-assertion": [
|
|
809
|
-
"warn"
|
|
810
|
-
],
|
|
811
|
-
"@typescript-eslint/no-confusing-void-expression": [
|
|
812
|
-
"error",
|
|
813
|
-
{
|
|
814
|
-
"ignoreArrowShorthand": true,
|
|
815
|
-
"ignoreVoidOperator": true
|
|
816
|
-
}
|
|
817
|
-
],
|
|
818
|
-
"@typescript-eslint/no-dynamic-delete": [
|
|
819
|
-
"error"
|
|
820
|
-
], // If you are disabling this rule consider changing your data structure
|
|
821
|
-
"@typescript-eslint/no-extraneous-class": [
|
|
822
|
-
"off"
|
|
823
|
-
], // I don't think we have developers using namespaces as classes, but if they wanted to I don't think the linter should stop them
|
|
824
|
-
"@typescript-eslint/no-invalid-void-type": [
|
|
825
|
-
"warn",
|
|
826
|
-
{
|
|
827
|
-
"allowInGenericTypeArguments": true,
|
|
828
|
-
"allowAsThisParameter": false
|
|
829
|
-
}
|
|
830
|
-
],
|
|
831
|
-
"@typescript-eslint/no-meaningless-void-operator": [
|
|
832
|
-
"error"
|
|
833
|
-
],
|
|
834
|
-
"@typescript-eslint/no-non-null-asserted-nullish-coalescing": [
|
|
835
|
-
"warn"
|
|
836
|
-
], // Wrap your expression in parenthesis
|
|
837
|
-
"@typescript-eslint/parameter-properties": [
|
|
838
|
-
"warn",
|
|
839
|
-
{
|
|
840
|
-
"allow":[ "private readonly" ],
|
|
841
|
-
"prefer": "parameter-property"
|
|
842
|
-
}
|
|
843
|
-
], // I like parameter properties
|
|
844
|
-
"@typescript-eslint/no-require-imports": [
|
|
845
|
-
"error"
|
|
846
|
-
],
|
|
847
|
-
"@typescript-eslint/no-unnecessary-boolean-literal-compare": [
|
|
848
|
-
"warn",
|
|
849
|
-
{
|
|
850
|
-
"allowComparingNullableBooleansToTrue": false,
|
|
851
|
-
"allowComparingNullableBooleansToFalse": false
|
|
852
|
-
}
|
|
853
|
-
], // I feel a bit torn about this one. I like the verbosity of an explicit comparison sometimes but it does add code bloat and points of failure with nully-operators
|
|
854
|
-
/*"@typescript-eslint/no-unnecessary-condition":["warn", { "allowConstantLoopConditions": true, "allowRuleToRunWithoutStrictNullChecksIKnowWhatIAmDoing": true}]*/
|
|
855
|
-
"@typescript-eslint/no-unnecessary-qualifier": [
|
|
856
|
-
"warn"
|
|
857
|
-
],
|
|
858
|
-
"@typescript-eslint/no-unnecessary-type-arguments": [
|
|
859
|
-
"off"
|
|
860
|
-
],
|
|
861
|
-
"@typescript-eslint/non-nullable-type-assertion-style": [
|
|
862
|
-
"warn"
|
|
863
|
-
],
|
|
864
|
-
"@typescript-eslint/prefer-enum-initializers": [
|
|
865
|
-
"warn"
|
|
866
|
-
],
|
|
867
|
-
"@typescript-eslint/prefer-for-of": [
|
|
868
|
-
"warn"
|
|
869
|
-
],
|
|
870
|
-
"@typescript-eslint/prefer-function-type": [
|
|
871
|
-
"warn"
|
|
872
|
-
], // Feel free to turn this off (although you may consider an interface restructuring first)
|
|
873
|
-
"@typescript-eslint/prefer-includes": [
|
|
874
|
-
"warn"
|
|
875
|
-
],
|
|
876
|
-
"@typescript-eslint/prefer-literal-enum-member": [
|
|
877
|
-
"off"
|
|
878
|
-
], // values are locally scoped
|
|
879
|
-
"@typescript-eslint/prefer-nullish-coalescing": [
|
|
880
|
-
"off" // This rule was getting very annoying so it has been turned off going forward
|
|
881
|
-
],
|
|
882
|
-
"@typescript-eslint/prefer-optional-chain": [
|
|
883
|
-
"warn"
|
|
884
|
-
],
|
|
885
|
-
"@typescript-eslint/prefer-readonly": [
|
|
886
|
-
"warn",
|
|
887
|
-
{
|
|
888
|
-
"onlyInlineLambdas": false
|
|
889
|
-
}
|
|
890
|
-
],
|
|
891
|
-
"@typescript-eslint/prefer-readonly-parameter-types": [
|
|
892
|
-
"off"
|
|
893
|
-
], // This level of verbosity for primitive types is excessive (assume anything you give to a function may be mutated)
|
|
894
|
-
"@typescript-eslint/prefer-reduce-type-parameter": [
|
|
895
|
-
"warn"
|
|
896
|
-
], // Use the built in template functionality
|
|
897
|
-
"@typescript-eslint/prefer-regexp-exec": [
|
|
898
|
-
"off"
|
|
899
|
-
],
|
|
900
|
-
"@typescript-eslint/prefer-return-this-type": [
|
|
901
|
-
"error"
|
|
902
|
-
],
|
|
903
|
-
"@typescript-eslint/prefer-string-starts-ends-with": [
|
|
904
|
-
"warn"
|
|
905
|
-
],
|
|
906
|
-
"@typescript-eslint/prefer-ts-expect-error": [
|
|
907
|
-
"warn"
|
|
908
|
-
],
|
|
909
|
-
"@typescript-eslint/promise-function-async": [
|
|
910
|
-
"warn",
|
|
911
|
-
{
|
|
912
|
-
"allowAny": true,
|
|
913
|
-
"allowedPromiseNames": [
|
|
914
|
-
"Thenable"
|
|
915
|
-
],
|
|
916
|
-
"checkArrowFunctions": true,
|
|
917
|
-
"checkFunctionDeclarations": true,
|
|
918
|
-
"checkFunctionExpressions": true,
|
|
919
|
-
"checkMethodDeclarations": true
|
|
920
|
-
}
|
|
921
|
-
],
|
|
922
|
-
"@typescript-eslint/require-array-sort-compare": [
|
|
923
|
-
"warn",
|
|
924
|
-
{
|
|
925
|
-
"ignoreStringArrays": true
|
|
926
|
-
}
|
|
927
|
-
],
|
|
928
|
-
"@typescript-eslint/sort-type-constituents": [
|
|
929
|
-
// This rule has been turned off because the settings are not granular enough to allow for `let x: string | string[] = undefined`
|
|
930
|
-
// It does not allow you to allow for arrays after literals without changing every group order.
|
|
931
|
-
// Developers will have to sort their own keys if they care about order.
|
|
932
|
-
"off"
|
|
933
|
-
],
|
|
934
|
-
"@typescript-eslint/strict-boolean-expressions": [
|
|
935
|
-
"off"
|
|
936
|
-
],
|
|
937
|
-
"@typescript-eslint/switch-exhaustiveness-check": [
|
|
938
|
-
"warn"
|
|
939
|
-
],
|
|
940
|
-
"@typescript-eslint/type-annotation-spacing": [
|
|
941
|
-
"warn",
|
|
942
|
-
{
|
|
943
|
-
before: false,
|
|
944
|
-
after: true
|
|
945
|
-
}
|
|
946
|
-
],
|
|
947
|
-
"@typescript-eslint/typedef": [
|
|
948
|
-
"warn",
|
|
949
|
-
{
|
|
950
|
-
"arrayDestructuring": true,
|
|
951
|
-
"arrowParameter": true,
|
|
952
|
-
"memberVariableDeclaration": true,
|
|
953
|
-
"objectDestructuring": true,
|
|
954
|
-
"parameter": true,
|
|
955
|
-
"propertyDeclaration": true,
|
|
956
|
-
"variableDeclaration": true,
|
|
957
|
-
"variableDeclarationIgnoreFunction": true
|
|
958
|
-
}
|
|
959
|
-
],
|
|
960
|
-
"@typescript-eslint/unified-signatures": [
|
|
961
|
-
"warn"
|
|
962
|
-
],
|
|
963
|
-
// This rule was added later and
|
|
964
|
-
"@typescript-eslint/restrict-template-expressions": [
|
|
965
|
-
"warn",
|
|
966
|
-
{
|
|
967
|
-
"allowNumber": true,
|
|
968
|
-
"allowBoolean": true,
|
|
969
|
-
"allowAny": true,
|
|
970
|
-
"allowNullish": true,
|
|
971
|
-
"allowRegExp": true,
|
|
972
|
-
"allowNever": true
|
|
973
|
-
}
|
|
974
|
-
],
|
|
975
|
-
// ~~~~~ Rules set to "off" because the tslinter overrides their base behavior ~~~~~
|
|
976
|
-
"comma-dangle": [
|
|
977
|
-
"off"
|
|
978
|
-
],
|
|
979
|
-
"brace-style": [
|
|
980
|
-
"off"
|
|
981
|
-
],
|
|
982
|
-
"comma-spacing": [
|
|
983
|
-
"off"
|
|
984
|
-
],
|
|
985
|
-
"default-param-last": [
|
|
986
|
-
"off"
|
|
987
|
-
],
|
|
988
|
-
"dot-notation": [
|
|
989
|
-
"off"
|
|
990
|
-
],
|
|
991
|
-
"func-call-spacing": [
|
|
992
|
-
"off"
|
|
993
|
-
],
|
|
994
|
-
"indent": [
|
|
995
|
-
"off"
|
|
996
|
-
],
|
|
997
|
-
"init-declarations": [
|
|
998
|
-
"off"
|
|
999
|
-
],
|
|
1000
|
-
"keyword-spacing": [
|
|
1001
|
-
"off"
|
|
1002
|
-
],
|
|
1003
|
-
"lines-between-class-members": [
|
|
1004
|
-
"off"
|
|
1005
|
-
],
|
|
1006
|
-
"no-array-constructor": [
|
|
1007
|
-
"off"
|
|
1008
|
-
],
|
|
1009
|
-
"no-dupe-class-members": [
|
|
1010
|
-
"off"
|
|
1011
|
-
],
|
|
1012
|
-
"no-duplicate-imports": [
|
|
1013
|
-
"off"
|
|
1014
|
-
],
|
|
1015
|
-
"no-empty-function": [
|
|
1016
|
-
"off"
|
|
1017
|
-
],
|
|
1018
|
-
"no-extra-parens": [
|
|
1019
|
-
"off"
|
|
1020
|
-
],
|
|
1021
|
-
"no-extra-semi": [
|
|
1022
|
-
"off"
|
|
1023
|
-
],
|
|
1024
|
-
"no-implied-eval": [
|
|
1025
|
-
"off"
|
|
1026
|
-
],
|
|
1027
|
-
"no-invalid-this": [
|
|
1028
|
-
"off"
|
|
1029
|
-
],
|
|
1030
|
-
"no-loop-func": [
|
|
1031
|
-
"off"
|
|
1032
|
-
],
|
|
1033
|
-
"no-loss-of-precision": [
|
|
1034
|
-
"off"
|
|
1035
|
-
],
|
|
1036
|
-
"no-magic-numbers": [
|
|
1037
|
-
"off"
|
|
1038
|
-
],
|
|
1039
|
-
"no-redeclare": [
|
|
1040
|
-
"off"
|
|
1041
|
-
],
|
|
1042
|
-
"no-restricted-imports": [
|
|
1043
|
-
"off"
|
|
1044
|
-
],
|
|
1045
|
-
"no-shadow": [
|
|
1046
|
-
"off"
|
|
1047
|
-
],
|
|
1048
|
-
"no-throw-literal": [
|
|
1049
|
-
"off"
|
|
1050
|
-
],
|
|
1051
|
-
"no-unused-expressions": [
|
|
1052
|
-
"off"
|
|
1053
|
-
],
|
|
1054
|
-
"no-unused-vars": [
|
|
1055
|
-
"off"
|
|
1056
|
-
],
|
|
1057
|
-
"no-use-before-define": [
|
|
1058
|
-
"off"
|
|
1059
|
-
],
|
|
1060
|
-
"no-useless-constructor": [
|
|
1061
|
-
"off"
|
|
1062
|
-
],
|
|
1063
|
-
"object-curly-spacing": [
|
|
1064
|
-
"off"
|
|
1065
|
-
],
|
|
1066
|
-
"padding-line-between-statements": [
|
|
1067
|
-
"off"
|
|
1068
|
-
],
|
|
1069
|
-
"quotes": [
|
|
1070
|
-
"off"
|
|
1071
|
-
],
|
|
1072
|
-
"require-await": [
|
|
1073
|
-
"off"
|
|
1074
|
-
],
|
|
1075
|
-
"semi": [
|
|
1076
|
-
"off"
|
|
1077
|
-
],
|
|
1078
|
-
"space-before-function-paren": [
|
|
1079
|
-
"off"
|
|
1080
|
-
],
|
|
1081
|
-
"space-infix-ops": [
|
|
1082
|
-
"off"
|
|
1083
|
-
]
|
|
1084
|
-
},
|
|
1085
|
-
settings: {
|
|
1086
|
-
"import/parsers": {
|
|
1087
|
-
"@typescript-eslint/parser": [".ts", ".tsx"]
|
|
1088
|
-
},
|
|
1089
|
-
"import/resolver": {
|
|
1090
|
-
"typescript": {
|
|
1091
|
-
"alwaysTryTypes": true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
|
|
1092
|
-
|
|
1093
|
-
// use <root>/path/to/folder/tsconfig.json
|
|
1094
|
-
"project": "path/to/folder"
|
|
1095
|
-
},
|
|
1096
|
-
"node": true
|
|
1097
|
-
}
|
|
1098
|
-
}
|
|
1099
|
-
}
|
package/index.js
DELETED