eslint-config-complete 3.2.3 → 4.0.0
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/dist/base/base-complete.d.ts +1 -1
- package/dist/base/base-complete.d.ts.map +1 -1
- package/dist/base/base-complete.js +41 -41
- package/dist/base/base-eslint.d.ts +1 -1
- package/dist/base/base-eslint.d.ts.map +1 -1
- package/dist/base/base-eslint.js +124 -124
- package/dist/base/base-import-x.d.ts +1 -1
- package/dist/base/base-import-x.d.ts.map +1 -1
- package/dist/base/base-import-x.js +24 -24
- package/dist/base/base-jsdoc.d.ts +1 -1
- package/dist/base/base-jsdoc.d.ts.map +1 -1
- package/dist/base/base-jsdoc.js +31 -31
- package/dist/base/base-n.d.ts +1 -1
- package/dist/base/base-n.d.ts.map +1 -1
- package/dist/base/base-n.js +9 -9
- package/dist/base/base-stylistic.d.ts +1 -1
- package/dist/base/base-stylistic.d.ts.map +1 -1
- package/dist/base/base-stylistic.js +3 -3
- package/dist/base/base-typescript-eslint.d.ts +1 -1
- package/dist/base/base-typescript-eslint.d.ts.map +1 -1
- package/dist/base/base-typescript-eslint.js +114 -113
- package/dist/base/base-unicorn.d.ts +1 -1
- package/dist/base/base-unicorn.d.ts.map +1 -1
- package/dist/base/base-unicorn.js +129 -126
- package/dist/base.d.ts +1 -1
- package/dist/base.d.ts.map +1 -1
- package/dist/eslint-plugin.d.ts +1 -1
- package/dist/eslint-plugin.d.ts.map +1 -1
- package/dist/eslint-plugin.js +30 -30
- package/package.json +9 -9
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* This ESLint config only contains rules from `eslint-plugin-complete`:
|
|
3
3
|
* https://complete-ts.github.io/eslint-plugin-complete
|
|
4
4
|
*/
|
|
5
|
-
export const baseComplete: import("eslint").
|
|
5
|
+
export const baseComplete: import("eslint/config").Config[];
|
|
6
6
|
//# sourceMappingURL=base-complete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-complete.d.ts","sourceRoot":"","sources":["../../src/base/base-complete.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,
|
|
1
|
+
{"version":3,"file":"base-complete.d.ts","sourceRoot":"","sources":["../../src/base/base-complete.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,4DAkEE"}
|
|
@@ -11,51 +11,51 @@ export const baseComplete = defineConfig({
|
|
|
11
11
|
complete: ESLintPluginComplete,
|
|
12
12
|
},
|
|
13
13
|
rules: {
|
|
14
|
-
"complete/complete-sentences-jsdoc": "
|
|
15
|
-
"complete/complete-sentences-line-comments": "
|
|
16
|
-
"complete/consistent-enum-values": "
|
|
17
|
-
"complete/consistent-named-tuples": "
|
|
18
|
-
"complete/eqeqeq-fix": "
|
|
19
|
-
"complete/format-jsdoc-comments": "
|
|
20
|
-
"complete/format-line-comments": "
|
|
21
|
-
"complete/jsdoc-code-block-language": "
|
|
22
|
-
"complete/newline-between-switch-case": "
|
|
23
|
-
"complete/no-confusing-set-methods": "
|
|
24
|
-
"complete/no-empty-jsdoc": "
|
|
25
|
-
"complete/no-empty-line-comments": "
|
|
26
|
-
"complete/no-explicit-array-loops": "
|
|
27
|
-
"complete/no-explicit-map-set-loops": "
|
|
28
|
-
"complete/no-for-in": "
|
|
29
|
-
"complete/no-let-any": "
|
|
30
|
-
"complete/no-mutable-return": "
|
|
31
|
-
"complete/no-number-enums": "
|
|
32
|
-
"complete/no-object-any": "
|
|
33
|
-
"complete/no-object-methods-with-map-set": "
|
|
34
|
-
"complete/no-string-length-0": "
|
|
35
|
-
"complete/no-template-curly-in-string-fix": "
|
|
36
|
-
"complete/no-undefined-return-type": "
|
|
37
|
-
"complete/no-unnecessary-assignment": "
|
|
38
|
-
"complete/no-unsafe-plusplus": "
|
|
39
|
-
"complete/no-useless-return": "
|
|
40
|
-
"complete/no-void-return-type": "
|
|
41
|
-
"complete/prefer-const": "
|
|
42
|
-
"complete/prefer-plusplus": "
|
|
43
|
-
"complete/prefer-postfix-plusplus": "
|
|
44
|
-
"complete/prefer-readonly-parameter-types": "
|
|
45
|
-
"complete/require-break": "
|
|
46
|
-
"complete/require-capital-const-assertions": "
|
|
47
|
-
"complete/require-capital-read-only": "
|
|
48
|
-
"complete/require-unannotated-const-assertions": "
|
|
49
|
-
"complete/require-variadic-function-argument": "
|
|
50
|
-
"complete/strict-array-methods": "
|
|
51
|
-
"complete/strict-enums": "
|
|
52
|
-
"complete/strict-undefined-functions": "
|
|
53
|
-
"complete/strict-void-functions": "
|
|
14
|
+
"complete/complete-sentences-jsdoc": "error",
|
|
15
|
+
"complete/complete-sentences-line-comments": "error",
|
|
16
|
+
"complete/consistent-enum-values": "error",
|
|
17
|
+
"complete/consistent-named-tuples": "error",
|
|
18
|
+
"complete/eqeqeq-fix": "error",
|
|
19
|
+
"complete/format-jsdoc-comments": "error",
|
|
20
|
+
"complete/format-line-comments": "error",
|
|
21
|
+
"complete/jsdoc-code-block-language": "error",
|
|
22
|
+
"complete/newline-between-switch-case": "error",
|
|
23
|
+
"complete/no-confusing-set-methods": "error",
|
|
24
|
+
"complete/no-empty-jsdoc": "error",
|
|
25
|
+
"complete/no-empty-line-comments": "error",
|
|
26
|
+
"complete/no-explicit-array-loops": "error",
|
|
27
|
+
"complete/no-explicit-map-set-loops": "error",
|
|
28
|
+
"complete/no-for-in": "error",
|
|
29
|
+
"complete/no-let-any": "error",
|
|
30
|
+
"complete/no-mutable-return": "error",
|
|
31
|
+
"complete/no-number-enums": "error",
|
|
32
|
+
"complete/no-object-any": "error",
|
|
33
|
+
"complete/no-object-methods-with-map-set": "error",
|
|
34
|
+
"complete/no-string-length-0": "error",
|
|
35
|
+
"complete/no-template-curly-in-string-fix": "error",
|
|
36
|
+
"complete/no-undefined-return-type": "error",
|
|
37
|
+
"complete/no-unnecessary-assignment": "error",
|
|
38
|
+
"complete/no-unsafe-plusplus": "error",
|
|
39
|
+
"complete/no-useless-return": "error",
|
|
40
|
+
"complete/no-void-return-type": "error",
|
|
41
|
+
"complete/prefer-const": "error",
|
|
42
|
+
"complete/prefer-plusplus": "error",
|
|
43
|
+
"complete/prefer-postfix-plusplus": "error",
|
|
44
|
+
"complete/prefer-readonly-parameter-types": "error",
|
|
45
|
+
"complete/require-break": "error",
|
|
46
|
+
"complete/require-capital-const-assertions": "error",
|
|
47
|
+
"complete/require-capital-read-only": "error",
|
|
48
|
+
"complete/require-unannotated-const-assertions": "error",
|
|
49
|
+
"complete/require-variadic-function-argument": "error",
|
|
50
|
+
"complete/strict-array-methods": "error",
|
|
51
|
+
"complete/strict-enums": "error",
|
|
52
|
+
"complete/strict-undefined-functions": "error",
|
|
53
|
+
"complete/strict-void-functions": "error",
|
|
54
54
|
},
|
|
55
55
|
// Rules that require type information will throw an error on ".json" files. (This is needed
|
|
56
56
|
// when using `eslint-plugin-package-json`. Even though this config does not currently use the
|
|
57
57
|
// plugin, we include it here defensively.)
|
|
58
|
-
ignores: ["
|
|
58
|
+
ignores: ["**/*.json", "**/*.jsonc"],
|
|
59
59
|
}, {
|
|
60
60
|
files: ["**/*.js", "**/*.cjs", "**/*.mjs", "**/*.jsx"],
|
|
61
61
|
rules: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-eslint.d.ts","sourceRoot":"","sources":["../../src/base/base-eslint.js"],"names":[],"mappings":"AA6mBA;;;;;;;;GAQG;AACH
|
|
1
|
+
{"version":3,"file":"base-eslint.d.ts","sourceRoot":"","sources":["../../src/base/base-eslint.js"],"names":[],"mappings":"AA6mBA;;;;;;;;GAQG;AACH,0DAMG"}
|
package/dist/base/base-eslint.js
CHANGED
|
@@ -7,86 +7,86 @@ import { defineConfig } from "eslint/config";
|
|
|
7
7
|
const POSSIBLE_PROBLEMS = {
|
|
8
8
|
/** The `checkForEach` option is enabled to make the rule stricter. */
|
|
9
9
|
"array-callback-return": [
|
|
10
|
-
"
|
|
10
|
+
"error",
|
|
11
11
|
{
|
|
12
12
|
checkForEach: true,
|
|
13
13
|
},
|
|
14
14
|
],
|
|
15
15
|
"constructor-super": "off", // @typescript-eslint/eslint-recommended
|
|
16
|
-
"for-direction": "
|
|
16
|
+
"for-direction": "error",
|
|
17
17
|
"getter-return": "off", // @typescript-eslint/eslint-recommended
|
|
18
|
-
"no-async-promise-executor": "
|
|
19
|
-
"no-await-in-loop": "
|
|
20
|
-
"no-class-assign": "
|
|
21
|
-
"no-compare-neg-zero": "
|
|
22
|
-
"no-cond-assign": "
|
|
18
|
+
"no-async-promise-executor": "error",
|
|
19
|
+
"no-await-in-loop": "error",
|
|
20
|
+
"no-class-assign": "error",
|
|
21
|
+
"no-compare-neg-zero": "error",
|
|
22
|
+
"no-cond-assign": "error",
|
|
23
23
|
"no-const-assign": "off", // @typescript-eslint/eslint-recommended
|
|
24
|
-
"no-constant-binary-expression": "
|
|
25
|
-
"no-constant-condition": "
|
|
26
|
-
"no-constructor-return": "
|
|
27
|
-
"no-control-regex": "
|
|
28
|
-
"no-debugger": "
|
|
24
|
+
"no-constant-binary-expression": "error",
|
|
25
|
+
"no-constant-condition": "error",
|
|
26
|
+
"no-constructor-return": "error",
|
|
27
|
+
"no-control-regex": "error",
|
|
28
|
+
"no-debugger": "error",
|
|
29
29
|
"no-dupe-args": "off", // @typescript-eslint/eslint-recommended
|
|
30
30
|
"no-dupe-class-members": "off", // @typescript-eslint/eslint-recommended
|
|
31
|
-
"no-dupe-else-if": "
|
|
31
|
+
"no-dupe-else-if": "error",
|
|
32
32
|
"no-dupe-keys": "off", // @typescript-eslint/eslint-recommended
|
|
33
|
-
"no-duplicate-case": "
|
|
33
|
+
"no-duplicate-case": "error",
|
|
34
34
|
/** Superseded by the `import-x/no-duplicates` rule. */
|
|
35
35
|
"no-duplicate-imports": "off",
|
|
36
|
-
"no-empty-character-class": "
|
|
37
|
-
"no-empty-pattern": "
|
|
38
|
-
"no-ex-assign": "
|
|
39
|
-
"no-fallthrough": "
|
|
36
|
+
"no-empty-character-class": "error",
|
|
37
|
+
"no-empty-pattern": "error",
|
|
38
|
+
"no-ex-assign": "error",
|
|
39
|
+
"no-fallthrough": "error",
|
|
40
40
|
"no-func-assign": "off", // @typescript-eslint/eslint-recommended
|
|
41
41
|
"no-import-assign": "off", // @typescript-eslint/eslint-recommended
|
|
42
|
-
"no-inner-declarations": "
|
|
43
|
-
"no-invalid-regexp": "
|
|
44
|
-
"no-irregular-whitespace": "
|
|
42
|
+
"no-inner-declarations": "error",
|
|
43
|
+
"no-invalid-regexp": "error",
|
|
44
|
+
"no-irregular-whitespace": "error",
|
|
45
45
|
/** Superseded by the `@typescript-eslint/no-loss-of-precision` rule. */
|
|
46
46
|
"no-loss-of-precision": "off",
|
|
47
|
-
"no-misleading-character-class": "
|
|
48
|
-
"no-new-native-nonconstructor": "
|
|
47
|
+
"no-misleading-character-class": "error",
|
|
48
|
+
"no-new-native-nonconstructor": "error",
|
|
49
49
|
"no-obj-calls": "off", // @typescript-eslint/eslint-recommended`
|
|
50
|
-
"no-promise-executor-return": "
|
|
51
|
-
"no-prototype-builtins": "
|
|
52
|
-
"no-self-assign": "
|
|
53
|
-
"no-self-compare": "
|
|
50
|
+
"no-promise-executor-return": "error",
|
|
51
|
+
"no-prototype-builtins": "error",
|
|
52
|
+
"no-self-assign": "error",
|
|
53
|
+
"no-self-compare": "error",
|
|
54
54
|
"no-setter-return": "off", // @typescript-eslint/eslint-recommended
|
|
55
|
-
"no-sparse-arrays": "
|
|
55
|
+
"no-sparse-arrays": "error",
|
|
56
56
|
/** Superseded by the `complete/eqeqeq-fix` rule (since we want auto-fix to work properly). */
|
|
57
57
|
"no-template-curly-in-string": "off",
|
|
58
58
|
"no-this-before-super": "off", // @typescript-eslint/eslint-recommended`
|
|
59
|
-
"no-unassigned-vars": "
|
|
59
|
+
"no-unassigned-vars": "error",
|
|
60
60
|
"no-undef": "off", // @typescript-eslint/eslint-recommended
|
|
61
61
|
"no-unexpected-multiline": "off", // eslint-config-prettier
|
|
62
|
-
"no-unmodified-loop-condition": "
|
|
62
|
+
"no-unmodified-loop-condition": "error",
|
|
63
63
|
"no-unreachable": "off", // @typescript-eslint/eslint-recommended
|
|
64
|
-
"no-unreachable-loop": "
|
|
65
|
-
"no-unsafe-finally": "
|
|
64
|
+
"no-unreachable-loop": "error",
|
|
65
|
+
"no-unsafe-finally": "error",
|
|
66
66
|
"no-unsafe-negation": "off", // @typescript-eslint/eslint-recommended
|
|
67
|
-
"no-unsafe-optional-chaining": "
|
|
68
|
-
"no-unused-private-class-members": "
|
|
67
|
+
"no-unsafe-optional-chaining": "error",
|
|
68
|
+
"no-unused-private-class-members": "error",
|
|
69
69
|
/** Superseded by the `@typescript-eslint/no-unused-vars` rule. */
|
|
70
70
|
"no-unused-vars": "off",
|
|
71
71
|
/** Superseded by the `@typescript-eslint/no-use-before-define` rule. */
|
|
72
72
|
"no-use-before-define": "off",
|
|
73
|
-
"no-useless-backreference": "
|
|
73
|
+
"no-useless-backreference": "error",
|
|
74
74
|
/**
|
|
75
75
|
* Disabled since [Airbnb reports that the rule is "very
|
|
76
76
|
* buggy"](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/errors.js).
|
|
77
77
|
*/
|
|
78
78
|
"require-atomic-updates": "off",
|
|
79
|
-
"use-isnan": "
|
|
80
|
-
"valid-typeof": "
|
|
79
|
+
"use-isnan": "error",
|
|
80
|
+
"valid-typeof": "error",
|
|
81
81
|
};
|
|
82
82
|
/**
|
|
83
83
|
* @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
|
|
84
84
|
* @see https://eslint.org/docs/latest/rules/#suggestions
|
|
85
85
|
*/
|
|
86
86
|
const SUGGESTIONS = {
|
|
87
|
-
"accessor-pairs": "
|
|
88
|
-
"arrow-body-style": "
|
|
89
|
-
"block-scoped-var": "
|
|
87
|
+
"accessor-pairs": "error",
|
|
88
|
+
"arrow-body-style": "error",
|
|
89
|
+
"block-scoped-var": "error",
|
|
90
90
|
/**
|
|
91
91
|
* Superseded by the `@typescript-eslint/naming-convention` rule. (`camelcase` is used to enforce
|
|
92
92
|
* naming conventions.)
|
|
@@ -106,34 +106,34 @@ const SUGGESTIONS = {
|
|
|
106
106
|
complexity: "off",
|
|
107
107
|
/** Superseded by the `@typescript-eslint/consistent-return` rule. */
|
|
108
108
|
"consistent-return": "off",
|
|
109
|
-
"consistent-this": "
|
|
109
|
+
"consistent-this": "error",
|
|
110
110
|
/**
|
|
111
111
|
* Always requiring curly braces can partially ward against [Apple-style if statement
|
|
112
112
|
* bugs](https://www.imperialviolet.org/2014/02/22/applebug.html). Additionally, this rule needs
|
|
113
113
|
* to be set to "all" to [work properly with
|
|
114
114
|
* Prettier](https://github.com/prettier/eslint-config-prettier#curly).
|
|
115
115
|
*/
|
|
116
|
-
curly: ["
|
|
116
|
+
curly: ["error", "all"],
|
|
117
117
|
/**
|
|
118
118
|
* Disabled since it would cause the `@typescript-eslint/switch-exhaustiveness-check` rule to not
|
|
119
119
|
* work properly.
|
|
120
120
|
*/
|
|
121
121
|
"default-case": "off",
|
|
122
|
-
"default-case-last": "
|
|
122
|
+
"default-case-last": "error",
|
|
123
123
|
/** Superseded by the `@typescript-eslint/default-param-last` rule. */
|
|
124
124
|
"default-param-last": "off",
|
|
125
125
|
/** Superseded by the `@typescript-eslint/dot-notation` rule. */
|
|
126
126
|
"dot-notation": "off",
|
|
127
127
|
/** Superseded by the `complete/eqeqeq-fix` rule (since we want auto-fix to work properly). */
|
|
128
128
|
eqeqeq: "off",
|
|
129
|
-
"func-name-matching": "
|
|
130
|
-
"func-names": "
|
|
129
|
+
"func-name-matching": "error",
|
|
130
|
+
"func-names": "error",
|
|
131
131
|
/**
|
|
132
132
|
* Disabled since it is common in the TypeScript ecosystem to use both function forms, depending
|
|
133
133
|
* on the situation.
|
|
134
134
|
*/
|
|
135
135
|
"func-style": "off",
|
|
136
|
-
"grouped-accessor-pairs": "
|
|
136
|
+
"grouped-accessor-pairs": "error",
|
|
137
137
|
/** Superseded by the `complete/no-for-in` rule. */
|
|
138
138
|
"guard-for-in": "off",
|
|
139
139
|
/** Disabled since it is expected to be configured with project-specific keywords. */
|
|
@@ -149,13 +149,13 @@ const SUGGESTIONS = {
|
|
|
149
149
|
"init-declarations": "off",
|
|
150
150
|
/** The `enforceForIfStatements` option is enabled to make the rule stricter. */
|
|
151
151
|
"logical-assignment-operators": [
|
|
152
|
-
"
|
|
152
|
+
"error",
|
|
153
153
|
"always",
|
|
154
154
|
{
|
|
155
155
|
enforceForIfStatements: true,
|
|
156
156
|
},
|
|
157
157
|
],
|
|
158
|
-
"max-classes-per-file": "
|
|
158
|
+
"max-classes-per-file": "error",
|
|
159
159
|
/** Disabled since this rule is too prescriptive for general-purpose use. */
|
|
160
160
|
"max-depth": "off",
|
|
161
161
|
/**
|
|
@@ -168,7 +168,7 @@ const SUGGESTIONS = {
|
|
|
168
168
|
* provide much value.
|
|
169
169
|
*/
|
|
170
170
|
"max-lines-per-function": "off",
|
|
171
|
-
"max-nested-callbacks": "
|
|
171
|
+
"max-nested-callbacks": "error",
|
|
172
172
|
/** Superseded by the `@typescript-eslint/max-params` rule. */
|
|
173
173
|
"max-params": "off",
|
|
174
174
|
/**
|
|
@@ -176,13 +176,13 @@ const SUGGESTIONS = {
|
|
|
176
176
|
* does not provide much value.
|
|
177
177
|
*/
|
|
178
178
|
"max-statements": "off",
|
|
179
|
-
"new-cap": "
|
|
180
|
-
"no-alert": "
|
|
179
|
+
"new-cap": "error",
|
|
180
|
+
"no-alert": "error",
|
|
181
181
|
/** Superseded by the `@typescript-eslint/no-array-constructor` rule. */
|
|
182
182
|
"no-array-constructor": "off",
|
|
183
|
-
"no-bitwise": "
|
|
184
|
-
"no-caller": "
|
|
185
|
-
"no-case-declarations": "
|
|
183
|
+
"no-bitwise": "error",
|
|
184
|
+
"no-caller": "error",
|
|
185
|
+
"no-case-declarations": "error",
|
|
186
186
|
/**
|
|
187
187
|
* Disabled because command-line programs written in TypeScript commonly write to standard out and
|
|
188
188
|
* standard error.
|
|
@@ -194,65 +194,65 @@ const SUGGESTIONS = {
|
|
|
194
194
|
* pattern](https://medium.com/swlh/return-early-pattern-3d18a41bba8).
|
|
195
195
|
*/
|
|
196
196
|
"no-continue": "off",
|
|
197
|
-
"no-delete-var": "
|
|
197
|
+
"no-delete-var": "error",
|
|
198
198
|
/** Disabled since it is incompatible with the `unicorn/better-regex` rule. */
|
|
199
199
|
"no-div-regex": "off",
|
|
200
200
|
/** The `allowElseIf` option is disabled to make the rule stricter. */
|
|
201
201
|
"no-else-return": [
|
|
202
|
-
"
|
|
202
|
+
"error",
|
|
203
203
|
{
|
|
204
204
|
allowElseIf: false,
|
|
205
205
|
},
|
|
206
206
|
],
|
|
207
|
-
"no-empty": "
|
|
207
|
+
"no-empty": "error",
|
|
208
208
|
/** Superseded by the `@typescript-eslint/no-empty-function` rule. */
|
|
209
209
|
"no-empty-function": "off",
|
|
210
|
-
"no-empty-static-block": "
|
|
211
|
-
"no-eq-null": "
|
|
212
|
-
"no-eval": "
|
|
213
|
-
"no-extend-native": "
|
|
214
|
-
"no-extra-bind": "
|
|
215
|
-
"no-extra-boolean-cast": "
|
|
216
|
-
"no-extra-label": "
|
|
217
|
-
"no-global-assign": "
|
|
218
|
-
"no-implicit-coercion": "
|
|
219
|
-
"no-implicit-globals": "
|
|
210
|
+
"no-empty-static-block": "error",
|
|
211
|
+
"no-eq-null": "error",
|
|
212
|
+
"no-eval": "error",
|
|
213
|
+
"no-extend-native": "error",
|
|
214
|
+
"no-extra-bind": "error",
|
|
215
|
+
"no-extra-boolean-cast": "error",
|
|
216
|
+
"no-extra-label": "error",
|
|
217
|
+
"no-global-assign": "error",
|
|
218
|
+
"no-implicit-coercion": "error",
|
|
219
|
+
"no-implicit-globals": "error",
|
|
220
220
|
/** Superseded by the `@typescript-eslint/no-implied-eval` rule. */
|
|
221
221
|
"no-implied-eval": "off",
|
|
222
222
|
/** Disabled because inline comments are common in the TypeScript ecosystem. */
|
|
223
223
|
"no-inline-comments": "off",
|
|
224
224
|
/** Superseded by the `@typescript-eslint/no-invalid-this` rule. */
|
|
225
225
|
"no-invalid-this": "off",
|
|
226
|
-
"no-iterator": "
|
|
227
|
-
"no-label-var": "
|
|
228
|
-
"no-labels": "
|
|
229
|
-
"no-lone-blocks": "
|
|
230
|
-
"no-lonely-if": "
|
|
226
|
+
"no-iterator": "error",
|
|
227
|
+
"no-label-var": "error",
|
|
228
|
+
"no-labels": "error",
|
|
229
|
+
"no-lone-blocks": "error",
|
|
230
|
+
"no-lonely-if": "error",
|
|
231
231
|
/** Superseded by the `@typescript-eslint/no-loop-func` rule. */
|
|
232
232
|
"no-loop-func": "off",
|
|
233
233
|
/** Superseded by the `@typescript-eslint/no-magic-numbers` rule. */
|
|
234
234
|
"no-magic-numbers": "off",
|
|
235
|
-
"no-multi-assign": "
|
|
236
|
-
"no-multi-str": "
|
|
235
|
+
"no-multi-assign": "error",
|
|
236
|
+
"no-multi-str": "error",
|
|
237
237
|
/** Superseded by the `unicorn/no-negated-condition` rule. */
|
|
238
238
|
"no-negated-condition": "off",
|
|
239
239
|
/**
|
|
240
240
|
* `unicorn/no-nested-ternary` is a modified version of this rule but that version is less strict.
|
|
241
241
|
*/
|
|
242
|
-
"no-nested-ternary": "
|
|
243
|
-
"no-new": "
|
|
244
|
-
"no-new-func": "
|
|
245
|
-
"no-new-wrappers": "
|
|
246
|
-
"no-nonoctal-decimal-escape": "
|
|
247
|
-
"no-object-constructor": "
|
|
248
|
-
"no-octal": "
|
|
249
|
-
"no-octal-escape": "
|
|
242
|
+
"no-nested-ternary": "error",
|
|
243
|
+
"no-new": "error",
|
|
244
|
+
"no-new-func": "error",
|
|
245
|
+
"no-new-wrappers": "error",
|
|
246
|
+
"no-nonoctal-decimal-escape": "error",
|
|
247
|
+
"no-object-constructor": "error",
|
|
248
|
+
"no-octal": "error",
|
|
249
|
+
"no-octal-escape": "error",
|
|
250
250
|
/**
|
|
251
251
|
* The options are [copied from
|
|
252
252
|
* Airbnb](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/best-practices.js).
|
|
253
253
|
*/
|
|
254
254
|
"no-param-reassign": [
|
|
255
|
-
"
|
|
255
|
+
"error",
|
|
256
256
|
{
|
|
257
257
|
props: true,
|
|
258
258
|
ignorePropertyModificationsFor: [
|
|
@@ -275,16 +275,16 @@ const SUGGESTIONS = {
|
|
|
275
275
|
* errors with minified code, but Prettier adds semicolons automatically.)
|
|
276
276
|
*/
|
|
277
277
|
"no-plusplus": "off",
|
|
278
|
-
"no-proto": "
|
|
278
|
+
"no-proto": "error",
|
|
279
279
|
/** Superseded by the `@typescript-eslint/block-spacing` rule. */
|
|
280
280
|
"no-redeclare": "off",
|
|
281
|
-
"no-regex-spaces": "
|
|
281
|
+
"no-regex-spaces": "error",
|
|
282
282
|
/**
|
|
283
283
|
* The options are [copied from
|
|
284
284
|
* Airbnb](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/es6.js).
|
|
285
285
|
*/
|
|
286
286
|
"no-restricted-exports": [
|
|
287
|
-
"
|
|
287
|
+
"error",
|
|
288
288
|
{
|
|
289
289
|
restrictedNamedExports: [
|
|
290
290
|
"default", // use `export default` to provide a default export
|
|
@@ -297,7 +297,7 @@ const SUGGESTIONS = {
|
|
|
297
297
|
* Airbnb](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/variables.js).
|
|
298
298
|
*/
|
|
299
299
|
"no-restricted-globals": [
|
|
300
|
-
"
|
|
300
|
+
"error",
|
|
301
301
|
{
|
|
302
302
|
name: "isFinite",
|
|
303
303
|
message: "Use Number.isFinite instead: https://github.com/airbnb/javascript#standard-library--isfinite",
|
|
@@ -315,7 +315,7 @@ const SUGGESTIONS = {
|
|
|
315
315
|
* Airbnb](https://github.com/airbnb/javascript/blob/master/packages/eslint-config-airbnb-base/rules/best-practices.js).
|
|
316
316
|
*/
|
|
317
317
|
"no-restricted-properties": [
|
|
318
|
-
"
|
|
318
|
+
"error",
|
|
319
319
|
{
|
|
320
320
|
object: "arguments",
|
|
321
321
|
property: "callee",
|
|
@@ -368,8 +368,8 @@ const SUGGESTIONS = {
|
|
|
368
368
|
/** Disabled because it is intended for disallowing specific language features per-project. */
|
|
369
369
|
"no-restricted-syntax": "off",
|
|
370
370
|
/** The `always` option is provided to make the rule stricter. */
|
|
371
|
-
"no-return-assign": ["
|
|
372
|
-
"no-script-url": "
|
|
371
|
+
"no-return-assign": ["error", "always"],
|
|
372
|
+
"no-script-url": "error",
|
|
373
373
|
/**
|
|
374
374
|
* Disabled because [it can conflict with
|
|
375
375
|
* Prettier](https://github.com/prettier/eslint-config-prettier/tree/main#no-sequences).
|
|
@@ -377,7 +377,7 @@ const SUGGESTIONS = {
|
|
|
377
377
|
"no-sequences": "off",
|
|
378
378
|
/** Superseded by the `@typescript-eslint/no-shadow` rule. */
|
|
379
379
|
"no-shadow": "off",
|
|
380
|
-
"no-shadow-restricted-names": "
|
|
380
|
+
"no-shadow-restricted-names": "error",
|
|
381
381
|
/**
|
|
382
382
|
* Disabled because ternaries are common in the TypeScript ecosystem and can often lead to concise
|
|
383
383
|
* code that is easy to read.
|
|
@@ -385,7 +385,7 @@ const SUGGESTIONS = {
|
|
|
385
385
|
"no-ternary": "off",
|
|
386
386
|
/** Superseded by the `@typescript-eslint/no-throw-literal` rule. */
|
|
387
387
|
"no-throw-literal": "off",
|
|
388
|
-
"no-undef-init": "
|
|
388
|
+
"no-undef-init": "error",
|
|
389
389
|
/**
|
|
390
390
|
* Disabled because in TypeScript, it is common to explicitly check for undefined for the purposes
|
|
391
391
|
* of type narrowing.
|
|
@@ -398,41 +398,41 @@ const SUGGESTIONS = {
|
|
|
398
398
|
"no-underscore-dangle": "off",
|
|
399
399
|
/** The `defaultAssignment` option is disabled to make the rule stricter. */
|
|
400
400
|
"no-unneeded-ternary": [
|
|
401
|
-
"
|
|
401
|
+
"error",
|
|
402
402
|
{
|
|
403
403
|
defaultAssignment: false,
|
|
404
404
|
},
|
|
405
405
|
],
|
|
406
406
|
/** Superseded by the `@typescript-eslint/no-unused-expressions` rule. */
|
|
407
407
|
"no-unused-expressions": "off",
|
|
408
|
-
"no-unused-labels": "
|
|
409
|
-
"no-useless-assignment": "
|
|
410
|
-
"no-useless-call": "
|
|
411
|
-
"no-useless-catch": "
|
|
408
|
+
"no-unused-labels": "error",
|
|
409
|
+
"no-useless-assignment": "error",
|
|
410
|
+
"no-useless-call": "error",
|
|
411
|
+
"no-useless-catch": "error",
|
|
412
412
|
/** The `enforceForClassMembers` option is enabled to make the rule stricter. */
|
|
413
413
|
"no-useless-computed-key": [
|
|
414
|
-
"
|
|
414
|
+
"error",
|
|
415
415
|
{
|
|
416
416
|
enforceForClassMembers: true,
|
|
417
417
|
},
|
|
418
418
|
],
|
|
419
|
-
"no-useless-concat": "
|
|
419
|
+
"no-useless-concat": "error",
|
|
420
420
|
/** Superseded by the `@typescript-eslint/no-useless-constructor` rule. */
|
|
421
421
|
"no-useless-constructor": "off",
|
|
422
|
-
"no-useless-escape": "
|
|
423
|
-
"no-useless-rename": "
|
|
422
|
+
"no-useless-escape": "error",
|
|
423
|
+
"no-useless-rename": "error",
|
|
424
424
|
/**
|
|
425
425
|
* Superseded by the `complete/no-useless-return` rule (since the auto-fix is usually unwanted).
|
|
426
426
|
*/
|
|
427
427
|
"no-useless-return": "off",
|
|
428
|
-
"no-var": "
|
|
429
|
-
"no-void": "
|
|
428
|
+
"no-var": "error",
|
|
429
|
+
"no-void": "error",
|
|
430
430
|
/** Superseded by the `unicorn/expiring-todo-comments` rule. */
|
|
431
431
|
"no-warning-comments": "off",
|
|
432
|
-
"no-with": "
|
|
432
|
+
"no-with": "error",
|
|
433
433
|
/** The `ignoreConstructors` option is disabled to make the rule stricter. */
|
|
434
434
|
"object-shorthand": [
|
|
435
|
-
"
|
|
435
|
+
"error",
|
|
436
436
|
"always",
|
|
437
437
|
{
|
|
438
438
|
ignoreConstructors: false,
|
|
@@ -442,36 +442,36 @@ const SUGGESTIONS = {
|
|
|
442
442
|
* The `never` option is provided to disallow multi-variable declarations (since they can be
|
|
443
443
|
* confusing).
|
|
444
444
|
*/
|
|
445
|
-
"one-var": ["
|
|
446
|
-
"operator-assignment": "
|
|
447
|
-
"prefer-arrow-callback": "
|
|
445
|
+
"one-var": ["error", "never"],
|
|
446
|
+
"operator-assignment": "error",
|
|
447
|
+
"prefer-arrow-callback": "error",
|
|
448
448
|
/** Superseded by the `complete/prefer-const` rule (since the auto-fix is usually unwanted). */
|
|
449
449
|
"prefer-const": "off",
|
|
450
450
|
/** Superseded by the `@typescript-eslint/prefer-destructuring` rule. */
|
|
451
451
|
"prefer-destructuring": "off",
|
|
452
|
-
"prefer-exponentiation-operator": "
|
|
452
|
+
"prefer-exponentiation-operator": "error",
|
|
453
453
|
/**
|
|
454
454
|
* Disabled because it is common to have a regex with only a single match, in which case a named
|
|
455
455
|
* capture group can be needlessly verbose (and cause extra type narrowing).
|
|
456
456
|
*/
|
|
457
457
|
"prefer-named-capture-group": "off",
|
|
458
|
-
"prefer-numeric-literals": "
|
|
459
|
-
"prefer-object-has-own": "
|
|
460
|
-
"prefer-object-spread": "
|
|
458
|
+
"prefer-numeric-literals": "error",
|
|
459
|
+
"prefer-object-has-own": "error",
|
|
460
|
+
"prefer-object-spread": "error",
|
|
461
461
|
/** Superseded by the `@typescript-eslint/prefer-promise-reject-errors` rule. */
|
|
462
462
|
"prefer-promise-reject-errors": "off",
|
|
463
463
|
/** The `disallowRedundantWrapping` option is enabled to make the rule stricter. */
|
|
464
464
|
"prefer-regex-literals": [
|
|
465
|
-
"
|
|
465
|
+
"error",
|
|
466
466
|
{
|
|
467
467
|
disallowRedundantWrapping: true,
|
|
468
468
|
},
|
|
469
469
|
],
|
|
470
|
-
"prefer-rest-params": "
|
|
471
|
-
"prefer-spread": "
|
|
472
|
-
"prefer-template": "
|
|
473
|
-
"preserve-caught-error": "
|
|
474
|
-
radix: "
|
|
470
|
+
"prefer-rest-params": "error",
|
|
471
|
+
"prefer-spread": "error",
|
|
472
|
+
"prefer-template": "error",
|
|
473
|
+
"preserve-caught-error": "error",
|
|
474
|
+
radix: "error",
|
|
475
475
|
/** Superseded by the `@typescript-eslint/require-await` rule. */
|
|
476
476
|
"require-await": "off",
|
|
477
477
|
/**
|
|
@@ -480,7 +480,7 @@ const SUGGESTIONS = {
|
|
|
480
480
|
* the verbosity.)
|
|
481
481
|
*/
|
|
482
482
|
"require-unicode-regexp": "off",
|
|
483
|
-
"require-yield": "
|
|
483
|
+
"require-yield": "error",
|
|
484
484
|
/** Disabled since this is automatically handled by `prettier-plugin-organize-imports`. */
|
|
485
485
|
"sort-imports": "off",
|
|
486
486
|
/** Disabled because object keys are often not meant to be sorted in alphabetical order. */
|
|
@@ -490,17 +490,17 @@ const SUGGESTIONS = {
|
|
|
490
490
|
*/
|
|
491
491
|
"sort-vars": "off",
|
|
492
492
|
/** The `never` option is provided to make the rule stricter. */
|
|
493
|
-
strict: ["
|
|
494
|
-
"symbol-description": "
|
|
495
|
-
"vars-on-top": "
|
|
496
|
-
yoda: "
|
|
493
|
+
strict: ["error", "never"],
|
|
494
|
+
"symbol-description": "error",
|
|
495
|
+
"vars-on-top": "error",
|
|
496
|
+
yoda: "error",
|
|
497
497
|
};
|
|
498
498
|
/**
|
|
499
499
|
* @type {Record<string, import("@typescript-eslint/utils").TSESLint.SharedConfig.RuleEntry>}
|
|
500
500
|
* @see https://eslint.org/docs/latest/rules/#suggestions
|
|
501
501
|
*/
|
|
502
502
|
const LAYOUT_AND_FORMATTING = {
|
|
503
|
-
"unicode-bom": "
|
|
503
|
+
"unicode-bom": "error",
|
|
504
504
|
};
|
|
505
505
|
/**
|
|
506
506
|
* This ESLint config only contains built-in rules from ESLint itself:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-import-x.d.ts","sourceRoot":"","sources":["../../src/base/base-import-x.js"],"names":[],"mappings":"AA+NA;;;;;;;;;GASG;AACH,
|
|
1
|
+
{"version":3,"file":"base-import-x.d.ts","sourceRoot":"","sources":["../../src/base/base-import-x.js"],"names":[],"mappings":"AA+NA;;;;;;;;;GASG;AACH,2DAuFE"}
|