eslint-config-complete 4.8.0 → 4.10.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.
@@ -1 +1 @@
1
- {"version":3,"file":"base-eslint.d.ts","sourceRoot":"","sources":["../../../src/base/base-eslint.js"],"names":[],"mappings":"AA2pBA;;;;;;;;GAQG;AACH,0DAMG"}
1
+ {"version":3,"file":"base-eslint.d.ts","sourceRoot":"","sources":["../../../src/base/base-eslint.js"],"names":[],"mappings":"AAypBA;;;;;;;;GAQG;AACH,0DAMG"}
@@ -213,8 +213,7 @@ const SUGGESTIONS = {
213
213
  */
214
214
  "no-continue": "off",
215
215
  "no-delete-var": "error",
216
- /** Disabled since it is incompatible with the `unicorn/better-regex` rule. */
217
- "no-div-regex": "off",
216
+ "no-div-regex": "error",
218
217
  /** The `allowElseIf` option is disabled to make the rule stricter. */
219
218
  "no-else-return": [
220
219
  "error",
@@ -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,2DAsFE"}
1
+ {"version":3,"file":"base-import-x.d.ts","sourceRoot":"","sources":["../../../src/base/base-import-x.js"],"names":[],"mappings":"AA4NA;;;;;;;;;GASG;AACH,2DAsFE"}
@@ -25,9 +25,9 @@ const HELPFUL_WARNINGS = {
25
25
  "test.{js,jsx}", // repos with a single test file
26
26
  "test-*.{js,jsx}", // repos with multiple top-level test files
27
27
  "**/*{.,_}{test,spec}.{js,jsx}", // tests where the extension or filename suffix denotes that it is a test
28
- "**/gulpfile.js", // gulp config
29
- "**/gulpfile.*.js", // gulp config
30
- "**/Gruntfile{,.js}", // grunt config
28
+ "**/gulpfile.js", // Gulp config
29
+ "**/gulpfile.*.js", // Gulp config
30
+ "**/Gruntfile{,.js}", // Grunt config
31
31
  "**/protractor.conf.js", // protractor config
32
32
  "**/protractor.conf.*.js", // protractor config
33
33
  "**/karma.conf.js", // karma config
@@ -128,8 +128,6 @@ const STYLE_GUIDE = {
128
128
  "import-x/first": "error",
129
129
  /** Disabled because this style is not generally used. */
130
130
  "import-x/group-exports": "off",
131
- /** Disabled because this rule is deprecated. */
132
- "import-x/imports-first": "off",
133
131
  /** Disabled since it will trigger false positives in codebases that prefer smaller files. */
134
132
  "import-x/max-dependencies": "off",
135
133
  "import-x/newline-after-import": "error",
@@ -138,15 +138,6 @@ export const baseJSDoc = defineConfig({
138
138
  "jsdoc/require-jsdoc": "off",
139
139
  "jsdoc/require-next-description": "error",
140
140
  "jsdoc/require-next-type": "error",
141
- "jsdoc/require-template-description": "error",
142
- "jsdoc/require-throws-description": "error",
143
- /**
144
- * Disabled since in most cases, the type of a thrown error will simply be `Error`, making the
145
- * annotation superfluous.
146
- */
147
- "jsdoc/require-throws-type": "off",
148
- "jsdoc/require-yields-description": "error",
149
- "jsdoc/require-yields-type": "error",
150
141
  /** Configured to only apply when there are one or more parameters. */
151
142
  "jsdoc/require-param": [
152
143
  "error",
@@ -200,12 +191,21 @@ export const baseJSDoc = defineConfig({
200
191
  "jsdoc/require-tags": "off",
201
192
  /** Disabled because it is overboard to document every generic type variable. */
202
193
  "jsdoc/require-template": "off",
194
+ "jsdoc/require-template-description": "error",
203
195
  /** Disabled because it is overboard to document every throw statement. */
204
196
  "jsdoc/require-throws": "off",
197
+ "jsdoc/require-throws-description": "error",
198
+ /**
199
+ * Disabled since in most cases, the type of a thrown error will simply be `Error`, making the
200
+ * annotation superfluous.
201
+ */
202
+ "jsdoc/require-throws-type": "off",
205
203
  /** Disabled because it is overboard to document every yield. */
206
204
  "jsdoc/require-yields": "off",
207
205
  /** Disabled because it is overboard to document every yield. */
208
206
  "jsdoc/require-yields-check": "off",
207
+ "jsdoc/require-yields-description": "error",
208
+ "jsdoc/require-yields-type": "error",
209
209
  "jsdoc/sort-tags": "error",
210
210
  /** Superseded by the `complete/format-jsdoc-comments` rule. */
211
211
  "jsdoc/tag-lines": "off",
@@ -1 +1 @@
1
- {"version":3,"file":"base-n.d.ts","sourceRoot":"","sources":["../../../src/base/base-n.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,qDA2IG"}
1
+ {"version":3,"file":"base-n.d.ts","sourceRoot":"","sources":["../../../src/base/base-n.js"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,qDAqIG"}
@@ -34,8 +34,6 @@ export const baseN = defineConfig({
34
34
  "n/no-extraneous-import": "off",
35
35
  /** Disabled since require statements are not used in TypeScript code. */
36
36
  "n/no-extraneous-require": "off",
37
- /** Disabled because this rule is deprecated. */
38
- "n/no-hide-core-modules": "off",
39
37
  /** Disabled since it is handled by the TypeScript compiler. */
40
38
  "n/no-missing-import": "off",
41
39
  /** Disabled since it is handled by the TypeScript compiler. */
@@ -47,8 +45,8 @@ export const baseN = defineConfig({
47
45
  /** Disabled since stylistic rules from this plugin are not used. */
48
46
  "n/no-process-env": "off",
49
47
  /**
50
- * Disabled because using `process.exit` is common to exit command-line applications without
51
- * verbose output.
48
+ * Disabled because using `process.exit` is common to exit command-line apps without verbose
49
+ * output.
52
50
  */
53
51
  "n/no-process-exit": "off",
54
52
  /** Disabled since stylistic rules from this plugin are not used. */
@@ -101,7 +99,5 @@ export const baseN = defineConfig({
101
99
  /** Disabled since stylistic rules from this plugin are not used. */
102
100
  "n/prefer-promises/fs": "off",
103
101
  "n/process-exit-as-throw": "error",
104
- /** Superseded by the `n/hashbang` rule. */
105
- "n/shebang": "off",
106
102
  },
107
103
  });
@@ -9,6 +9,7 @@ export const basePerfectionist = defineConfig({
9
9
  perfectionist: esLintPluginPerfectionist,
10
10
  },
11
11
  rules: {
12
+ "perfectionist/sort-array-includes": "error",
12
13
  /** This rule is only enabled for `ReadonlySet` constructors. */
13
14
  "perfectionist/sort-arrays": [
14
15
  "error",
@@ -18,7 +19,6 @@ export const basePerfectionist = defineConfig({
18
19
  },
19
20
  },
20
21
  ],
21
- "perfectionist/sort-array-includes": "error",
22
22
  /** Disabled because class member ordering can be semantically significant. */
23
23
  "perfectionist/sort-classes": "off",
24
24
  /** Disabled because decorator ordering can be semantically significant. */
@@ -0,0 +1,6 @@
1
+ /**
2
+ * This ESLint config only contains rules from `eslint-plugin-regexp`:
3
+ * https://github.com/ota-meshi/eslint-plugin-regexp
4
+ */
5
+ export const baseRegexp: import("eslint/config").Config[];
6
+ //# sourceMappingURL=base-regexp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base-regexp.d.ts","sourceRoot":"","sources":["../../../src/base/base-regexp.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,0DA4FG"}
@@ -0,0 +1,96 @@
1
+ import esLintPluginRegexp from "eslint-plugin-regexp";
2
+ import { defineConfig } from "eslint/config";
3
+ /**
4
+ * This ESLint config only contains rules from `eslint-plugin-regexp`:
5
+ * https://github.com/ota-meshi/eslint-plugin-regexp
6
+ */
7
+ export const baseRegexp = defineConfig({
8
+ plugins: {
9
+ regexp: esLintPluginRegexp,
10
+ },
11
+ rules: {
12
+ "regexp/confusing-quantifier": "error",
13
+ "regexp/control-character-escape": "error",
14
+ "regexp/grapheme-string-literal": "error",
15
+ "regexp/hexadecimal-escape": "error",
16
+ /** Disabled since it conflicts with the `unicorn/escape-case` rule. */
17
+ "regexp/letter-case": "off",
18
+ "regexp/match-any": "error",
19
+ "regexp/negation": "error",
20
+ "regexp/no-contradiction-with-assertion": "error",
21
+ "regexp/no-control-character": "error",
22
+ "regexp/no-dupe-characters-character-class": "error",
23
+ "regexp/no-dupe-disjunctions": "error",
24
+ "regexp/no-empty-alternative": "error",
25
+ "regexp/no-empty-capturing-group": "error",
26
+ "regexp/no-empty-character-class": "error",
27
+ "regexp/no-empty-group": "error",
28
+ "regexp/no-empty-lookarounds-assertion": "error",
29
+ "regexp/no-empty-string-literal": "error",
30
+ "regexp/no-escape-backspace": "error",
31
+ "regexp/no-extra-lookaround-assertions": "error",
32
+ "regexp/no-invalid-regexp": "error",
33
+ "regexp/no-invisible-character": "error",
34
+ "regexp/no-lazy-ends": "error",
35
+ "regexp/no-legacy-features": "error",
36
+ "regexp/no-misleading-capturing-group": "error",
37
+ "regexp/no-misleading-unicode-character": "error",
38
+ "regexp/no-missing-g-flag": "error",
39
+ "regexp/no-non-standard-flag": "error",
40
+ "regexp/no-obscure-range": "error",
41
+ "regexp/no-octal": "error",
42
+ "regexp/no-optional-assertion": "error",
43
+ "regexp/no-potentially-useless-backreference": "error",
44
+ "regexp/no-standalone-backslash": "error",
45
+ "regexp/no-super-linear-backtracking": "error",
46
+ "regexp/no-super-linear-move": "error",
47
+ "regexp/no-trivially-nested-assertion": "error",
48
+ "regexp/no-trivially-nested-quantifier": "error",
49
+ "regexp/no-unused-capturing-group": "error",
50
+ "regexp/no-useless-assertions": "error",
51
+ "regexp/no-useless-backreference": "error",
52
+ "regexp/no-useless-character-class": "error",
53
+ "regexp/no-useless-dollar-replacements": "error",
54
+ "regexp/no-useless-escape": "error",
55
+ "regexp/no-useless-flag": "error",
56
+ "regexp/no-useless-lazy": "error",
57
+ "regexp/no-useless-non-capturing-group": "error",
58
+ "regexp/no-useless-quantifier": "error",
59
+ "regexp/no-useless-range": "error",
60
+ "regexp/no-useless-set-operand": "error",
61
+ "regexp/no-useless-string-literal": "error",
62
+ "regexp/no-useless-two-nums-quantifier": "error",
63
+ "regexp/no-zero-quantifier": "error",
64
+ "regexp/optimal-lookaround-quantifier": "error",
65
+ "regexp/optimal-quantifier-concatenation": "error",
66
+ "regexp/prefer-character-class": "error",
67
+ "regexp/prefer-d": "error",
68
+ "regexp/prefer-escape-replacement-dollar-char": "error",
69
+ "regexp/prefer-lookaround": "error",
70
+ "regexp/prefer-named-backreference": "error",
71
+ "regexp/prefer-named-capture-group": "error",
72
+ "regexp/prefer-named-replacement": "error",
73
+ "regexp/prefer-plus-quantifier": "error",
74
+ "regexp/prefer-predefined-assertion": "error",
75
+ "regexp/prefer-quantifier": "error",
76
+ "regexp/prefer-question-quantifier": "error",
77
+ "regexp/prefer-range": "error",
78
+ "regexp/prefer-regexp-exec": "error",
79
+ "regexp/prefer-regexp-test": "error",
80
+ "regexp/prefer-result-array-groups": "error",
81
+ "regexp/prefer-set-operation": "error",
82
+ "regexp/prefer-star-quantifier": "error",
83
+ "regexp/prefer-unicode-codepoint-escapes": "error",
84
+ "regexp/prefer-w": "error",
85
+ "regexp/require-unicode-regexp": "error",
86
+ "regexp/require-unicode-sets-regexp": "error",
87
+ "regexp/simplify-set-operations": "error",
88
+ "regexp/sort-alternatives": "error",
89
+ "regexp/sort-character-class-elements": "error",
90
+ "regexp/sort-flags": "error",
91
+ "regexp/strict": "error",
92
+ "regexp/unicode-escape": "error",
93
+ "regexp/unicode-property": "error",
94
+ "regexp/use-ignore-case": "error",
95
+ },
96
+ });
@@ -1 +1 @@
1
- {"version":3,"file":"base-unicorn.d.ts","sourceRoot":"","sources":["../../../src/base/base-unicorn.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,2DA0MG"}
1
+ {"version":3,"file":"base-unicorn.d.ts","sourceRoot":"","sources":["../../../src/base/base-unicorn.js"],"names":[],"mappings":"AAGA;;;GAGG;AACH,2DAyVG"}
@@ -9,106 +9,183 @@ export const baseUnicorn = defineConfig({
9
9
  unicorn: esLintPluginUnicorn,
10
10
  },
11
11
  rules: {
12
- "unicorn/better-regex": "error",
12
+ "unicorn/better-dom-traversing": "error",
13
13
  "unicorn/catch-error-name": "error",
14
+ "unicorn/class-reference-in-static-methods": "error",
15
+ "unicorn/comment-content": "error",
14
16
  "unicorn/consistent-assert": "error",
17
+ /** Disabled because it is too strict. */
18
+ "unicorn/consistent-boolean-name": "off",
19
+ "unicorn/consistent-class-member-order": "error",
20
+ "unicorn/consistent-compound-words": "error",
15
21
  "unicorn/consistent-date-clone": "error",
16
22
  /** Disabled because it has too many false positives. */
17
23
  "unicorn/consistent-destructuring": "off",
18
24
  "unicorn/consistent-empty-array-spread": "error",
19
25
  "unicorn/consistent-existence-index-check": "error",
26
+ "unicorn/consistent-export-decorator-position": "error",
20
27
  "unicorn/consistent-function-scoping": "error",
28
+ "unicorn/consistent-function-style": "error",
29
+ "unicorn/consistent-json-file-read": "error",
30
+ "unicorn/consistent-optional-chaining": "error",
21
31
  "unicorn/consistent-template-literal-escape": "error",
22
32
  "unicorn/custom-error-definition": "error",
33
+ "unicorn/dom-node-dataset": "error",
23
34
  "unicorn/empty-brace-spaces": "off", // eslint-config-prettier
24
35
  "unicorn/error-message": "error",
25
36
  "unicorn/escape-case": "error",
26
37
  "unicorn/expiring-todo-comments": "error",
27
38
  "unicorn/explicit-length-check": "error",
39
+ "unicorn/explicit-timer-delay": "error",
28
40
  /** Disabled since projects may use different file naming conventions. */
29
41
  "unicorn/filename-case": "off",
42
+ "unicorn/id-match": "error",
30
43
  "unicorn/import-style": "error",
31
44
  "unicorn/isolated-functions": "error",
45
+ "unicorn/logical-assignment-operators": "error",
46
+ "unicorn/max-nested-calls": "error",
32
47
  "unicorn/new-for-builtins": "error",
33
48
  /**
34
49
  * Disabled because if a line breaks three or more ESLint rules, then it is useful to use a
35
50
  * single "eslint-disable" comment to make things more concise.
36
51
  */
37
52
  "unicorn/no-abusive-eslint-disable": "off",
38
- "unicorn/no-array-sort": "error",
39
53
  "unicorn/no-accessor-recursion": "error",
40
54
  "unicorn/no-anonymous-default-export": "error",
41
55
  /** Disabled since it is not helpful when using TypeScript. */
42
56
  "unicorn/no-array-callback-reference": "off",
43
- "unicorn/no-array-for-each": "error",
57
+ "unicorn/no-array-fill-with-reference-type": "error",
58
+ "unicorn/no-array-from-fill": "error",
44
59
  "unicorn/no-array-method-this-argument": "error",
45
- "unicorn/no-array-push-push": "error",
46
60
  "unicorn/no-array-reduce": "error",
47
61
  "unicorn/no-array-reverse": "error",
62
+ "unicorn/no-array-sort": "error",
63
+ "unicorn/no-array-splice": "error",
64
+ /** Disabled because this goes against the standard JSDoc format. */
65
+ "unicorn/no-asterisk-prefix-in-documentation-comments": "off",
48
66
  "unicorn/no-await-expression-member": "error",
49
67
  "unicorn/no-await-in-promise-methods": "error",
68
+ "unicorn/no-blob-to-file": "error",
69
+ /** Disabled since simple double nested loops are common. */
70
+ "unicorn/no-break-in-nested-loop": "off",
71
+ "unicorn/no-canvas-to-image": "error",
72
+ /** Disabled since it is unnecessary with TypeScript objects that are properly typed. */
73
+ "unicorn/no-computed-property-existence-check": "off",
74
+ "unicorn/no-confusing-array-splice": "error",
75
+ "unicorn/no-confusing-array-with": "error",
50
76
  "unicorn/no-console-spaces": "error",
77
+ "unicorn/no-declarations-before-early-exit": "error",
51
78
  "unicorn/no-document-cookie": "error",
79
+ "unicorn/no-duplicate-loops": "error",
80
+ "unicorn/no-duplicate-set-values": "error",
52
81
  "unicorn/no-empty-file": "error",
82
+ "unicorn/no-error-property-assignment": "error",
83
+ "unicorn/no-exports-in-scripts": "error",
84
+ "unicorn/no-for-each": "error",
53
85
  "unicorn/no-for-loop": "error",
54
- "unicorn/no-hex-escape": "error",
86
+ "unicorn/no-global-object-property-assignment": "error",
55
87
  "unicorn/no-immediate-mutation": "error",
56
- "unicorn/no-instanceof-array": "error",
88
+ "unicorn/no-incorrect-query-selector": "error",
89
+ "unicorn/no-incorrect-template-string-interpolation": "error",
57
90
  "unicorn/no-instanceof-builtins": "error",
91
+ "unicorn/no-invalid-argument-count": "error",
58
92
  "unicorn/no-invalid-fetch-options": "error",
93
+ "unicorn/no-invalid-file-input-accept": "error",
59
94
  "unicorn/no-invalid-remove-event-listener": "error",
60
95
  /** Disabled because it is common to prefix variables with "new". */
61
96
  "unicorn/no-keyword-prefix": "off",
62
- "unicorn/no-length-as-slice-end": "error",
97
+ "unicorn/no-late-current-target-access": "error",
63
98
  "unicorn/no-lonely-if": "error",
64
99
  "unicorn/no-magic-array-flat-depth": "error",
100
+ /** Superseded by the `complete/format-line-comments` rule. */
101
+ "unicorn/no-manually-wrapped-comments": "off",
102
+ "unicorn/no-mismatched-map-key": "error",
103
+ "unicorn/no-named-default": "error",
104
+ "unicorn/no-negated-array-predicate": "error",
105
+ "unicorn/no-negated-comparison": "error",
65
106
  "unicorn/no-negated-condition": "error",
66
107
  "unicorn/no-negation-in-equality-check": "error",
67
108
  "unicorn/no-nested-ternary": "off", // eslint-config-prettier
68
109
  "unicorn/no-new-array": "error",
69
110
  "unicorn/no-new-buffer": "error",
70
- "unicorn/no-named-default": "error",
111
+ "unicorn/no-non-function-verb-prefix": "error",
71
112
  "unicorn/no-null": "error",
72
113
  "unicorn/no-object-as-default-parameter": "error",
114
+ "unicorn/no-object-methods-with-collections": "error",
115
+ "unicorn/no-optional-chaining-on-undeclared-variable": "error",
73
116
  /**
74
- * Disabled because using `process.exit` is common to exit command-line applications without
75
- * verbose output.
117
+ * Disabled because using `process.exit` is common to exit command-line apps without verbose
118
+ * output.
76
119
  */
77
120
  "unicorn/no-process-exit": "off",
121
+ "unicorn/no-redundant-comparison": "error",
122
+ "unicorn/no-return-array-push": "error",
78
123
  "unicorn/no-single-promise-in-promise-methods": "error",
79
124
  "unicorn/no-static-only-class": "error",
125
+ "unicorn/no-subtraction-comparison": "error",
80
126
  "unicorn/no-thenable": "error",
81
127
  /** Superseded by the `@typescript-eslint/no-this-alias` rule. */
82
128
  "unicorn/no-this-assignment": "off",
129
+ "unicorn/no-this-outside-of-class": "error",
130
+ "unicorn/no-top-level-assignment-in-function": "error",
131
+ "unicorn/no-top-level-side-effects": "error",
83
132
  "unicorn/no-typeof-undefined": "error",
133
+ "unicorn/no-uncalled-method": "error",
134
+ "unicorn/no-undeclared-class-members": "error",
84
135
  "unicorn/no-unnecessary-array-flat-depth": "error",
85
136
  "unicorn/no-unnecessary-array-splice-count": "error",
86
- "unicorn/no-unnecessary-slice-end": "error",
87
137
  "unicorn/no-unnecessary-await": "error",
138
+ "unicorn/no-unnecessary-global-this": "error",
139
+ "unicorn/no-unnecessary-nested-ternary": "error",
88
140
  "unicorn/no-unnecessary-polyfills": "error",
141
+ "unicorn/no-unnecessary-slice-end": "error",
142
+ "unicorn/no-unnecessary-splice": "error",
89
143
  "unicorn/no-unreadable-array-destructuring": "error",
144
+ "unicorn/no-unreadable-for-of-expression": "error",
90
145
  "unicorn/no-unreadable-iife": "error",
146
+ "unicorn/no-unreadable-new-expression": "error",
147
+ "unicorn/no-unreadable-object-destructuring": "error",
148
+ "unicorn/no-unsafe-buffer-conversion": "error",
149
+ "unicorn/no-unsafe-dom-html": "error",
150
+ "unicorn/no-unsafe-property-key": "error",
151
+ /** Disabled since it has too many false positives. */
152
+ "unicorn/no-unsafe-string-replacement": "off",
153
+ "unicorn/no-unused-array-method-return": "error",
91
154
  "unicorn/no-unused-properties": "error",
155
+ "unicorn/no-useless-boolean-cast": "error",
156
+ "unicorn/no-useless-coercion": "error",
92
157
  "unicorn/no-useless-collection-argument": "error",
158
+ "unicorn/no-useless-concat": "error",
159
+ "unicorn/no-useless-continue": "error",
160
+ "unicorn/no-useless-else": "error",
93
161
  "unicorn/no-useless-error-capture-stack-trace": "error",
94
162
  "unicorn/no-useless-fallback-in-spread": "error",
95
163
  "unicorn/no-useless-iterator-to-array": "error",
96
164
  "unicorn/no-useless-length-check": "error",
165
+ "unicorn/no-useless-override": "error",
97
166
  "unicorn/no-useless-promise-resolve-reject": "error",
167
+ "unicorn/no-useless-recursion": "error",
98
168
  "unicorn/no-useless-spread": "error",
99
169
  "unicorn/no-useless-switch-case": "error",
170
+ "unicorn/no-useless-template-literals": "error",
100
171
  /** Disabled since it does not work properly with TypeScript. */
101
172
  "unicorn/no-useless-undefined": "off",
102
173
  "unicorn/no-zero-fractions": "error",
103
174
  "unicorn/number-literal-case": "off", // eslint-config-prettier
104
175
  "unicorn/numeric-separators-style": "error",
176
+ "unicorn/operator-assignment": "error",
105
177
  "unicorn/prefer-add-event-listener": "error",
178
+ "unicorn/prefer-add-event-listener-options": "error",
106
179
  "unicorn/prefer-array-find": "error",
107
180
  "unicorn/prefer-array-flat": "error",
108
181
  "unicorn/prefer-array-flat-map": "error",
182
+ "unicorn/prefer-array-from-map": "error",
109
183
  "unicorn/prefer-array-index-of": "error",
184
+ "unicorn/prefer-array-last-methods": "error",
185
+ "unicorn/prefer-array-slice": "error",
110
186
  "unicorn/prefer-array-some": "error",
111
187
  "unicorn/prefer-at": "error",
188
+ "unicorn/prefer-await": "error",
112
189
  "unicorn/prefer-bigint-literals": "error",
113
190
  "unicorn/prefer-blob-reading-methods": "error",
114
191
  "unicorn/prefer-class-fields": "error",
@@ -116,59 +193,109 @@ export const baseUnicorn = defineConfig({
116
193
  "unicorn/prefer-code-point": "error",
117
194
  "unicorn/prefer-date-now": "error",
118
195
  "unicorn/prefer-default-parameters": "error",
196
+ "unicorn/prefer-direct-iteration": "error",
197
+ "unicorn/prefer-dispose": "error",
119
198
  "unicorn/prefer-dom-node-append": "error",
120
- "unicorn/prefer-dom-node-dataset": "error",
199
+ "unicorn/prefer-dom-node-html-methods": "error",
121
200
  "unicorn/prefer-dom-node-remove": "error",
122
201
  "unicorn/prefer-dom-node-text-content": "error",
202
+ "unicorn/prefer-early-return": "error",
203
+ "unicorn/prefer-else-if": "error",
123
204
  "unicorn/prefer-event-target": "error",
124
205
  "unicorn/prefer-export-from": "error",
206
+ "unicorn/prefer-get-or-insert-computed": "error",
207
+ "unicorn/prefer-global-number-constants": "error",
125
208
  "unicorn/prefer-global-this": "error",
209
+ "unicorn/prefer-has-check": "error",
210
+ "unicorn/prefer-https": "error",
211
+ "unicorn/prefer-identifier-import-export-specifiers": "error",
126
212
  "unicorn/prefer-import-meta-properties": "error",
127
213
  "unicorn/prefer-includes": "error",
128
- /** Disabled because the rule is not compatible with TypeScript. */
129
- "unicorn/prefer-json-parse-buffer": "off",
214
+ /**
215
+ * Disabled since it does not work with common TypeScript narrowing patterns such as: `major ===
216
+ * undefined || minor === undefined || patch === undefined`
217
+ */
218
+ "unicorn/prefer-includes-over-repeated-comparisons": "off",
219
+ "unicorn/prefer-iterable-in-constructor": "error",
220
+ "unicorn/prefer-iterator-concat": "error",
221
+ "unicorn/prefer-iterator-to-array": "error",
222
+ "unicorn/prefer-iterator-to-array-at-end": "error",
130
223
  "unicorn/prefer-keyboard-event-key": "error",
224
+ "unicorn/prefer-location-assign": "error",
131
225
  "unicorn/prefer-logical-operator-over-ternary": "error",
226
+ "unicorn/prefer-map-from-entries": "error",
227
+ "unicorn/prefer-math-abs": "error",
132
228
  "unicorn/prefer-math-min-max": "error",
133
229
  "unicorn/prefer-math-trunc": "error",
230
+ "unicorn/prefer-minimal-ternary": "error",
134
231
  "unicorn/prefer-modern-dom-apis": "error",
135
232
  "unicorn/prefer-modern-math-apis": "error",
136
233
  "unicorn/prefer-module": "error",
137
234
  "unicorn/prefer-native-coercion-functions": "error",
138
235
  "unicorn/prefer-negative-index": "error",
139
236
  "unicorn/prefer-node-protocol": "error",
237
+ "unicorn/prefer-number-coercion": "error",
238
+ "unicorn/prefer-number-is-safe-integer": "error",
140
239
  "unicorn/prefer-number-properties": "error",
240
+ "unicorn/prefer-object-define-properties": "error",
241
+ "unicorn/prefer-object-destructuring-defaults": "error",
141
242
  "unicorn/prefer-object-from-entries": "error",
243
+ "unicorn/prefer-object-iterable-methods": "error",
142
244
  "unicorn/prefer-optional-catch-binding": "error",
245
+ "unicorn/prefer-path2d": "error",
246
+ "unicorn/prefer-private-class-fields": "error",
143
247
  "unicorn/prefer-prototype-methods": "error",
144
248
  "unicorn/prefer-query-selector": "error",
249
+ "unicorn/prefer-queue-microtask": "error",
145
250
  "unicorn/prefer-reflect-apply": "error",
146
251
  "unicorn/prefer-regexp-test": "error",
147
252
  "unicorn/prefer-response-static-json": "error",
253
+ "unicorn/prefer-scoped-selector": "error",
148
254
  "unicorn/prefer-set-has": "error",
149
255
  "unicorn/prefer-set-size": "error",
256
+ "unicorn/prefer-short-arrow-method": "error",
150
257
  "unicorn/prefer-simple-condition-first": "error",
258
+ "unicorn/prefer-simple-sort-comparator": "error",
259
+ "unicorn/prefer-single-array-predicate": "error",
151
260
  "unicorn/prefer-single-call": "error",
261
+ "unicorn/prefer-single-object-destructuring": "error",
262
+ "unicorn/prefer-smaller-scope": "error",
263
+ "unicorn/prefer-split-limit": "error",
152
264
  "unicorn/prefer-spread": "error",
265
+ "unicorn/prefer-string-match-all": "error",
266
+ "unicorn/prefer-string-pad-start-end": "error",
153
267
  "unicorn/prefer-string-raw": "error",
268
+ "unicorn/prefer-string-repeat": "error",
154
269
  "unicorn/prefer-string-replace-all": "error",
155
270
  "unicorn/prefer-string-slice": "error",
156
271
  "unicorn/prefer-string-starts-ends-with": "error",
157
272
  "unicorn/prefer-string-trim-start-end": "error",
158
273
  "unicorn/prefer-structured-clone": "error",
159
274
  "unicorn/prefer-switch": "error",
275
+ "unicorn/prefer-temporal": "error",
160
276
  "unicorn/prefer-ternary": "error",
161
277
  "unicorn/prefer-top-level-await": "error",
162
278
  "unicorn/prefer-type-error": "error",
279
+ "unicorn/prefer-type-literal-last": "error",
280
+ "unicorn/prefer-uint8array-base64": "error",
281
+ "unicorn/prefer-unicode-code-point-escapes": "error",
282
+ "unicorn/prefer-url-href": "error",
163
283
  /** Disabled since it is common to use the variable name of "i". */
164
284
  "unicorn/prevent-abbreviations": "off",
165
285
  "unicorn/relative-url-style": "error",
166
286
  "unicorn/require-array-join-separator": "error",
287
+ /**
288
+ * Superseded by the `@typescript-eslint/require-array-sort-compare` rule (which is type-aware).
289
+ */
290
+ "unicorn/require-array-sort-compare": "off",
291
+ "unicorn/require-css-escape": "error",
167
292
  "unicorn/require-module-attributes": "error",
168
293
  "unicorn/require-module-specifiers": "error",
169
294
  "unicorn/require-number-to-fixed-digits-argument": "error",
295
+ "unicorn/require-passive-events": "error",
170
296
  /** Disabled since it is not recommended by the plugin authors. */
171
297
  "unicorn/require-post-message-target-origin": "off",
298
+ "unicorn/require-proxy-trap-boolean-return": "error",
172
299
  /** Disabled since string content enforcement is too project-specific. */
173
300
  "unicorn/string-content": "off",
174
301
  "unicorn/switch-case-braces": "error",
@@ -179,5 +306,6 @@ export const baseUnicorn = defineConfig({
179
306
  "unicorn/template-indent": "error",
180
307
  "unicorn/text-encoding-identifier-case": "error",
181
308
  "unicorn/throw-new-error": "error",
309
+ "unicorn/try-complexity": "error",
182
310
  },
183
311
  });
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/base.js"],"names":[],"mappings":"AAWA;;;;;GAKG;AACH,kEA0BE"}
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/base.js"],"names":[],"mappings":"AAYA;;;;;GAKG;AACH,kEA2BE"}
package/dist/src/base.js CHANGED
@@ -5,6 +5,7 @@ import { baseImportX } from "./base/base-import-x.js";
5
5
  import { baseJSDoc } from "./base/base-jsdoc.js";
6
6
  import { baseN } from "./base/base-n.js";
7
7
  import { basePerfectionist } from "./base/base-perfectionist.js";
8
+ import { baseRegexp } from "./base/base-regexp.js";
8
9
  import { baseStylistic } from "./base/base-stylistic.js";
9
10
  import { baseTypeScriptESLint } from "./base/base-typescript-eslint.js";
10
11
  import { baseUnicorn } from "./base/base-unicorn.js";
@@ -19,7 +20,7 @@ export const completeConfigBase = defineConfig(
19
20
  // https://eslint.org/docs/latest/use/configure/configuration-files#specifying-files-and-ignores
20
21
  // TypeScript file extensions are enabled in the "base-typescript-eslint.js" file.
21
22
  ...baseESLint, ...baseTypeScriptESLint, ...baseStylistic, ...baseImportX, ...baseJSDoc, ...baseN, // "n" stands for Node.
22
- ...basePerfectionist, ...baseUnicorn,
23
+ ...basePerfectionist, ...baseRegexp, ...baseUnicorn,
23
24
  // TODO: The `defineConfig` helper function is bugged.
24
25
  // @ts-expect-error https://github.com/typescript-eslint/typescript-eslint/issues/11543
25
26
  ...esLintPluginComplete.configs.recommended, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "eslint-config-complete",
3
- "version": "4.8.0",
3
+ "version": "4.10.0",
4
4
  "description": "A sharable ESLint config for TypeScript projects.",
5
5
  "keywords": [
6
6
  "eslint",
@@ -35,21 +35,22 @@
35
35
  "@stylistic/eslint-plugin": "5.10.0",
36
36
  "confusing-browser-globals": "1.0.11",
37
37
  "eslint-import-resolver-typescript": "4.4.5",
38
- "eslint-plugin-complete": "1.5.0",
38
+ "eslint-plugin-complete": "1.6.0",
39
39
  "eslint-plugin-eslint-plugin": "7.4.0",
40
40
  "eslint-plugin-import-x": "4.16.2",
41
- "eslint-plugin-jsdoc": "63.0.1",
42
- "eslint-plugin-n": "18.0.1",
43
- "eslint-plugin-perfectionist": "5.9.0",
44
- "eslint-plugin-unicorn": "64.0.0",
45
- "typescript-eslint": "8.60.1"
41
+ "eslint-plugin-jsdoc": "63.0.4",
42
+ "eslint-plugin-n": "18.1.0",
43
+ "eslint-plugin-perfectionist": "5.9.1",
44
+ "eslint-plugin-regexp": "3.1.0",
45
+ "eslint-plugin-unicorn": "67.0.0",
46
+ "typescript-eslint": "8.61.1"
46
47
  },
47
48
  "devDependencies": {
48
49
  "@eslint/js": "10.0.1",
49
50
  "@types/confusing-browser-globals": "1.0.3",
50
- "@types/node": "25.9.1",
51
- "@typescript-eslint/typescript-estree": "8.60.1",
52
- "@typescript-eslint/utils": "8.60.1",
51
+ "@types/node": "25.9.3",
52
+ "@typescript-eslint/typescript-estree": "8.61.1",
53
+ "@typescript-eslint/utils": "8.61.1",
53
54
  "complete-common": "2.29.0",
54
55
  "complete-node": "17.0.0",
55
56
  "eslint-config-prettier": "10.1.8",