@pumpn/eslint-config 17.2.3 → 18.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/_common/_exports.js +5 -0
- package/_common/all-extensions/_exports.js +1 -0
- package/_common/all-extensions/js-extensions.js +10 -0
- package/_common/all-extensions.js +6 -0
- package/_common/convert-extensions-to-glob.js +12 -0
- package/_common/js-jsx-extensions.js +3 -0
- package/_common/ts-extensions.js +10 -0
- package/_common/ts-jsx-extensions.js +3 -0
- package/config/_common/_exports.js +5 -0
- package/config/_common/add-prefix-to-rules.js +13 -0
- package/config/_common/core-json-rules.js +24 -0
- package/config/_common/json-plugins.js +9 -0
- package/config/_common/pick-unicorn-rules-for-language/_exports.js +2 -0
- package/config/_common/pick-unicorn-rules-for-language/pick-rules-for-language.js +52 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/_exports.js +9 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/binary-group-length.js +3 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/hexadecimal-group-length.js +3 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/maximum-nested-calls.js +3 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/number-group-length.js +3 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/octal-group-length.js +3 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/patterns.js +28 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/unicorn-consistency-rules/_exports.js +1 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/unicorn-consistency-rules/consistent-function-style.js +3 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/unicorn-consistency-rules.js +66 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/unicorn-preference-rules.js +199 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn/unicorn-redundancy-rules.js +47 -0
- package/config/_common/pick-unicorn-rules-for-language/unicorn.js +368 -0
- package/config/_common/pick-unicorn-rules-for-language.js +14 -0
- package/config/_exports.js +11 -0
- package/config/converted-globals.js +16 -0
- package/config/css-config/_exports.js +2 -0
- package/config/css-config/css-plugins.js +9 -0
- package/config/css-config/css-rules/_exports.js +1 -0
- package/config/css-config/css-rules/core-css-rules.js +25 -0
- package/config/css-config/css-rules.js +10 -0
- package/config/css-config.js +17 -0
- package/config/default-glob.js +6 -0
- package/config/html-config/_exports.js +2 -0
- package/config/html-config/html-plugins.js +9 -0
- package/config/html-config/html-rules/_exports.js +1 -0
- package/config/html-config/html-rules/core-html-rules/_exports.js +4 -0
- package/config/html-config/html-rules/core-html-rules/core-html-accessibility-rules.js +28 -0
- package/config/html-config/html-rules/core-html-rules/core-html-best-practice-rules.js +42 -0
- package/config/html-config/html-rules/core-html-rules/core-html-seo-rules.js +16 -0
- package/config/html-config/html-rules/core-html-rules/core-html-style-rules.js +23 -0
- package/config/html-config/html-rules/core-html-rules.js +27 -0
- package/config/html-config/html-rules.js +10 -0
- package/config/html-config.js +12 -0
- package/config/json-config/_exports.js +1 -0
- package/config/json-config/json-rules.js +9 -0
- package/config/json-config.js +13 -0
- package/config/jsonc-config/_exports.js +1 -0
- package/config/jsonc-config/jsonc-rules.js +9 -0
- package/config/jsonc-config.js +26 -0
- package/config/jsx-glob/_exports.js +1 -0
- package/config/jsx-glob/jsx-extensions.js +6 -0
- package/config/jsx-glob.js +7 -0
- package/config/md-config/_exports.js +2 -0
- package/config/md-config/md-plugins.js +9 -0
- package/config/md-config/md-rules/_exports.js +1 -0
- package/config/md-config/md-rules/core-md-rules.js +30 -0
- package/config/md-config/md-rules.js +10 -0
- package/config/md-config.js +15 -0
- package/{plugins.js → config/plugins.js} +7 -6
- package/{rules → config/rules}/_common/_exports.js +0 -1
- package/{rules → config/rules}/_exports.js +1 -4
- package/config/rules/better-tailwindcss/correctness.js +13 -0
- package/config/rules/better-tailwindcss/stylistic.js +42 -0
- package/config/rules/better-tailwindcss.js +15 -0
- package/config/rules/command.js +17 -0
- package/config/rules/depend.js +17 -0
- package/config/rules/eslint-comments/best-practices.js +14 -0
- package/config/rules/eslint-comments/stylistic-issues.js +17 -0
- package/config/rules/eslint-comments.js +15 -0
- package/config/rules/import-x/helpful-warnings.js +26 -0
- package/config/rules/import-x/module-systems.js +14 -0
- package/config/rules/import-x/static-analysis.js +40 -0
- package/config/rules/import-x/style-guide/_exports.js +1 -0
- package/config/rules/import-x/style-guide/max-dependencies.js +3 -0
- package/config/rules/import-x/style-guide.js +94 -0
- package/config/rules/import-x.js +22 -0
- package/config/rules/jsdoc.js +464 -0
- package/config/rules/no-secrets/_exports.js +1 -0
- package/config/rules/no-secrets/tolerance.js +3 -0
- package/config/rules/no-secrets.js +30 -0
- package/config/rules/perfectionist.js +331 -0
- package/config/rules/promise.js +53 -0
- package/config/rules/react/core.js +69 -0
- package/config/rules/react/debug.js +14 -0
- package/config/rules/react/dom.js +25 -0
- package/config/rules/react/jsx.js +23 -0
- package/config/rules/react/naming-convention.js +12 -0
- package/config/rules/react/rsc.js +10 -0
- package/config/rules/react/web-api.js +15 -0
- package/config/rules/react.js +28 -0
- package/config/rules/regexp/best-practices.js +47 -0
- package/config/rules/regexp/possible-errors.js +31 -0
- package/config/rules/regexp/stylistic-issues.js +79 -0
- package/config/rules/regexp.js +20 -0
- package/config/rules/security.js +31 -0
- package/config/rules/sonarjs/problem.js +134 -0
- package/config/rules/sonarjs/suggestion.js +167 -0
- package/config/rules/sonarjs.js +15 -0
- package/config/rules/stylistic/_common/_exports.js +1 -0
- package/{rules → config/rules}/stylistic/_exports.js +1 -1
- package/config/rules/stylistic/brackets/_exports.js +2 -0
- package/config/rules/stylistic/brackets/min-elements-for-curly-newline.js +3 -0
- package/config/rules/stylistic/brackets/wrap-multilines-default.js +3 -0
- package/config/rules/stylistic/brackets.js +90 -0
- package/config/rules/stylistic/commas.js +18 -0
- package/config/rules/stylistic/comments.js +13 -0
- package/config/rules/stylistic/disallow.js +36 -0
- package/config/rules/stylistic/indent.js +19 -0
- package/config/rules/stylistic/jsx.js +42 -0
- package/config/rules/stylistic/linebreaks/_exports.js +1 -0
- package/config/rules/stylistic/linebreaks/max-ignored-chain-depth.js +3 -0
- package/config/rules/stylistic/linebreaks.js +67 -0
- package/config/rules/stylistic/misc.js +49 -0
- package/config/rules/stylistic/operators.js +31 -0
- package/config/rules/stylistic/quotes.js +12 -0
- package/config/rules/stylistic/semis.js +19 -0
- package/config/rules/stylistic/spacing.js +68 -0
- package/config/rules/stylistic/types.js +12 -0
- package/config/rules/stylistic.js +40 -0
- package/config/rules/suggestions/_exports.js +9 -0
- package/config/rules/suggestions/max-classes-per-file.js +3 -0
- package/config/rules/suggestions/max-depth.js +3 -0
- package/config/rules/suggestions/max-identifier-length.js +3 -0
- package/config/rules/suggestions/max-lines-per-file.js +3 -0
- package/config/rules/suggestions/max-lines-per-function.js +3 -0
- package/config/rules/suggestions/max-nested-callbacks.js +3 -0
- package/config/rules/suggestions/max-parameters.js +3 -0
- package/config/rules/suggestions/max-statements.js +3 -0
- package/config/rules/suggestions/min-identifier-length.js +3 -0
- package/{rules → config/rules}/suggestions.js +17 -15
- package/config/rules.js +50 -0
- package/config/ts-glob.js +6 -0
- package/config.js +51 -53
- package/package.json +51 -38
- package/.ls-lint.yml +0 -6
- package/.vscode/settings.json +0 -18
- package/deno.json +0 -78
- package/deno.lock +0 -1632
- package/eslint.config.js +0 -25
- package/rules/better-tailwindcss/correctness.js +0 -7
- package/rules/better-tailwindcss/stylistic.js +0 -38
- package/rules/better-tailwindcss.js +0 -19
- package/rules/command.js +0 -12
- package/rules/depend.js +0 -12
- package/rules/eslint-comments/best-practices.js +0 -9
- package/rules/eslint-comments/stylistic-issues.js +0 -12
- package/rules/eslint-comments.js +0 -19
- package/rules/import-x/helpful-warnings.js +0 -21
- package/rules/import-x/module-systems.js +0 -9
- package/rules/import-x/static-analysis.js +0 -35
- package/rules/import-x/style-guide.js +0 -89
- package/rules/import-x.js +0 -19
- package/rules/jsdoc.js +0 -433
- package/rules/no-secrets.js +0 -25
- package/rules/perfectionist.js +0 -318
- package/rules/promise.js +0 -48
- package/rules/react/core.js +0 -59
- package/rules/react/debug.js +0 -6
- package/rules/react/dom.js +0 -15
- package/rules/react/jsx.js +0 -18
- package/rules/react/naming-convention.js +0 -6
- package/rules/react/rsc.js +0 -5
- package/rules/react/web-api.js +0 -10
- package/rules/react.js +0 -19
- package/rules/regexp/best-practices.js +0 -42
- package/rules/regexp/possible-errors.js +0 -26
- package/rules/regexp/stylistic-issues.js +0 -74
- package/rules/regexp.js +0 -19
- package/rules/security.js +0 -25
- package/rules/sonarjs/problem.js +0 -123
- package/rules/sonarjs/suggestion.js +0 -135
- package/rules/sonarjs.js +0 -19
- package/rules/stylistic/_common/_exports.js +0 -3
- package/rules/stylistic/brackets.js +0 -87
- package/rules/stylistic/commas.js +0 -13
- package/rules/stylistic/comments.js +0 -8
- package/rules/stylistic/disallow.js +0 -31
- package/rules/stylistic/indent.js +0 -14
- package/rules/stylistic/jsx.js +0 -37
- package/rules/stylistic/linebreaks.js +0 -63
- package/rules/stylistic/misc.js +0 -45
- package/rules/stylistic/operators.js +0 -26
- package/rules/stylistic/quotes.js +0 -7
- package/rules/stylistic/semis.js +0 -14
- package/rules/stylistic/spacing.js +0 -63
- package/rules/stylistic/types.js +0 -7
- package/rules/stylistic.js +0 -19
- package/rules/unicorn.js +0 -306
- package/rules.js +0 -19
- package/scripts/update-import-map.js +0 -47
- package/scripts/update-package-json.js +0 -66
- package/scripts/update-tsconfig.js +0 -46
- package/tsconfig.json +0 -27
- /package/{rules → config}/_common/tab-width.js +0 -0
- /package/{rules → config/rules}/_common/maximum-line-length.js +0 -0
- /package/{rules → config/rules}/better-tailwindcss/_exports.js +0 -0
- /package/{rules → config/rules}/eslint-comments/_exports.js +0 -0
- /package/{rules → config/rules}/import-x/_exports.js +0 -0
- /package/{rules → config/rules}/layout-and-formatting.js +0 -0
- /package/{rules → config/rules}/possible-problems.js +0 -0
- /package/{rules → config/rules}/react/_exports.js +0 -0
- /package/{rules → config/rules}/regexp/_exports.js +0 -0
- /package/{rules → config/rules}/sonarjs/_exports.js +0 -0
- /package/{rules → config/rules}/stylistic/_common/min-items-for-array-newline.js +0 -0
package/rules/perfectionist.js
DELETED
|
@@ -1,318 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @import { Linter } from "eslint";
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @satisfies {Linter.RulesRecord}
|
|
7
|
-
*/
|
|
8
|
-
const perfectionistRules = {
|
|
9
|
-
"perfectionist/sort-array-includes": [
|
|
10
|
-
"error",
|
|
11
|
-
{
|
|
12
|
-
groups: ["literal"]
|
|
13
|
-
}
|
|
14
|
-
],
|
|
15
|
-
"perfectionist/sort-arrays": "error",
|
|
16
|
-
"perfectionist/sort-classes": [
|
|
17
|
-
"error",
|
|
18
|
-
{
|
|
19
|
-
groups: [
|
|
20
|
-
"index-signature",
|
|
21
|
-
["private-static-property", "private-static-accessor-property"],
|
|
22
|
-
["private-static-get-method", "private-static-set-method"],
|
|
23
|
-
["static-property", "static-accessor-property"],
|
|
24
|
-
["static-get-method", "static-set-method"],
|
|
25
|
-
["protected-static-property", "protected-static-accessor-property"],
|
|
26
|
-
["protected-static-get-method", "protected-static-set-method"],
|
|
27
|
-
"static-block",
|
|
28
|
-
["property", "accessor-property"],
|
|
29
|
-
["get-method", "set-method"],
|
|
30
|
-
["protected-property", "protected-accessor-property"],
|
|
31
|
-
["protected-get-method", "protected-set-method"],
|
|
32
|
-
["private-property", "private-accessor-property"],
|
|
33
|
-
["private-get-method", "private-set-method"],
|
|
34
|
-
"constructor",
|
|
35
|
-
["static-method", "static-function-property"],
|
|
36
|
-
["protected-static-method", "protected-static-function-property"],
|
|
37
|
-
["private-static-method", "private-static-function-property"],
|
|
38
|
-
["method", "function-property"],
|
|
39
|
-
["protected-method", "protected-function-property"],
|
|
40
|
-
["private-method", "private-function-property"],
|
|
41
|
-
"unknown"
|
|
42
|
-
],
|
|
43
|
-
partitionByComment: String.raw`\/\/`,
|
|
44
|
-
partitionByNewLine: false
|
|
45
|
-
}
|
|
46
|
-
],
|
|
47
|
-
"perfectionist/sort-decorators": "error",
|
|
48
|
-
"perfectionist/sort-enums": "error",
|
|
49
|
-
"perfectionist/sort-export-attributes": "error",
|
|
50
|
-
"perfectionist/sort-exports": "error",
|
|
51
|
-
"perfectionist/sort-heritage-clauses": "error",
|
|
52
|
-
"perfectionist/sort-import-attributes": "error",
|
|
53
|
-
"perfectionist/sort-imports": [
|
|
54
|
-
"error",
|
|
55
|
-
{
|
|
56
|
-
customGroups: [
|
|
57
|
-
{
|
|
58
|
-
elementNamePattern: "^@/components/.*",
|
|
59
|
-
groupName: "components"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
elementNamePattern: "^@/islands/.*",
|
|
63
|
-
groupName: "islands"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
elementNamePattern: "^@/logic/.*",
|
|
67
|
-
groupName: "logic"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
elementNamePattern: "^@/plugins/.*",
|
|
71
|
-
groupName: "plugins"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
elementNamePattern: "^@std/.*",
|
|
75
|
-
groupName: "std"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
elementNamePattern: "^@/utilities/.*",
|
|
79
|
-
groupName: "utilities"
|
|
80
|
-
}
|
|
81
|
-
],
|
|
82
|
-
groups: [
|
|
83
|
-
"builtin",
|
|
84
|
-
"std",
|
|
85
|
-
"external",
|
|
86
|
-
"utilities",
|
|
87
|
-
"plugins",
|
|
88
|
-
"logic",
|
|
89
|
-
"components",
|
|
90
|
-
"islands",
|
|
91
|
-
"internal",
|
|
92
|
-
"type",
|
|
93
|
-
"type-internal",
|
|
94
|
-
"type-parent",
|
|
95
|
-
"type-sibling",
|
|
96
|
-
"type-index",
|
|
97
|
-
"parent",
|
|
98
|
-
"sibling",
|
|
99
|
-
"index",
|
|
100
|
-
"unknown"
|
|
101
|
-
],
|
|
102
|
-
internalPattern: ["^@/.+"],
|
|
103
|
-
newlinesBetween: 1,
|
|
104
|
-
partitionByNewLine: false,
|
|
105
|
-
sortSideEffects: true
|
|
106
|
-
}
|
|
107
|
-
],
|
|
108
|
-
"perfectionist/sort-interfaces": "error",
|
|
109
|
-
"perfectionist/sort-intersection-types": "error",
|
|
110
|
-
"perfectionist/sort-jsx-props": [
|
|
111
|
-
"error",
|
|
112
|
-
{
|
|
113
|
-
groups: ["shorthand-prop", "unknown", "multiline-prop"]
|
|
114
|
-
}
|
|
115
|
-
],
|
|
116
|
-
"perfectionist/sort-maps": "error",
|
|
117
|
-
"perfectionist/sort-modules": "off",
|
|
118
|
-
"perfectionist/sort-named-exports": "error",
|
|
119
|
-
"perfectionist/sort-named-imports": ["error", { partitionByComment: false }],
|
|
120
|
-
"perfectionist/sort-object-types": "error",
|
|
121
|
-
"perfectionist/sort-objects": [
|
|
122
|
-
"error",
|
|
123
|
-
{
|
|
124
|
-
customGroups: [
|
|
125
|
-
{
|
|
126
|
-
elementNamePattern: ["^id$"],
|
|
127
|
-
groupName: "id"
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
elementNamePattern: ["^before.*"],
|
|
131
|
-
groupName: "groupBeforeAfter1"
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
elementNamePattern: ["^after.*"],
|
|
135
|
-
groupName: "groupBeforeAfter2"
|
|
136
|
-
},
|
|
137
|
-
{
|
|
138
|
-
elementNamePattern: ["^r$", "^l$"],
|
|
139
|
-
groupName: "groupColor1"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
elementNamePattern: ["^g$", "^c$", "^a$"],
|
|
143
|
-
groupName: "groupColor2"
|
|
144
|
-
},
|
|
145
|
-
{
|
|
146
|
-
elementNamePattern: ["^b$", "^h$"],
|
|
147
|
-
groupName: "groupColor3"
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
elementNamePattern: ["^minimum(([A-Z].*)|$)"],
|
|
151
|
-
groupName: "groupMinimumMaximum1"
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
elementNamePattern: ["^maximum(([A-Z].*)|$)"],
|
|
155
|
-
groupName: "groupMinimumMaximum2"
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
elementNamePattern: ["^min(([A-Z_-].*)|$)"],
|
|
159
|
-
groupName: "groupMinMax1"
|
|
160
|
-
},
|
|
161
|
-
{
|
|
162
|
-
elementNamePattern: ["^max(([A-Z_-].*)|$)"],
|
|
163
|
-
groupName: "groupMinMax2"
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
elementNamePattern: ["^primary.*"],
|
|
167
|
-
groupName: "groupPrecedenceOrdinal1"
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
elementNamePattern: ["^secondary.*"],
|
|
171
|
-
groupName: "groupPrecedenceOrdinal2"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
elementNamePattern: ["^tertiary.*"],
|
|
175
|
-
groupName: "groupPrecedenceOrdinal3"
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
elementNamePattern: ["^quaternary.*"],
|
|
179
|
-
groupName: "groupPrecedenceOrdinal4"
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
elementNamePattern: ["^quinary.*"],
|
|
183
|
-
groupName: "groupPrecedenceOrdinal5"
|
|
184
|
-
},
|
|
185
|
-
{
|
|
186
|
-
elementNamePattern: ["^senary.*"],
|
|
187
|
-
groupName: "groupPrecedenceOrdinal6"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
elementNamePattern: ["^septenary.*"],
|
|
191
|
-
groupName: "groupPrecedenceOrdinal7"
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
elementNamePattern: ["^octonary.*"],
|
|
195
|
-
groupName: "groupPrecedenceOrdinal8"
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
elementNamePattern: ["^nonary.*"],
|
|
199
|
-
groupName: "groupPrecedenceOrdinal9"
|
|
200
|
-
},
|
|
201
|
-
{
|
|
202
|
-
elementNamePattern: ["^denary.*"],
|
|
203
|
-
groupName: "groupPrecedenceOrdinal10"
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
elementNamePattern: ["^ultimate.*"],
|
|
207
|
-
groupName: "groupPrecedenceOrdinalLast"
|
|
208
|
-
},
|
|
209
|
-
{
|
|
210
|
-
elementNamePattern: ["^previous.*"],
|
|
211
|
-
groupName: "groupPreviousNext1"
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
elementNamePattern: ["^next.*"],
|
|
215
|
-
groupName: "groupPreviousNext2"
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
elementNamePattern: ["^prev(?!ent).*"],
|
|
219
|
-
groupName: "groupPrevNext1"
|
|
220
|
-
},
|
|
221
|
-
{
|
|
222
|
-
elementNamePattern: ["^next.*"],
|
|
223
|
-
groupName: "groupPrevNext2"
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
elementNamePattern: ["^first.*"],
|
|
227
|
-
groupName: "groupSpatialOrdinal1"
|
|
228
|
-
},
|
|
229
|
-
{
|
|
230
|
-
elementNamePattern: ["^second.*"],
|
|
231
|
-
groupName: "groupSpatialOrdinal2"
|
|
232
|
-
},
|
|
233
|
-
{
|
|
234
|
-
elementNamePattern: ["^third.*"],
|
|
235
|
-
groupName: "groupSpatialOrdinal3"
|
|
236
|
-
},
|
|
237
|
-
{
|
|
238
|
-
elementNamePattern: ["^fourth.*"],
|
|
239
|
-
groupName: "groupSpatialOrdinal4"
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
elementNamePattern: ["^fifth.*"],
|
|
243
|
-
groupName: "groupSpatialOrdinal5"
|
|
244
|
-
},
|
|
245
|
-
{
|
|
246
|
-
elementNamePattern: ["^sixth.*"],
|
|
247
|
-
groupName: "groupSpatialOrdinal6"
|
|
248
|
-
},
|
|
249
|
-
{
|
|
250
|
-
elementNamePattern: ["^seventh.*"],
|
|
251
|
-
groupName: "groupSpatialOrdinal7"
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
elementNamePattern: ["^eighth.*"],
|
|
255
|
-
groupName: "groupSpatialOrdinal8"
|
|
256
|
-
},
|
|
257
|
-
{
|
|
258
|
-
elementNamePattern: ["^ninth.*"],
|
|
259
|
-
groupName: "groupSpatialOrdinal9"
|
|
260
|
-
},
|
|
261
|
-
{
|
|
262
|
-
elementNamePattern: ["^tenth.*"],
|
|
263
|
-
groupName: "groupSpatialOrdinal10"
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
elementNamePattern: ["^last.*"],
|
|
267
|
-
groupName: "groupSpatialOrdinalLast"
|
|
268
|
-
}
|
|
269
|
-
],
|
|
270
|
-
groups: [
|
|
271
|
-
"id",
|
|
272
|
-
"groupBeforeAfter1",
|
|
273
|
-
"groupBeforeAfter2",
|
|
274
|
-
"groupMinMax1",
|
|
275
|
-
"groupMinMax2",
|
|
276
|
-
"groupMinimumMaximum1",
|
|
277
|
-
"groupMinimumMaximum2",
|
|
278
|
-
"groupPreviousNext1",
|
|
279
|
-
"groupPrevNext1",
|
|
280
|
-
"groupSpatialOrdinal1",
|
|
281
|
-
"groupSpatialOrdinal2",
|
|
282
|
-
"groupSpatialOrdinal3",
|
|
283
|
-
"groupSpatialOrdinal4",
|
|
284
|
-
"groupSpatialOrdinal5",
|
|
285
|
-
"groupSpatialOrdinal6",
|
|
286
|
-
"groupSpatialOrdinal7",
|
|
287
|
-
"groupSpatialOrdinal8",
|
|
288
|
-
"groupSpatialOrdinal9",
|
|
289
|
-
"groupSpatialOrdinal10",
|
|
290
|
-
"groupPreviousNext2",
|
|
291
|
-
"groupPrevNext2",
|
|
292
|
-
"groupSpatialOrdinalLast",
|
|
293
|
-
"groupPrecedenceOrdinal1",
|
|
294
|
-
"groupPrecedenceOrdinal2",
|
|
295
|
-
"groupPrecedenceOrdinal3",
|
|
296
|
-
"groupPrecedenceOrdinal4",
|
|
297
|
-
"groupPrecedenceOrdinal5",
|
|
298
|
-
"groupPrecedenceOrdinal6",
|
|
299
|
-
"groupPrecedenceOrdinal7",
|
|
300
|
-
"groupPrecedenceOrdinal8",
|
|
301
|
-
"groupPrecedenceOrdinal9",
|
|
302
|
-
"groupPrecedenceOrdinal10",
|
|
303
|
-
"groupPrecedenceOrdinalLast",
|
|
304
|
-
"groupColor1",
|
|
305
|
-
"groupColor2",
|
|
306
|
-
"groupColor3",
|
|
307
|
-
"unknown"
|
|
308
|
-
],
|
|
309
|
-
sortBy: "name"
|
|
310
|
-
}
|
|
311
|
-
],
|
|
312
|
-
"perfectionist/sort-sets": "error",
|
|
313
|
-
"perfectionist/sort-switch-case": "error",
|
|
314
|
-
"perfectionist/sort-union-types": "error",
|
|
315
|
-
"perfectionist/sort-variable-declarations": ["error", { partitionByComment: false }]
|
|
316
|
-
};
|
|
317
|
-
|
|
318
|
-
export default perfectionistRules;
|
package/rules/promise.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @import { Linter } from "eslint";
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @satisfies {Linter.RulesRecord}
|
|
7
|
-
*/
|
|
8
|
-
const promiseRules = {
|
|
9
|
-
"promise/always-return": [
|
|
10
|
-
"error",
|
|
11
|
-
{
|
|
12
|
-
ignoreAssignmentVariable: ["globalThis"],
|
|
13
|
-
ignoreLastCallback: false
|
|
14
|
-
}
|
|
15
|
-
],
|
|
16
|
-
"promise/avoid-new": "off",
|
|
17
|
-
"promise/catch-or-return": [
|
|
18
|
-
"error",
|
|
19
|
-
{
|
|
20
|
-
allowFinally: false,
|
|
21
|
-
allowThen: false,
|
|
22
|
-
allowThenStrict: false,
|
|
23
|
-
terminationMethod: ["catch"]
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
"promise/no-callback-in-promise": "error",
|
|
27
|
-
"promise/no-multiple-resolved": "error",
|
|
28
|
-
"promise/no-native": "off",
|
|
29
|
-
"promise/no-nesting": "error",
|
|
30
|
-
"promise/no-new-statics": "error",
|
|
31
|
-
"promise/no-promise-in-callback": ["error", { exemptDeclarations: false }],
|
|
32
|
-
"promise/no-return-in-finally": "error",
|
|
33
|
-
"promise/no-return-wrap": "error",
|
|
34
|
-
"promise/param-names": [
|
|
35
|
-
"error",
|
|
36
|
-
{
|
|
37
|
-
rejectPattern: "^reject$",
|
|
38
|
-
resolvePattern: "^resolve$"
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
"promise/prefer-await-to-callbacks": "error",
|
|
42
|
-
"promise/prefer-await-to-then": ["error", { strict: true }],
|
|
43
|
-
"promise/prefer-catch": "error",
|
|
44
|
-
"promise/spec-only": "error",
|
|
45
|
-
"promise/valid-params": ["error", { exclude: [] }]
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
export default promiseRules;
|
package/rules/react/core.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
const coreRules = {
|
|
2
|
-
"@eslint-react/error-boundaries": "error",
|
|
3
|
-
"@eslint-react/exhaustive-deps": "error",
|
|
4
|
-
"@eslint-react/globals": "error",
|
|
5
|
-
"@eslint-react/immutability": "off",
|
|
6
|
-
"@eslint-react/no-access-state-in-setstate": "error",
|
|
7
|
-
"@eslint-react/no-array-index-key": "error",
|
|
8
|
-
"@eslint-react/no-children-count": "error",
|
|
9
|
-
"@eslint-react/no-children-for-each": "error",
|
|
10
|
-
"@eslint-react/no-children-map": "error",
|
|
11
|
-
"@eslint-react/no-children-only": "error",
|
|
12
|
-
"@eslint-react/no-children-to-array": "error",
|
|
13
|
-
"@eslint-react/no-class-component": "error",
|
|
14
|
-
"@eslint-react/no-clone-element": "error",
|
|
15
|
-
"@eslint-react/no-component-will-mount": "error",
|
|
16
|
-
"@eslint-react/no-component-will-receive-props": "error",
|
|
17
|
-
"@eslint-react/no-component-will-update": "error",
|
|
18
|
-
"@eslint-react/no-create-ref": "error",
|
|
19
|
-
"@eslint-react/no-direct-mutation-state": "error",
|
|
20
|
-
"@eslint-react/no-duplicate-key": "error",
|
|
21
|
-
"@eslint-react/no-forward-ref": "error",
|
|
22
|
-
"@eslint-react/no-implicit-children": "error",
|
|
23
|
-
"@eslint-react/no-implicit-key": "error",
|
|
24
|
-
"@eslint-react/no-implicit-ref": "error",
|
|
25
|
-
"@eslint-react/no-leaked-conditional-rendering": "error",
|
|
26
|
-
"@eslint-react/no-missing-component-display-name": "error",
|
|
27
|
-
"@eslint-react/no-missing-key": "error",
|
|
28
|
-
"@eslint-react/no-nested-component-definitions": "error",
|
|
29
|
-
"@eslint-react/no-set-state-in-component-did-mount": "error",
|
|
30
|
-
"@eslint-react/no-set-state-in-component-did-update": "error",
|
|
31
|
-
"@eslint-react/no-set-state-in-component-will-update": "error",
|
|
32
|
-
"@eslint-react/no-unnecessary-use-prefix": "error",
|
|
33
|
-
"@eslint-react/no-unsafe-component-will-mount": "error",
|
|
34
|
-
"@eslint-react/no-unsafe-component-will-receive-props": "error",
|
|
35
|
-
"@eslint-react/no-unsafe-component-will-update": "error",
|
|
36
|
-
"@eslint-react/no-unstable-context-value": "error",
|
|
37
|
-
"@eslint-react/no-unstable-default-props": "error",
|
|
38
|
-
"@eslint-react/no-unused-class-component-members": "error",
|
|
39
|
-
"@eslint-react/no-unused-props": "error",
|
|
40
|
-
"@eslint-react/no-unused-state": "error",
|
|
41
|
-
"@eslint-react/purity": "error",
|
|
42
|
-
"@eslint-react/refs": "error",
|
|
43
|
-
"@eslint-react/rules-of-hooks": "error",
|
|
44
|
-
"@eslint-react/set-state-in-effect": "error",
|
|
45
|
-
"@eslint-react/set-state-in-render": "error",
|
|
46
|
-
"@eslint-react/static-components": "error",
|
|
47
|
-
"@eslint-react/unsupported-syntax": "error",
|
|
48
|
-
"@eslint-react/use-memo": "error",
|
|
49
|
-
"@eslint-react/use-state": [
|
|
50
|
-
"error",
|
|
51
|
-
{
|
|
52
|
-
enforceAssignment: true,
|
|
53
|
-
enforceLazyInitialization: true,
|
|
54
|
-
enforceSetterName: true
|
|
55
|
-
}
|
|
56
|
-
]
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
export default coreRules;
|
package/rules/react/debug.js
DELETED
package/rules/react/dom.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const domRules = {
|
|
2
|
-
"@eslint-react/dom/no-dangerously-set-innerhtml": "error",
|
|
3
|
-
"@eslint-react/dom/no-dangerously-set-innerhtml-with-children": "error",
|
|
4
|
-
"@eslint-react/dom/no-find-dom-node": "error",
|
|
5
|
-
"@eslint-react/dom/no-missing-button-type": "error",
|
|
6
|
-
"@eslint-react/dom/no-missing-iframe-sandbox": "error",
|
|
7
|
-
"@eslint-react/dom/no-render-return-value": "error",
|
|
8
|
-
"@eslint-react/dom/no-script-url": "error",
|
|
9
|
-
"@eslint-react/dom/no-string-style-prop": "error",
|
|
10
|
-
"@eslint-react/dom/no-unsafe-iframe-sandbox": "error",
|
|
11
|
-
"@eslint-react/dom/no-unsafe-target-blank": "error",
|
|
12
|
-
"@eslint-react/dom/no-void-elements-with-children": "error"
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export default domRules;
|
package/rules/react/jsx.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const jsxRules = {
|
|
2
|
-
"@eslint-react/jsx/no-children-prop": "error",
|
|
3
|
-
"@eslint-react/jsx/no-children-prop-with-children": "error",
|
|
4
|
-
"@eslint-react/jsx/no-comment-textnodes": "error",
|
|
5
|
-
"@eslint-react/jsx/no-key-after-spread": "error",
|
|
6
|
-
"@eslint-react/jsx/no-leaked-dollar": "error",
|
|
7
|
-
"@eslint-react/jsx/no-leaked-semicolon": "error",
|
|
8
|
-
"@eslint-react/jsx/no-namespace": "error",
|
|
9
|
-
"@eslint-react/jsx/no-useless-fragment": [
|
|
10
|
-
"error",
|
|
11
|
-
{
|
|
12
|
-
allowEmptyFragment: false,
|
|
13
|
-
allowExpressions: true
|
|
14
|
-
}
|
|
15
|
-
]
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default jsxRules;
|
package/rules/react/rsc.js
DELETED
package/rules/react/web-api.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
const namingConventionRules = {
|
|
2
|
-
"@eslint-react/web-api/no-leaked-event-listener": ["error"],
|
|
3
|
-
"@eslint-react/web-api/no-leaked-fetch": ["error"],
|
|
4
|
-
"@eslint-react/web-api/no-leaked-intersection-observer": ["error"],
|
|
5
|
-
"@eslint-react/web-api/no-leaked-interval": ["error"],
|
|
6
|
-
"@eslint-react/web-api/no-leaked-resize-observer": ["error"],
|
|
7
|
-
"@eslint-react/web-api/no-leaked-timeout": ["error"]
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export default namingConventionRules;
|
package/rules/react.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as reactRuleSets from "./react/_exports.js";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @import { Linter } from "eslint";
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @satisfies {Linter.RulesRecord}
|
|
9
|
-
*/
|
|
10
|
-
const reactRules = Object.values(reactRuleSets)
|
|
11
|
-
.reduce(
|
|
12
|
-
(allRules, ruleSet) => ({
|
|
13
|
-
...allRules,
|
|
14
|
-
...ruleSet
|
|
15
|
-
}),
|
|
16
|
-
{}
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
export default reactRules;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
const bestPracticesRules = {
|
|
2
|
-
"regexp/confusing-quantifier": "error",
|
|
3
|
-
"regexp/control-character-escape": "error",
|
|
4
|
-
"regexp/negation": "error",
|
|
5
|
-
"regexp/no-dupe-characters-character-class": "error",
|
|
6
|
-
"regexp/no-empty-string-literal": "error",
|
|
7
|
-
"regexp/no-extra-lookaround-assertions": "error",
|
|
8
|
-
"regexp/no-invisible-character": "error",
|
|
9
|
-
"regexp/no-legacy-features": "error",
|
|
10
|
-
"regexp/no-non-standard-flag": "error",
|
|
11
|
-
"regexp/no-obscure-range": "error",
|
|
12
|
-
"regexp/no-octal": "error",
|
|
13
|
-
"regexp/no-standalone-backslash": "error",
|
|
14
|
-
"regexp/no-trivially-nested-assertion": "error",
|
|
15
|
-
"regexp/no-trivially-nested-quantifier": "error",
|
|
16
|
-
"regexp/no-unused-capturing-group": "error",
|
|
17
|
-
"regexp/no-useless-character-class": "error",
|
|
18
|
-
"regexp/no-useless-flag": "error",
|
|
19
|
-
"regexp/no-useless-lazy": "error",
|
|
20
|
-
"regexp/no-useless-quantifier": "error",
|
|
21
|
-
"regexp/no-useless-range": "error",
|
|
22
|
-
"regexp/no-useless-set-operand": "error",
|
|
23
|
-
"regexp/no-useless-string-literal": "error",
|
|
24
|
-
"regexp/no-useless-two-nums-quantifier": "error",
|
|
25
|
-
"regexp/no-zero-quantifier": "error",
|
|
26
|
-
"regexp/optimal-lookaround-quantifier": "error",
|
|
27
|
-
"regexp/optimal-quantifier-concatenation": "error",
|
|
28
|
-
"regexp/prefer-escape-replacement-dollar-char": "error",
|
|
29
|
-
"regexp/prefer-predefined-assertion": "error",
|
|
30
|
-
"regexp/prefer-quantifier": "error",
|
|
31
|
-
"regexp/prefer-range": "error",
|
|
32
|
-
"regexp/prefer-regexp-exec": "off",
|
|
33
|
-
"regexp/prefer-regexp-test": "off",
|
|
34
|
-
"regexp/prefer-set-operation": "error",
|
|
35
|
-
"regexp/require-unicode-regexp": "error",
|
|
36
|
-
"regexp/require-unicode-sets-regexp": "error",
|
|
37
|
-
"regexp/simplify-set-operations": "error",
|
|
38
|
-
"regexp/sort-alternatives": "error",
|
|
39
|
-
"regexp/use-ignore-case": "error"
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
export default bestPracticesRules;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
const possibleErrorsRules = {
|
|
2
|
-
"regexp/no-contradiction-with-assertion": "error",
|
|
3
|
-
"regexp/no-control-character": "error",
|
|
4
|
-
"regexp/no-dupe-disjunctions": "error",
|
|
5
|
-
"regexp/no-empty-alternative": "error",
|
|
6
|
-
"regexp/no-empty-capturing-group": "error",
|
|
7
|
-
"regexp/no-empty-character-class": "error",
|
|
8
|
-
"regexp/no-empty-group": "error",
|
|
9
|
-
"regexp/no-empty-lookarounds-assertion": "error",
|
|
10
|
-
"regexp/no-escape-backspace": "error",
|
|
11
|
-
"regexp/no-invalid-regexp": "error",
|
|
12
|
-
"regexp/no-lazy-ends": "error",
|
|
13
|
-
"regexp/no-misleading-capturing-group": "error",
|
|
14
|
-
"regexp/no-misleading-unicode-character": "error",
|
|
15
|
-
"regexp/no-missing-g-flag": "error",
|
|
16
|
-
"regexp/no-optional-assertion": "error",
|
|
17
|
-
"regexp/no-potentially-useless-backreference": "error",
|
|
18
|
-
"regexp/no-super-linear-backtracking": "error",
|
|
19
|
-
"regexp/no-super-linear-move": "error",
|
|
20
|
-
"regexp/no-useless-assertions": "error",
|
|
21
|
-
"regexp/no-useless-backreference": "error",
|
|
22
|
-
"regexp/no-useless-dollar-replacements": "error",
|
|
23
|
-
"regexp/strict": "error"
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export default possibleErrorsRules;
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
const stylisticIssuesRules = {
|
|
2
|
-
"regexp/grapheme-string-literal": "off",
|
|
3
|
-
"regexp/hexadecimal-escape": ["error", "always"],
|
|
4
|
-
"regexp/letter-case": [
|
|
5
|
-
"error",
|
|
6
|
-
{
|
|
7
|
-
caseInsensitive: "lowercase",
|
|
8
|
-
controlEscape: "uppercase",
|
|
9
|
-
hexadecimalEscape: "uppercase",
|
|
10
|
-
unicodeEscape: "uppercase"
|
|
11
|
-
}
|
|
12
|
-
],
|
|
13
|
-
"regexp/match-any": "error",
|
|
14
|
-
"regexp/no-useless-escape": "error",
|
|
15
|
-
"regexp/no-useless-non-capturing-group": "error",
|
|
16
|
-
"regexp/prefer-character-class": "error",
|
|
17
|
-
"regexp/prefer-d": "error",
|
|
18
|
-
"regexp/prefer-lookaround": [
|
|
19
|
-
"error",
|
|
20
|
-
{
|
|
21
|
-
lookbehind: true,
|
|
22
|
-
strictTypes: true
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
|
-
"regexp/prefer-named-backreference": "error",
|
|
26
|
-
"regexp/prefer-named-capture-group": "error",
|
|
27
|
-
"regexp/prefer-named-replacement": [
|
|
28
|
-
"error",
|
|
29
|
-
{
|
|
30
|
-
strictTypes: true
|
|
31
|
-
}
|
|
32
|
-
],
|
|
33
|
-
"regexp/prefer-plus-quantifier": "error",
|
|
34
|
-
"regexp/prefer-question-quantifier": "error",
|
|
35
|
-
"regexp/prefer-result-array-groups": [
|
|
36
|
-
"error",
|
|
37
|
-
{
|
|
38
|
-
strictTypes: true
|
|
39
|
-
}
|
|
40
|
-
],
|
|
41
|
-
"regexp/prefer-star-quantifier": "error",
|
|
42
|
-
"regexp/prefer-unicode-codepoint-escapes": "error",
|
|
43
|
-
"regexp/prefer-w": "error",
|
|
44
|
-
"regexp/sort-character-class-elements": [
|
|
45
|
-
"error",
|
|
46
|
-
{
|
|
47
|
-
order: [
|
|
48
|
-
String.raw`\s`,
|
|
49
|
-
String.raw`\w`,
|
|
50
|
-
String.raw`\d`,
|
|
51
|
-
String.raw`\p`,
|
|
52
|
-
"*",
|
|
53
|
-
String.raw`\q`,
|
|
54
|
-
"[]"
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
],
|
|
58
|
-
"regexp/sort-flags": "error",
|
|
59
|
-
"regexp/unicode-escape": ["error", "unicodeCodePointEscape"],
|
|
60
|
-
"regexp/unicode-property": [
|
|
61
|
-
"error",
|
|
62
|
-
{
|
|
63
|
-
generalCategory: "never",
|
|
64
|
-
key: "ignore",
|
|
65
|
-
property: {
|
|
66
|
-
binary: "ignore",
|
|
67
|
-
generalCategory: "ignore",
|
|
68
|
-
script: "long"
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
]
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
export default stylisticIssuesRules;
|
package/rules/regexp.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import * as regexpRuleSets from "./regexp/_exports.js";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* @import { Linter } from "eslint";
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* @satisfies {Linter.RulesRecord}
|
|
9
|
-
*/
|
|
10
|
-
const regexpRules = Object.values(regexpRuleSets)
|
|
11
|
-
.reduce(
|
|
12
|
-
(allRules, ruleSet) => ({
|
|
13
|
-
...allRules,
|
|
14
|
-
...ruleSet
|
|
15
|
-
}),
|
|
16
|
-
{}
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
export default regexpRules;
|