@kazupon/eslint-config 0.8.0 → 0.9.1

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.
Files changed (64) hide show
  1. package/README.md +1 -0
  2. package/dist/config.d.cts +6 -1
  3. package/dist/config.d.ts +6 -1
  4. package/dist/configs/comments.d.cts +14 -3
  5. package/dist/configs/comments.d.ts +14 -3
  6. package/dist/configs/javascript.d.cts +14 -3
  7. package/dist/configs/javascript.d.ts +14 -3
  8. package/dist/configs/jsdoc.d.cts +24 -4
  9. package/dist/configs/jsdoc.d.ts +24 -4
  10. package/dist/configs/jsonc.d.cts +36 -6
  11. package/dist/configs/jsonc.d.ts +36 -6
  12. package/dist/configs/prettier.d.cts +14 -3
  13. package/dist/configs/prettier.d.ts +14 -3
  14. package/dist/configs/promise.d.cts +14 -3
  15. package/dist/configs/promise.d.ts +14 -3
  16. package/dist/configs/regexp.d.cts +14 -3
  17. package/dist/configs/regexp.d.ts +14 -3
  18. package/dist/configs/typescript.d.cts +33 -6
  19. package/dist/configs/typescript.d.ts +33 -6
  20. package/dist/configs/unicorn.d.cts +14 -3
  21. package/dist/configs/unicorn.d.ts +14 -3
  22. package/dist/configs/vue.d.cts +17 -3
  23. package/dist/configs/vue.d.ts +17 -3
  24. package/dist/configs/yml.d.cts +18 -3
  25. package/dist/configs/yml.d.ts +18 -3
  26. package/dist/globs.d.cts +9 -9
  27. package/dist/globs.d.ts +9 -9
  28. package/dist/index.cjs +24 -11
  29. package/dist/index.d.cts +1 -0
  30. package/dist/index.d.ts +1 -0
  31. package/dist/index.js +24 -11
  32. package/dist/types/gens/comments.d.cts +65 -0
  33. package/dist/types/gens/comments.d.ts +65 -0
  34. package/dist/types/gens/eslint.d.cts +17 -0
  35. package/dist/types/gens/eslint.d.ts +17 -0
  36. package/dist/types/gens/javascript.d.cts +3162 -0
  37. package/dist/types/gens/javascript.d.ts +3162 -0
  38. package/dist/types/gens/jsdoc.d.cts +744 -0
  39. package/dist/types/gens/jsdoc.d.ts +744 -0
  40. package/dist/types/gens/jsonc.d.cts +513 -0
  41. package/dist/types/gens/jsonc.d.ts +513 -0
  42. package/dist/types/gens/prettier.d.cts +2 -0
  43. package/dist/types/gens/prettier.d.ts +2 -0
  44. package/dist/types/gens/promise.d.cts +107 -0
  45. package/dist/types/gens/promise.d.ts +107 -0
  46. package/dist/types/gens/regexp.d.cts +553 -0
  47. package/dist/types/gens/regexp.d.ts +553 -0
  48. package/dist/types/gens/typescript.d.cts +2253 -0
  49. package/dist/types/gens/typescript.d.ts +2253 -0
  50. package/dist/types/gens/unicorn.d.cts +905 -0
  51. package/dist/types/gens/unicorn.d.ts +905 -0
  52. package/dist/types/gens/vue.d.cts +2465 -0
  53. package/dist/types/gens/vue.d.ts +2465 -0
  54. package/dist/types/gens/yml.d.cts +375 -0
  55. package/dist/types/gens/yml.d.ts +375 -0
  56. package/dist/types/index.d.cts +14 -0
  57. package/dist/types/index.d.ts +14 -0
  58. package/dist/types/overrides.d.cts +6 -0
  59. package/dist/types/overrides.d.ts +6 -0
  60. package/dist/types/utils.d.cts +4 -0
  61. package/dist/types/utils.d.ts +4 -0
  62. package/dist/utils.d.cts +22 -1
  63. package/dist/utils.d.ts +22 -1
  64. package/package.json +28 -22
@@ -0,0 +1,107 @@
1
+ import type { Linter } from 'eslint';
2
+ export interface PromiseRules {
3
+ /**
4
+ * Require returning inside each `then()` to create readable and reusable Promise chains.
5
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/always-return.md
6
+ */
7
+ 'promise/always-return'?: Linter.RuleEntry<PromiseAlwaysReturn>;
8
+ /**
9
+ * Disallow creating `new` promises outside of utility libs (use [pify][] instead).
10
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/avoid-new.md
11
+ */
12
+ 'promise/avoid-new'?: Linter.RuleEntry<[]>;
13
+ /**
14
+ * Enforce the use of `catch()` on un-returned promises.
15
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/catch-or-return.md
16
+ */
17
+ 'promise/catch-or-return'?: Linter.RuleEntry<PromiseCatchOrReturn>;
18
+ /**
19
+ * Disallow calling `cb()` inside of a `then()` (use [nodeify][] instead).
20
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-callback-in-promise.md
21
+ */
22
+ 'promise/no-callback-in-promise'?: Linter.RuleEntry<PromiseNoCallbackInPromise>;
23
+ /**
24
+ * Disallow creating new promises with paths that resolve multiple times.
25
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-multiple-resolved.md
26
+ */
27
+ 'promise/no-multiple-resolved'?: Linter.RuleEntry<[]>;
28
+ /**
29
+ * Require creating a `Promise` constructor before using it in an ES5 environment.
30
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-native.md
31
+ */
32
+ 'promise/no-native'?: Linter.RuleEntry<[]>;
33
+ /**
34
+ * Disallow nested `then()` or `catch()` statements.
35
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-nesting.md
36
+ */
37
+ 'promise/no-nesting'?: Linter.RuleEntry<[]>;
38
+ /**
39
+ * Disallow calling `new` on a Promise static method.
40
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-new-statics.md
41
+ */
42
+ 'promise/no-new-statics'?: Linter.RuleEntry<[]>;
43
+ /**
44
+ * Disallow using promises inside of callbacks.
45
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-promise-in-callback.md
46
+ */
47
+ 'promise/no-promise-in-callback'?: Linter.RuleEntry<[]>;
48
+ /**
49
+ * Disallow return statements in `finally()`.
50
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-return-in-finally.md
51
+ */
52
+ 'promise/no-return-in-finally'?: Linter.RuleEntry<[]>;
53
+ /**
54
+ * Disallow wrapping values in `Promise.resolve` or `Promise.reject` when not needed.
55
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/no-return-wrap.md
56
+ */
57
+ 'promise/no-return-wrap'?: Linter.RuleEntry<PromiseNoReturnWrap>;
58
+ /**
59
+ * Enforce consistent param names and ordering when creating new promises.
60
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/param-names.md
61
+ */
62
+ 'promise/param-names'?: Linter.RuleEntry<PromiseParamNames>;
63
+ /**
64
+ * Prefer async/await to the callback pattern.
65
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-callbacks.md
66
+ */
67
+ 'promise/prefer-await-to-callbacks'?: Linter.RuleEntry<[]>;
68
+ /**
69
+ * Prefer `await` to `then()`/`catch()`/`finally()` for reading Promise values.
70
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/prefer-await-to-then.md
71
+ */
72
+ 'promise/prefer-await-to-then'?: Linter.RuleEntry<[]>;
73
+ /**
74
+ * Enforces the proper number of arguments are passed to Promise functions.
75
+ * @see https://github.com/eslint-community/eslint-plugin-promise/blob/main/docs/rules/valid-params.md
76
+ */
77
+ 'promise/valid-params'?: Linter.RuleEntry<[]>;
78
+ }
79
+ type PromiseAlwaysReturn = [] | [
80
+ {
81
+ ignoreLastCallback?: boolean;
82
+ }
83
+ ];
84
+ type PromiseCatchOrReturn = [] | [
85
+ {
86
+ allowFinally?: boolean;
87
+ allowThen?: boolean;
88
+ terminationMethod?: (string | string[]);
89
+ }
90
+ ];
91
+ type PromiseNoCallbackInPromise = [] | [
92
+ {
93
+ exceptions?: string[];
94
+ }
95
+ ];
96
+ type PromiseNoReturnWrap = [] | [
97
+ {
98
+ allowReject?: boolean;
99
+ }
100
+ ];
101
+ type PromiseParamNames = [] | [
102
+ {
103
+ resolvePattern?: string;
104
+ rejectPattern?: string;
105
+ }
106
+ ];
107
+ export {};
@@ -0,0 +1,553 @@
1
+ import type { Linter } from 'eslint';
2
+ export interface RegexpRules {
3
+ /**
4
+ * disallow confusing quantifiers
5
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/confusing-quantifier.html
6
+ */
7
+ 'regexp/confusing-quantifier'?: Linter.RuleEntry<[]>;
8
+ /**
9
+ * enforce consistent escaping of control characters
10
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/control-character-escape.html
11
+ */
12
+ 'regexp/control-character-escape'?: Linter.RuleEntry<[]>;
13
+ /**
14
+ * enforce single grapheme in string literal
15
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/grapheme-string-literal.html
16
+ */
17
+ 'regexp/grapheme-string-literal'?: Linter.RuleEntry<[]>;
18
+ /**
19
+ * enforce consistent usage of hexadecimal escape
20
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/hexadecimal-escape.html
21
+ */
22
+ 'regexp/hexadecimal-escape'?: Linter.RuleEntry<RegexpHexadecimalEscape>;
23
+ /**
24
+ * enforce into your favorite case
25
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/letter-case.html
26
+ */
27
+ 'regexp/letter-case'?: Linter.RuleEntry<RegexpLetterCase>;
28
+ /**
29
+ * enforce match any character style
30
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/match-any.html
31
+ */
32
+ 'regexp/match-any'?: Linter.RuleEntry<RegexpMatchAny>;
33
+ /**
34
+ * enforce use of escapes on negation
35
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/negation.html
36
+ */
37
+ 'regexp/negation'?: Linter.RuleEntry<[]>;
38
+ /**
39
+ * disallow elements that contradict assertions
40
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-contradiction-with-assertion.html
41
+ */
42
+ 'regexp/no-contradiction-with-assertion'?: Linter.RuleEntry<[]>;
43
+ /**
44
+ * disallow control characters
45
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-control-character.html
46
+ */
47
+ 'regexp/no-control-character'?: Linter.RuleEntry<[]>;
48
+ /**
49
+ * disallow duplicate characters in the RegExp character class
50
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-dupe-characters-character-class.html
51
+ */
52
+ 'regexp/no-dupe-characters-character-class'?: Linter.RuleEntry<[]>;
53
+ /**
54
+ * disallow duplicate disjunctions
55
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-dupe-disjunctions.html
56
+ */
57
+ 'regexp/no-dupe-disjunctions'?: Linter.RuleEntry<RegexpNoDupeDisjunctions>;
58
+ /**
59
+ * disallow alternatives without elements
60
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-alternative.html
61
+ */
62
+ 'regexp/no-empty-alternative'?: Linter.RuleEntry<[]>;
63
+ /**
64
+ * disallow capturing group that captures empty.
65
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-capturing-group.html
66
+ */
67
+ 'regexp/no-empty-capturing-group'?: Linter.RuleEntry<[]>;
68
+ /**
69
+ * disallow character classes that match no characters
70
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-character-class.html
71
+ */
72
+ 'regexp/no-empty-character-class'?: Linter.RuleEntry<[]>;
73
+ /**
74
+ * disallow empty group
75
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-group.html
76
+ */
77
+ 'regexp/no-empty-group'?: Linter.RuleEntry<[]>;
78
+ /**
79
+ * disallow empty lookahead assertion or empty lookbehind assertion
80
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-lookarounds-assertion.html
81
+ */
82
+ 'regexp/no-empty-lookarounds-assertion'?: Linter.RuleEntry<[]>;
83
+ /**
84
+ * disallow empty string literals in character classes
85
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-empty-string-literal.html
86
+ */
87
+ 'regexp/no-empty-string-literal'?: Linter.RuleEntry<[]>;
88
+ /**
89
+ * disallow escape backspace (`[\b]`)
90
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-escape-backspace.html
91
+ */
92
+ 'regexp/no-escape-backspace'?: Linter.RuleEntry<[]>;
93
+ /**
94
+ * disallow unnecessary nested lookaround assertions
95
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-extra-lookaround-assertions.html
96
+ */
97
+ 'regexp/no-extra-lookaround-assertions'?: Linter.RuleEntry<[]>;
98
+ /**
99
+ * disallow invalid regular expression strings in `RegExp` constructors
100
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-invalid-regexp.html
101
+ */
102
+ 'regexp/no-invalid-regexp'?: Linter.RuleEntry<[]>;
103
+ /**
104
+ * disallow invisible raw character
105
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-invisible-character.html
106
+ */
107
+ 'regexp/no-invisible-character'?: Linter.RuleEntry<[]>;
108
+ /**
109
+ * disallow lazy quantifiers at the end of an expression
110
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-lazy-ends.html
111
+ */
112
+ 'regexp/no-lazy-ends'?: Linter.RuleEntry<RegexpNoLazyEnds>;
113
+ /**
114
+ * disallow legacy RegExp features
115
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-legacy-features.html
116
+ */
117
+ 'regexp/no-legacy-features'?: Linter.RuleEntry<RegexpNoLegacyFeatures>;
118
+ /**
119
+ * disallow capturing groups that do not behave as one would expect
120
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-misleading-capturing-group.html
121
+ */
122
+ 'regexp/no-misleading-capturing-group'?: Linter.RuleEntry<RegexpNoMisleadingCapturingGroup>;
123
+ /**
124
+ * disallow multi-code-point characters in character classes and quantifiers
125
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-misleading-unicode-character.html
126
+ */
127
+ 'regexp/no-misleading-unicode-character'?: Linter.RuleEntry<RegexpNoMisleadingUnicodeCharacter>;
128
+ /**
129
+ * disallow missing `g` flag in patterns used in `String#matchAll` and `String#replaceAll`
130
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-missing-g-flag.html
131
+ */
132
+ 'regexp/no-missing-g-flag'?: Linter.RuleEntry<RegexpNoMissingGFlag>;
133
+ /**
134
+ * disallow non-standard flags
135
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-non-standard-flag.html
136
+ */
137
+ 'regexp/no-non-standard-flag'?: Linter.RuleEntry<[]>;
138
+ /**
139
+ * disallow obscure character ranges
140
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-obscure-range.html
141
+ */
142
+ 'regexp/no-obscure-range'?: Linter.RuleEntry<RegexpNoObscureRange>;
143
+ /**
144
+ * disallow octal escape sequence
145
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-octal.html
146
+ */
147
+ 'regexp/no-octal'?: Linter.RuleEntry<[]>;
148
+ /**
149
+ * disallow optional assertions
150
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-optional-assertion.html
151
+ */
152
+ 'regexp/no-optional-assertion'?: Linter.RuleEntry<[]>;
153
+ /**
154
+ * disallow backreferences that reference a group that might not be matched
155
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-potentially-useless-backreference.html
156
+ */
157
+ 'regexp/no-potentially-useless-backreference'?: Linter.RuleEntry<[]>;
158
+ /**
159
+ * disallow standalone backslashes (`\`)
160
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-standalone-backslash.html
161
+ */
162
+ 'regexp/no-standalone-backslash'?: Linter.RuleEntry<[]>;
163
+ /**
164
+ * disallow exponential and polynomial backtracking
165
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-super-linear-backtracking.html
166
+ */
167
+ 'regexp/no-super-linear-backtracking'?: Linter.RuleEntry<RegexpNoSuperLinearBacktracking>;
168
+ /**
169
+ * disallow quantifiers that cause quadratic moves
170
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-super-linear-move.html
171
+ */
172
+ 'regexp/no-super-linear-move'?: Linter.RuleEntry<RegexpNoSuperLinearMove>;
173
+ /**
174
+ * disallow trivially nested assertions
175
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-trivially-nested-assertion.html
176
+ */
177
+ 'regexp/no-trivially-nested-assertion'?: Linter.RuleEntry<[]>;
178
+ /**
179
+ * disallow nested quantifiers that can be rewritten as one quantifier
180
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-trivially-nested-quantifier.html
181
+ */
182
+ 'regexp/no-trivially-nested-quantifier'?: Linter.RuleEntry<[]>;
183
+ /**
184
+ * disallow unused capturing group
185
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-unused-capturing-group.html
186
+ */
187
+ 'regexp/no-unused-capturing-group'?: Linter.RuleEntry<RegexpNoUnusedCapturingGroup>;
188
+ /**
189
+ * disallow assertions that are known to always accept (or reject)
190
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-assertions.html
191
+ */
192
+ 'regexp/no-useless-assertions'?: Linter.RuleEntry<[]>;
193
+ /**
194
+ * disallow useless backreferences in regular expressions
195
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-backreference.html
196
+ */
197
+ 'regexp/no-useless-backreference'?: Linter.RuleEntry<[]>;
198
+ /**
199
+ * disallow character class with one character
200
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-character-class.html
201
+ */
202
+ 'regexp/no-useless-character-class'?: Linter.RuleEntry<RegexpNoUselessCharacterClass>;
203
+ /**
204
+ * disallow useless `$` replacements in replacement string
205
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-dollar-replacements.html
206
+ */
207
+ 'regexp/no-useless-dollar-replacements'?: Linter.RuleEntry<[]>;
208
+ /**
209
+ * disallow unnecessary escape characters in RegExp
210
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-escape.html
211
+ */
212
+ 'regexp/no-useless-escape'?: Linter.RuleEntry<[]>;
213
+ /**
214
+ * disallow unnecessary regex flags
215
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-flag.html
216
+ */
217
+ 'regexp/no-useless-flag'?: Linter.RuleEntry<RegexpNoUselessFlag>;
218
+ /**
219
+ * disallow unnecessarily non-greedy quantifiers
220
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-lazy.html
221
+ */
222
+ 'regexp/no-useless-lazy'?: Linter.RuleEntry<[]>;
223
+ /**
224
+ * disallow unnecessary non-capturing group
225
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-non-capturing-group.html
226
+ */
227
+ 'regexp/no-useless-non-capturing-group'?: Linter.RuleEntry<RegexpNoUselessNonCapturingGroup>;
228
+ /**
229
+ * disallow quantifiers that can be removed
230
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-quantifier.html
231
+ */
232
+ 'regexp/no-useless-quantifier'?: Linter.RuleEntry<[]>;
233
+ /**
234
+ * disallow unnecessary character ranges
235
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-range.html
236
+ */
237
+ 'regexp/no-useless-range'?: Linter.RuleEntry<[]>;
238
+ /**
239
+ * disallow unnecessary elements in expression character classes
240
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-set-operand.html
241
+ */
242
+ 'regexp/no-useless-set-operand'?: Linter.RuleEntry<[]>;
243
+ /**
244
+ * disallow string disjunction of single characters in `\q{...}`
245
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-string-literal.html
246
+ */
247
+ 'regexp/no-useless-string-literal'?: Linter.RuleEntry<[]>;
248
+ /**
249
+ * disallow unnecessary `{n,m}` quantifier
250
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-useless-two-nums-quantifier.html
251
+ */
252
+ 'regexp/no-useless-two-nums-quantifier'?: Linter.RuleEntry<[]>;
253
+ /**
254
+ * disallow quantifiers with a maximum of zero
255
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/no-zero-quantifier.html
256
+ */
257
+ 'regexp/no-zero-quantifier'?: Linter.RuleEntry<[]>;
258
+ /**
259
+ * disallow the alternatives of lookarounds that end with a non-constant quantifier
260
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/optimal-lookaround-quantifier.html
261
+ */
262
+ 'regexp/optimal-lookaround-quantifier'?: Linter.RuleEntry<[]>;
263
+ /**
264
+ * require optimal quantifiers for concatenated quantifiers
265
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/optimal-quantifier-concatenation.html
266
+ */
267
+ 'regexp/optimal-quantifier-concatenation'?: Linter.RuleEntry<RegexpOptimalQuantifierConcatenation>;
268
+ /**
269
+ * enforce using character class
270
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-character-class.html
271
+ */
272
+ 'regexp/prefer-character-class'?: Linter.RuleEntry<RegexpPreferCharacterClass>;
273
+ /**
274
+ * enforce using `\d`
275
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-d.html
276
+ */
277
+ 'regexp/prefer-d'?: Linter.RuleEntry<RegexpPreferD>;
278
+ /**
279
+ * enforces escape of replacement `$` character (`$$`).
280
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-escape-replacement-dollar-char.html
281
+ */
282
+ 'regexp/prefer-escape-replacement-dollar-char'?: Linter.RuleEntry<[]>;
283
+ /**
284
+ * prefer lookarounds over capturing group that do not replace
285
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-lookaround.html
286
+ */
287
+ 'regexp/prefer-lookaround'?: Linter.RuleEntry<RegexpPreferLookaround>;
288
+ /**
289
+ * enforce using named backreferences
290
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-named-backreference.html
291
+ */
292
+ 'regexp/prefer-named-backreference'?: Linter.RuleEntry<[]>;
293
+ /**
294
+ * enforce using named capture groups
295
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-named-capture-group.html
296
+ */
297
+ 'regexp/prefer-named-capture-group'?: Linter.RuleEntry<[]>;
298
+ /**
299
+ * enforce using named replacement
300
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-named-replacement.html
301
+ */
302
+ 'regexp/prefer-named-replacement'?: Linter.RuleEntry<RegexpPreferNamedReplacement>;
303
+ /**
304
+ * enforce using `+` quantifier
305
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-plus-quantifier.html
306
+ */
307
+ 'regexp/prefer-plus-quantifier'?: Linter.RuleEntry<[]>;
308
+ /**
309
+ * prefer predefined assertion over equivalent lookarounds
310
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-predefined-assertion.html
311
+ */
312
+ 'regexp/prefer-predefined-assertion'?: Linter.RuleEntry<[]>;
313
+ /**
314
+ * enforce using quantifier
315
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-quantifier.html
316
+ */
317
+ 'regexp/prefer-quantifier'?: Linter.RuleEntry<[]>;
318
+ /**
319
+ * enforce using `?` quantifier
320
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-question-quantifier.html
321
+ */
322
+ 'regexp/prefer-question-quantifier'?: Linter.RuleEntry<[]>;
323
+ /**
324
+ * enforce using character class range
325
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-range.html
326
+ */
327
+ 'regexp/prefer-range'?: Linter.RuleEntry<RegexpPreferRange>;
328
+ /**
329
+ * enforce that `RegExp#exec` is used instead of `String#match` if no global flag is provided
330
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-regexp-exec.html
331
+ */
332
+ 'regexp/prefer-regexp-exec'?: Linter.RuleEntry<[]>;
333
+ /**
334
+ * enforce that `RegExp#test` is used instead of `String#match` and `RegExp#exec`
335
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-regexp-test.html
336
+ */
337
+ 'regexp/prefer-regexp-test'?: Linter.RuleEntry<[]>;
338
+ /**
339
+ * enforce using result array `groups`
340
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-result-array-groups.html
341
+ */
342
+ 'regexp/prefer-result-array-groups'?: Linter.RuleEntry<RegexpPreferResultArrayGroups>;
343
+ /**
344
+ * prefer character class set operations instead of lookarounds
345
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-set-operation.html
346
+ */
347
+ 'regexp/prefer-set-operation'?: Linter.RuleEntry<[]>;
348
+ /**
349
+ * enforce using `*` quantifier
350
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-star-quantifier.html
351
+ */
352
+ 'regexp/prefer-star-quantifier'?: Linter.RuleEntry<[]>;
353
+ /**
354
+ * enforce use of unicode codepoint escapes
355
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-unicode-codepoint-escapes.html
356
+ */
357
+ 'regexp/prefer-unicode-codepoint-escapes'?: Linter.RuleEntry<[]>;
358
+ /**
359
+ * enforce using `\w`
360
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/prefer-w.html
361
+ */
362
+ 'regexp/prefer-w'?: Linter.RuleEntry<[]>;
363
+ /**
364
+ * enforce the use of the `u` flag
365
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/require-unicode-regexp.html
366
+ */
367
+ 'regexp/require-unicode-regexp'?: Linter.RuleEntry<[]>;
368
+ /**
369
+ * enforce the use of the `v` flag
370
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/require-unicode-sets-regexp.html
371
+ */
372
+ 'regexp/require-unicode-sets-regexp'?: Linter.RuleEntry<[]>;
373
+ /**
374
+ * require simplify set operations
375
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/simplify-set-operations.html
376
+ */
377
+ 'regexp/simplify-set-operations'?: Linter.RuleEntry<[]>;
378
+ /**
379
+ * sort alternatives if order doesn't matter
380
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/sort-alternatives.html
381
+ */
382
+ 'regexp/sort-alternatives'?: Linter.RuleEntry<[]>;
383
+ /**
384
+ * enforces elements order in character class
385
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/sort-character-class-elements.html
386
+ */
387
+ 'regexp/sort-character-class-elements'?: Linter.RuleEntry<RegexpSortCharacterClassElements>;
388
+ /**
389
+ * require regex flags to be sorted
390
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/sort-flags.html
391
+ */
392
+ 'regexp/sort-flags'?: Linter.RuleEntry<[]>;
393
+ /**
394
+ * disallow not strictly valid regular expressions
395
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/strict.html
396
+ */
397
+ 'regexp/strict'?: Linter.RuleEntry<[]>;
398
+ /**
399
+ * enforce consistent usage of unicode escape or unicode codepoint escape
400
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/unicode-escape.html
401
+ */
402
+ 'regexp/unicode-escape'?: Linter.RuleEntry<RegexpUnicodeEscape>;
403
+ /**
404
+ * enforce consistent naming of unicode properties
405
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/unicode-property.html
406
+ */
407
+ 'regexp/unicode-property'?: Linter.RuleEntry<RegexpUnicodeProperty>;
408
+ /**
409
+ * use the `i` flag if it simplifies the pattern
410
+ * @see https://ota-meshi.github.io/eslint-plugin-regexp/rules/use-ignore-case.html
411
+ */
412
+ 'regexp/use-ignore-case'?: Linter.RuleEntry<[]>;
413
+ }
414
+ type RegexpHexadecimalEscape = [] | [("always" | "never")];
415
+ type RegexpLetterCase = [] | [
416
+ {
417
+ caseInsensitive?: ("lowercase" | "uppercase" | "ignore");
418
+ unicodeEscape?: ("lowercase" | "uppercase" | "ignore");
419
+ hexadecimalEscape?: ("lowercase" | "uppercase" | "ignore");
420
+ controlEscape?: ("lowercase" | "uppercase" | "ignore");
421
+ }
422
+ ];
423
+ type RegexpMatchAny = [] | [
424
+ {
425
+ allows?: [("[\\s\\S]" | "[\\S\\s]" | "[^]" | "dotAll"), ...(("[\\s\\S]" | "[\\S\\s]" | "[^]" | "dotAll"))[]];
426
+ }
427
+ ];
428
+ type RegexpNoDupeDisjunctions = [] | [
429
+ {
430
+ report?: ("all" | "trivial" | "interesting");
431
+ reportExponentialBacktracking?: ("none" | "certain" | "potential");
432
+ reportUnreachable?: ("certain" | "potential");
433
+ }
434
+ ];
435
+ type RegexpNoLazyEnds = [] | [
436
+ {
437
+ ignorePartial?: boolean;
438
+ }
439
+ ];
440
+ type RegexpNoLegacyFeatures = [] | [
441
+ {
442
+ staticProperties?: ("input" | "$_" | "lastMatch" | "$&" | "lastParen" | "$+" | "leftContext" | "$`" | "rightContext" | "$'" | "$1" | "$2" | "$3" | "$4" | "$5" | "$6" | "$7" | "$8" | "$9")[];
443
+ prototypeMethods?: ("compile")[];
444
+ }
445
+ ];
446
+ type RegexpNoMisleadingCapturingGroup = [] | [
447
+ {
448
+ reportBacktrackingEnds?: boolean;
449
+ }
450
+ ];
451
+ type RegexpNoMisleadingUnicodeCharacter = [] | [
452
+ {
453
+ fixable?: boolean;
454
+ }
455
+ ];
456
+ type RegexpNoMissingGFlag = [] | [
457
+ {
458
+ strictTypes?: boolean;
459
+ }
460
+ ];
461
+ type RegexpNoObscureRange = [] | [
462
+ {
463
+ allowed?: (("all" | "alphanumeric") | [("all" | "alphanumeric")] | [("alphanumeric" | string), ...(("alphanumeric" | string))[]]);
464
+ }
465
+ ];
466
+ type RegexpNoSuperLinearBacktracking = [] | [
467
+ {
468
+ report?: ("certain" | "potential");
469
+ }
470
+ ];
471
+ type RegexpNoSuperLinearMove = [] | [
472
+ {
473
+ report?: ("certain" | "potential");
474
+ ignoreSticky?: boolean;
475
+ ignorePartial?: boolean;
476
+ }
477
+ ];
478
+ type RegexpNoUnusedCapturingGroup = [] | [
479
+ {
480
+ fixable?: boolean;
481
+ allowNamed?: boolean;
482
+ }
483
+ ];
484
+ type RegexpNoUselessCharacterClass = [] | [
485
+ {
486
+ ignores?: string[];
487
+ }
488
+ ];
489
+ type RegexpNoUselessFlag = [] | [
490
+ {
491
+ ignore?: ("i" | "m" | "s" | "g" | "y")[];
492
+ strictTypes?: boolean;
493
+ }
494
+ ];
495
+ type RegexpNoUselessNonCapturingGroup = [] | [
496
+ {
497
+ allowTop?: (boolean | ("always" | "never" | "partial"));
498
+ }
499
+ ];
500
+ type RegexpOptimalQuantifierConcatenation = [] | [
501
+ {
502
+ capturingGroups?: ("ignore" | "report");
503
+ }
504
+ ];
505
+ type RegexpPreferCharacterClass = [] | [
506
+ {
507
+ minAlternatives?: number;
508
+ }
509
+ ];
510
+ type RegexpPreferD = [] | [
511
+ {
512
+ insideCharacterClass?: ("ignore" | "range" | "d");
513
+ }
514
+ ];
515
+ type RegexpPreferLookaround = [] | [
516
+ {
517
+ lookbehind?: boolean;
518
+ strictTypes?: boolean;
519
+ }
520
+ ];
521
+ type RegexpPreferNamedReplacement = [] | [
522
+ {
523
+ strictTypes?: boolean;
524
+ }
525
+ ];
526
+ type RegexpPreferRange = [] | [
527
+ {
528
+ target?: (("all" | "alphanumeric") | [("all" | "alphanumeric")] | [("alphanumeric" | string), ...(("alphanumeric" | string))[]]);
529
+ }
530
+ ];
531
+ type RegexpPreferResultArrayGroups = [] | [
532
+ {
533
+ strictTypes?: boolean;
534
+ }
535
+ ];
536
+ type RegexpSortCharacterClassElements = [] | [
537
+ {
538
+ order?: ("\\s" | "\\w" | "\\d" | "\\p" | "*" | "\\q" | "[]")[];
539
+ }
540
+ ];
541
+ type RegexpUnicodeEscape = [] | [("unicodeCodePointEscape" | "unicodeEscape")];
542
+ type RegexpUnicodeProperty = [] | [
543
+ {
544
+ generalCategory?: ("always" | "never" | "ignore");
545
+ key?: ("short" | "long" | "ignore");
546
+ property?: (("short" | "long" | "ignore") | {
547
+ binary?: ("short" | "long" | "ignore");
548
+ generalCategory?: ("short" | "long" | "ignore");
549
+ script?: ("short" | "long" | "ignore");
550
+ });
551
+ }
552
+ ];
553
+ export {};