@neralabs/rerail-pack-javascript 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +412 -4
- package/licenses/eslint/UPSTREAM.md +5 -5
- package/licenses/eslint-plugin-unicorn/UPSTREAM.md +5 -5
- package/package.json +1 -1
- package/rules/eslint-arrow-body-style.json +1 -1
- package/rules/eslint-capitalized-comments.json +1 -1
- package/rules/eslint-curly.json +1 -1
- package/rules/eslint-default-case-last.json +1 -1
- package/rules/eslint-default-case.json +1 -1
- package/rules/eslint-eqeqeq.json +1 -1
- package/rules/eslint-func-style.json +1 -1
- package/rules/eslint-guard-for-in.json +1 -1
- package/rules/eslint-no-bitwise.json +1 -1
- package/rules/eslint-no-caller.json +2 -2
- package/rules/eslint-no-case-declarations.json +2 -2
- package/rules/eslint-no-compare-neg-zero.json +2 -2
- package/rules/eslint-no-cond-assign.json +1 -1
- package/rules/eslint-no-console.json +1 -1
- package/rules/eslint-no-continue.json +2 -2
- package/rules/eslint-no-debugger.json +1 -1
- package/rules/eslint-no-delete-var.json +2 -2
- package/rules/eslint-no-div-regex.json +1 -1
- package/rules/eslint-no-dupe-keys.json +2 -2
- package/rules/eslint-no-duplicate-case.json +2 -2
- package/rules/eslint-no-empty-pattern.json +1 -1
- package/rules/eslint-no-empty-static-block.json +2 -2
- package/rules/eslint-no-empty.json +2 -2
- package/rules/eslint-no-eq-null.json +1 -1
- package/rules/eslint-no-extend-native.json +1 -1
- package/rules/eslint-no-inline-comments.json +1 -1
- package/rules/eslint-no-iterator.json +1 -1
- package/rules/eslint-no-labels.json +1 -1
- package/rules/eslint-no-loss-of-precision.json +1 -1
- package/rules/eslint-no-multi-str.json +2 -2
- package/rules/eslint-no-negated-condition.json +2 -2
- package/rules/eslint-no-nested-ternary.json +1 -1
- package/rules/eslint-no-new-wrappers.json +1 -1
- package/rules/eslint-no-new.json +2 -2
- package/rules/eslint-no-nonoctal-decimal-escape.json +2 -2
- package/rules/eslint-no-object-constructor.json +1 -1
- package/rules/eslint-no-octal-escape.json +1 -1
- package/rules/eslint-no-octal.json +2 -2
- package/rules/eslint-no-plusplus.json +1 -1
- package/rules/eslint-no-proto.json +1 -1
- package/rules/eslint-no-prototype-builtins.json +3 -3
- package/rules/eslint-no-return-assign.json +1 -1
- package/rules/eslint-no-script-url.json +1 -1
- package/rules/eslint-no-self-compare.json +2 -2
- package/rules/eslint-no-sequences.json +1 -1
- package/rules/eslint-no-setter-return.json +1 -1
- package/rules/eslint-no-sparse-arrays.json +1 -1
- package/rules/eslint-no-template-curly-in-string.json +2 -2
- package/rules/eslint-no-ternary.json +1 -1
- package/rules/eslint-no-unneeded-ternary.json +1 -1
- package/rules/eslint-no-unsafe-finally.json +7 -7
- package/rules/eslint-no-unsafe-negation.json +1 -1
- package/rules/eslint-no-unused-labels.json +1 -1
- package/rules/eslint-no-unused-private-class-members.json +1 -1
- package/rules/eslint-no-useless-call.json +1 -1
- package/rules/eslint-no-useless-catch.json +1 -1
- package/rules/eslint-no-useless-concat.json +1 -1
- package/rules/eslint-no-void.json +1 -1
- package/rules/eslint-no-warning-comments.json +1 -1
- package/rules/eslint-no-with.json +2 -2
- package/rules/eslint-operator-assignment.json +1 -1
- package/rules/eslint-prefer-numeric-literals.json +1 -1
- package/rules/eslint-prefer-spread.json +1 -1
- package/rules/eslint-prefer-template.json +2 -2
- package/rules/eslint-radix.json +2 -2
- package/rules/eslint-sort-imports.json +1 -1
- package/rules/eslint-sort-keys.json +1 -1
- package/rules/eslint-sort-vars.json +1 -1
- package/rules/eslint-use-isnan.json +3 -3
- package/rules/eslint-valid-typeof.json +1 -1
- package/rules/eslint-yoda.json +1 -1
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ It is checked by `npx vitest run test/engine/catalog/packs.test.ts -t "pack java
|
|
|
17
17
|
| `upstream/eslint/` | ESLint's copied test cases (`fixtures/`) and its recording (`fixtures.expected.json`) |
|
|
18
18
|
| `upstream/generate.mjs` | ESLint's recorder |
|
|
19
19
|
| `upstream/eslint-plugin-unicorn/` | eslint-plugin-unicorn's copied test cases, its recording and its recorder (`generate.mjs`) |
|
|
20
|
-
| `upstream/<tool>/gates.yaml`, `recording.lock`, `goldens.tsv` | The port readiness gates' manifest for the tool, the lock naming its recordings (`recording.json`, `corpus.json`,
|
|
20
|
+
| `upstream/<tool>/gates.yaml`, `recording.lock`, `goldens.tsv` | The port readiness gates' manifest for the tool, the lock naming its recordings (`recording.json`, `corpus.json`, kept out of git, by sha256) and its goldens ([docs/port-readiness.md](../../docs/port-readiness.md)) |
|
|
21
21
|
| `candidates/rules/` | Ports of ESLint and eslint-plugin-unicorn rules still being evaluated: listed in `conformance.json`, scored and reported, never gated, never shipped |
|
|
22
22
|
| `licenses/<tool>/` | The tool's licence and `UPSTREAM.md`, listing every copied file |
|
|
23
23
|
|
|
@@ -32,11 +32,15 @@ TypeScript they report overloads, declaration merges and type names, and with bo
|
|
|
32
32
|
port would report the same violation again. `no-loss-of-precision` and `prefer-spread`, which typescript-eslint leaves
|
|
33
33
|
to the core rule on TypeScript, run on every ECMA file.
|
|
34
34
|
|
|
35
|
-
Re-recording
|
|
35
|
+
Re-recording is a maintainer deriving the pack's test data from its pins and archiving it
|
|
36
|
+
([CONTRIBUTING.md](../../CONTRIBUTING.md#pack-test-data)); it is never committed. The recipe
|
|
37
|
+
(`scripts/pack-data/recipes/javascript.ts`) runs each tool's recorder against the pinned tool versions and upstream
|
|
38
|
+
commit (the recorder's header lists them):
|
|
36
39
|
|
|
37
40
|
```sh
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
npm run fixtures:derive -- --pack javascript # every tool
|
|
42
|
+
npm run fixtures:derive -- --pack javascript --tool eslint-plugin-unicorn # one
|
|
43
|
+
npm run fixtures:push -- --pack javascript --tool eslint-plugin-unicorn # on your own branch: archive it and rewrite its test-data.lock
|
|
40
44
|
```
|
|
41
45
|
|
|
42
46
|
Scoring one rule with every false positive and false negative printed:
|
|
@@ -44,3 +48,407 @@ Scoring one rule with every false positive and false negative printed:
|
|
|
44
48
|
```sh
|
|
45
49
|
node --import tsx conformance/languages/cli.ts --pack javascript --rule eslint-use-isnan --fixtures
|
|
46
50
|
```
|
|
51
|
+
|
|
52
|
+
## Rule details
|
|
53
|
+
|
|
54
|
+
What each rule matches beyond its one-line description: exact matching, edge cases, upstream settings and known divergences.
|
|
55
|
+
|
|
56
|
+
### `eslint-accessor-pairs`
|
|
57
|
+
|
|
58
|
+
Port of ESLint accessor-pairs. Default options: setWithoutGet true, getWithoutSet false, enforceForClassMembers true, enforceForTSTypes false. Covers object literals, classes (static and instance members paired separately) and property descriptors passed to Object.defineProperty, Reflect.defineProperty, Object.create or Object.defineProperties. Static keys pair by ESLint's getStaticPropertyName; other keys by their tokens.
|
|
59
|
+
|
|
60
|
+
### `eslint-arrow-body-style`
|
|
61
|
+
|
|
62
|
+
Port of ESLint arrow-body-style, default as-needed. Fixes only when ESLint's comment and ASI guards allow and the rewrite is a template of whole nodes.
|
|
63
|
+
|
|
64
|
+
### `eslint-capitalized-comments`
|
|
65
|
+
|
|
66
|
+
Port of ESLint capitalized-comments, default "always". Tests the first non-whitespace, non-asterisk character for Unicode Ll/Lu case; skips directive comments and URLs. Fix converts the first letter's case.
|
|
67
|
+
|
|
68
|
+
### `eslint-class-methods-use-this`
|
|
69
|
+
|
|
70
|
+
Port of ESLint class-methods-use-this, default options. Flags non-static, non-constructor methods and class fields initialized with a function/arrow whose own body never uses this or super. Nested functions, static blocks and nested class field initializers have their own this; arrows share it. An accessor field (AccessorProperty) is not treated as a field.
|
|
71
|
+
|
|
72
|
+
### `eslint-default-case`
|
|
73
|
+
|
|
74
|
+
Port of ESLint default-case. Only non-empty switches; exempt when the last comment after the last case matches "no default" (case-insensitive, configurable via commentPattern).
|
|
75
|
+
|
|
76
|
+
### `eslint-default-param-last`
|
|
77
|
+
|
|
78
|
+
Port of ESLint default-param-last on JS files. A rest parameter neither counts as required nor is reported (ESLint isRequiredParameter). TypeScript optional params are handled by typescript-eslint-default-param-last.
|
|
79
|
+
|
|
80
|
+
### `eslint-dot-notation`
|
|
81
|
+
|
|
82
|
+
Port of ESLint dot-notation, default options (allowKeywords true). Keys: string, static template, boolean/null literal that is a valid identifier. Reported at the key; no fix when comments sit inside the brackets.
|
|
83
|
+
|
|
84
|
+
### `eslint-eqeqeq`
|
|
85
|
+
|
|
86
|
+
ESLint 10.11.0 eqeqeq, default options (always, null always). Autofixes only when an operand is typeof or both operands are literals of one type.
|
|
87
|
+
|
|
88
|
+
### `eslint-func-name-matching`
|
|
89
|
+
|
|
90
|
+
Port of ESLint func-name-matching, default mode always. Compares against variable, assigned property, object key or class field; string keys only when they are escape-free identifier names. module.exports is exempt by default.
|
|
91
|
+
|
|
92
|
+
### `eslint-func-style`
|
|
93
|
+
|
|
94
|
+
Port of ESLint func-style (default "expression"). Default exports and TypeScript overload implementations are exempt.
|
|
95
|
+
|
|
96
|
+
### `eslint-grouped-accessor-pairs`
|
|
97
|
+
|
|
98
|
+
Port of ESLint grouped-accessor-pairs, default order anyOrder. Reports the latter of a getter/setter pair (only getter and setter of their key in an object, class instance or static members, or TS type) when another member sits between. Static keys pair by getStaticPropertyName, other keys by tokens.
|
|
99
|
+
|
|
100
|
+
### `eslint-guard-for-in`
|
|
101
|
+
|
|
102
|
+
Port of ESLint guard-for-in. Accepted bodies: empty, an if statement, or a block whose first statement is an if that is either the only statement or whose consequent is continue / { continue; }.
|
|
103
|
+
|
|
104
|
+
### `eslint-id-length`
|
|
105
|
+
|
|
106
|
+
Port of ESLint id-length, default min 2 (graphemes), no max, properties always. Covers variables, parameters, functions, classes, members, imports, destructuring targets and assigned properties.
|
|
107
|
+
|
|
108
|
+
### `eslint-max-classes-per-file`
|
|
109
|
+
|
|
110
|
+
Port of ESLint max-classes-per-file, default max 1. Reported at the file's first statement; counts declared and evaluated (expression) classes.
|
|
111
|
+
|
|
112
|
+
### `eslint-max-depth`
|
|
113
|
+
|
|
114
|
+
Port of ESLint max-depth, default 4. Depth counted per function, static block or program.
|
|
115
|
+
|
|
116
|
+
### `eslint-max-nested-callbacks`
|
|
117
|
+
|
|
118
|
+
Port of ESLint max-nested-callbacks with max 10. A callback is a function/arrow passed as a call argument; a callback nested inside more than max callbacks (itself included) is reported at its function head. Nesting depth is not interpolated into the message.
|
|
119
|
+
|
|
120
|
+
### `eslint-max-params`
|
|
121
|
+
|
|
122
|
+
Port of ESLint max-params (default 3) on JS files. Every param counts: plain, defaulted, destructured, rest. Reported at getFunctionHeadLoc's start; message names the function via getFunctionNameWithKind. countThis only affects TS this params; TS declared functions/function types are typescript-eslint-max-params's.
|
|
123
|
+
|
|
124
|
+
### `eslint-max-statements`
|
|
125
|
+
|
|
126
|
+
Port of ESLint max-statements (default 10, ignoreTopLevelFunctions false). Counts statements directly in blocks up to the nearest nested function or class static block; the message's count is only produced where the body holds no nested block.
|
|
127
|
+
|
|
128
|
+
### `eslint-no-alert`
|
|
129
|
+
|
|
130
|
+
Port of ESLint no-alert. Flags alert/confirm/prompt when unshadowed, or as members of unshadowed window, of globalThis when ecmaVersion or globals declare it, or of this at script global scope. Only globalThis honours /* global */ comments.
|
|
131
|
+
|
|
132
|
+
### `eslint-no-array-constructor`
|
|
133
|
+
|
|
134
|
+
Port of ESLint no-array-constructor. Only the global Array; exempt with exactly one non-spread argument or type arguments. Fix to an array literal adds a leading ; when the previous statement would otherwise continue (approximated from its last token).
|
|
135
|
+
|
|
136
|
+
### `eslint-no-await-in-loop`
|
|
137
|
+
|
|
138
|
+
Port of ESLint no-await-in-loop. Flags await expressions, for await loops and await using declarations in a loop's test, update or body with no function or for-await-of loop in between.
|
|
139
|
+
|
|
140
|
+
### `eslint-no-caller`
|
|
141
|
+
|
|
142
|
+
Port of ESLint no-caller; the arguments object is matched through parentheses.
|
|
143
|
+
|
|
144
|
+
### `eslint-no-case-declarations`
|
|
145
|
+
|
|
146
|
+
Port of ESLint no-case-declarations. using declarations, which tree-sitter-typescript 0.23.2 parses as assignments with a using token, count as lexical declarations.
|
|
147
|
+
|
|
148
|
+
### `eslint-no-compare-neg-zero`
|
|
149
|
+
|
|
150
|
+
ESLint 10.11.0 no-compare-neg-zero, default options. -0 is a unary minus on a numeric literal of value 0. Scope only matters to ESLint's Object.is suggestion, which is not a fix.
|
|
151
|
+
|
|
152
|
+
### `eslint-no-cond-assign`
|
|
153
|
+
|
|
154
|
+
Port of ESLint no-cond-assign, default except-parens: an assignment that is itself the test of if/while/do-while/for/ternary unless wrapped in an extra pair of parentheses (for "for", any pair).
|
|
155
|
+
|
|
156
|
+
### `eslint-no-console`
|
|
157
|
+
|
|
158
|
+
Port of ESLint no-console, default allow []. Flags member access on the global console (resolved), reported at the member expression.
|
|
159
|
+
|
|
160
|
+
### `eslint-no-delete-var`
|
|
161
|
+
|
|
162
|
+
Port of ESLint no-delete-var. Reports delete applied to a bare identifier, looking through parentheses.
|
|
163
|
+
|
|
164
|
+
### `eslint-no-div-regex`
|
|
165
|
+
|
|
166
|
+
Port of ESLint no-div-regex. Reports a regex literal whose pattern starts with `=`; the fix (as ESLint) replaces the first `=` with `[=]` (M12b `fix.range` over a regex capture group).
|
|
167
|
+
|
|
168
|
+
### `eslint-no-dupe-class-members`
|
|
169
|
+
|
|
170
|
+
Port of ESLint no-dupe-class-members. Static member names follow ESLint's getStaticPropertyName (via `compare` text `key`); duplicates are counted within the same class and the same staticness. A getter may pair with a setter; constructors and TypeScript overload signatures are ignored.
|
|
171
|
+
|
|
172
|
+
### `eslint-no-dupe-else-if`
|
|
173
|
+
|
|
174
|
+
Port of ESLint no-dupe-else-if. Flags an else-if test that repeats an earlier test of the chain, is an operand of an earlier `||` test, or is an `&&` whose operand repeats an earlier test (one level only). Tests are compared by tokens, with `||`/`&&` operands in either order (ESLint's equal). Divergence: ESLint's full or/and set-cover over the whole chain is not expressed.
|
|
175
|
+
|
|
176
|
+
### `eslint-no-dupe-keys`
|
|
177
|
+
|
|
178
|
+
Port of ESLint 10.11.0 no-dupe-keys, default options. Static keys via ESLint's getStaticPropertyName (`compare` text `key`); a getter may pair with a setter; a non-computed `__proto__: value` is not counted as a key.
|
|
179
|
+
|
|
180
|
+
### `eslint-no-duplicate-case`
|
|
181
|
+
|
|
182
|
+
Port of ESLint 10.11.0 no-duplicate-case, default options. A case test (inside any parentheses) is token-equal (ESLint's equalTokens, via `compare` text `tokens`) to an earlier case of the same switch.
|
|
183
|
+
|
|
184
|
+
### `eslint-no-duplicate-imports`
|
|
185
|
+
|
|
186
|
+
Port of ESLint no-duplicate-imports. With includeExports, re-exports are also checked. Only flags when ESLint's merge rules allow merging (namespace vs named, `export *`, type-only default vs named). Module names are paired by cooked value trimmed the way JavaScript trims (`transform` with `value: true`), and the message names the trimmed value. Options (includeExports, allowSeparateTypeImports) live in the `options` define; a variant is a config patch.
|
|
187
|
+
|
|
188
|
+
### `eslint-no-empty`
|
|
189
|
+
|
|
190
|
+
Port of ESLint no-empty. Function bodies, class static blocks and TS module bodies are not checked; a block or switch with a comment is not empty. Option allowEmptyCatch in the `options` define.
|
|
191
|
+
|
|
192
|
+
### `eslint-no-empty-function`
|
|
193
|
+
|
|
194
|
+
Port of ESLint no-empty-function, default options (allow: []). A body holding a comment is not empty; constructors with parameter properties are exempt.
|
|
195
|
+
|
|
196
|
+
### `eslint-no-empty-pattern`
|
|
197
|
+
|
|
198
|
+
Port of ESLint no-empty-pattern. Option allowObjectPatternsAsParameters in the `options` define.
|
|
199
|
+
|
|
200
|
+
### `eslint-no-empty-static-block`
|
|
201
|
+
|
|
202
|
+
Port of ESLint no-empty-static-block. A comment inside the braces makes it non-empty; a trailing comment the grammar attaches after the closing brace does not count.
|
|
203
|
+
|
|
204
|
+
### `eslint-no-eq-null`
|
|
205
|
+
|
|
206
|
+
Port of ESLint no-eq-null. Reports `==` and `!=` with a `null` operand, looking through parentheses.
|
|
207
|
+
|
|
208
|
+
### `eslint-no-eval`
|
|
209
|
+
|
|
210
|
+
Port of ESLint no-eval, default allowIndirect false. Indirect uses flagged: references to the global eval; eval read from a global object (global/window/globalThis, when declared by the configured languageOptions or at the top level of a script); and `this.eval` where `this` is the global object (top level of a script or CommonJS file, or a non-strict function via `resolves.this` with `sloppyFunctions`, strictness from languageOptions) whose call binds the default `this`. Which calls rebind `this` (methods, bind/call/apply, thisArg callbacks, capitalized constructors) is ESLint's heuristic, approximated structurally. Shadowing resolved with `resolves`.
|
|
211
|
+
|
|
212
|
+
### `eslint-no-extend-native`
|
|
213
|
+
|
|
214
|
+
Port of ESLint no-extend-native. Flags assignment to a property of `<Builtin>.prototype`, or passing it to Object.defineProperty/defineProperties, for the ECMAScript builtins ESLint lists, filtered by the configured ecmaVersion and globals (`ast.languageOptions`). The builtin must resolve to the global (`resolves`). Option exceptions (default []).
|
|
215
|
+
|
|
216
|
+
### `eslint-no-extra-bind`
|
|
217
|
+
|
|
218
|
+
Port of ESLint no-extra-bind. Only `.bind(x)` with exactly one argument; the fix removes the call when the argument is side-effect free and no comment is inside.
|
|
219
|
+
|
|
220
|
+
### `eslint-no-extra-label`
|
|
221
|
+
|
|
222
|
+
Port of ESLint no-extra-label. Fix removes the label when the statement holds no comment.
|
|
223
|
+
|
|
224
|
+
### `eslint-no-implied-eval`
|
|
225
|
+
|
|
226
|
+
Port of ESLint 10.11.0 no-implied-eval, default options. setTimeout/setInterval/execScript called directly or through window/self/global/globalThis, with a first argument that is a string (followed through effectively-constant bindings: `value.follow`), a template literal, or a `+` with such an operand. Those names count only when the configured ecmaVersion and globals declare them (`ast.languageOptions`) and nothing shadows them (`resolves`).
|
|
227
|
+
|
|
228
|
+
### `eslint-no-inline-comments`
|
|
229
|
+
|
|
230
|
+
Port of ESLint no-inline-comments. A comment is reported when a token or comment ends on its start line before it, or starts on its end line after it (`layout` gaps, comments included). Exceptions: ESLint directive comments (isDirectiveComment prefixes), and a comment alone in a JSX expression container whose line holds only `{` before and `}` after. Option ignorePattern.
|
|
231
|
+
|
|
232
|
+
### `eslint-no-irregular-whitespace`
|
|
233
|
+
|
|
234
|
+
Port of ESLint no-irregular-whitespace. Reports every maximal run of irregular whitespace and every U+2028/U+2029 (`finding.each` over a regex group): inside tokens ESLint does not skip (comments, regex literals, template chunks), between tokens via a lexer regex over the program text and each template substitution that consumes non-code (comments, strings, templates, regex literals at the start or after a punctuator), and in the file's leading whitespace before the first token (only its first three runs or line terminators). Options skipComments/skipTemplates/skipRegExps/skipJSXText/skipStrings.
|
|
235
|
+
|
|
236
|
+
### `eslint-no-iterator`
|
|
237
|
+
|
|
238
|
+
Port of ESLint no-iterator. Member accesses whose static property name (getStaticPropertyName) is `__iterator__`: a non-computed name (identifier escapes decoded), or a string or substitution-free template index by its cooked value.
|
|
239
|
+
|
|
240
|
+
### `eslint-no-labels`
|
|
241
|
+
|
|
242
|
+
Port of ESLint no-labels. Options allowLoop and allowSwitch in the `options` define.
|
|
243
|
+
|
|
244
|
+
### `eslint-no-lonely-if`
|
|
245
|
+
|
|
246
|
+
Port of ESLint no-lonely-if. Only when the else block's braces are not necessary; fixes to `else if` under ESLint's comment and ASI guards (ASI guard approximated conservatively).
|
|
247
|
+
|
|
248
|
+
### `eslint-no-loss-of-precision`
|
|
249
|
+
|
|
250
|
+
Port of ESLint no-loss-of-precision. Binary literals whose significant bits span more than 53; decimal literals whose significant digits differ from the stored number's (String(v) through `transform` with `value: true`, overflow to Infinity and underflow to zero included); hex and octal literals checked like binary by significant-bit span.
|
|
251
|
+
|
|
252
|
+
### `eslint-no-magic-numbers`
|
|
253
|
+
|
|
254
|
+
Port of ESLint no-magic-numbers. Numeric literals (with a leading unary +/-) are flagged except variable initialisers, object properties, member assignments, parseInt radixes and JSX containers. Options (ignore, ignoreArrayIndexes, ignoreDefaultValues, ignoreClassFieldInitialValues, enforceConst, detectObjects, ...) in the `options` define.
|
|
255
|
+
|
|
256
|
+
### `eslint-no-multi-assign`
|
|
257
|
+
|
|
258
|
+
Port of ESLint no-multi-assign. Flags an assignment used (through parentheses) as a variable initializer, a class field value or another assignment's value. Option ignoreNonDeclaration.
|
|
259
|
+
|
|
260
|
+
### `eslint-no-multi-str`
|
|
261
|
+
|
|
262
|
+
Port of ESLint no-multi-str. Not reported when the string's parent is a JSX attribute or JSX expression container.
|
|
263
|
+
|
|
264
|
+
### `eslint-no-negated-condition`
|
|
265
|
+
|
|
266
|
+
Port of ESLint no-negated-condition. Flags `if` with a plain (non-else-if) `else`, and ternaries, whose test is `!x`, `!=` or `!==`.
|
|
267
|
+
|
|
268
|
+
### `eslint-no-nested-ternary`
|
|
269
|
+
|
|
270
|
+
Port of ESLint no-nested-ternary. Consequent or alternate checked through parentheses.
|
|
271
|
+
|
|
272
|
+
### `eslint-no-new`
|
|
273
|
+
|
|
274
|
+
Port of ESLint no-new. An expression statement whose expression (through parentheses) is a `new` expression.
|
|
275
|
+
|
|
276
|
+
### `eslint-no-new-func`
|
|
277
|
+
|
|
278
|
+
Port of ESLint no-new-func. Calling or constructing the global Function, or calling its apply/bind/call (resolved with `resolves`).
|
|
279
|
+
|
|
280
|
+
### `eslint-no-new-wrappers`
|
|
281
|
+
|
|
282
|
+
Port of ESLint 10.11.0 no-new-wrappers, default options. Global String/Number/Boolean resolved with `resolves`.
|
|
283
|
+
|
|
284
|
+
### `eslint-no-obj-calls`
|
|
285
|
+
|
|
286
|
+
Port of ESLint `no-obj-calls`. Flags calling or constructing Atomics, JSON, Math, Reflect, Intl or Temporal directly, through a global object (globalThis/window/self/global), or through an effectively constant variable whose binding holds one (resolved recursively via `resolves.binding`). Names count only when the configured ecmaVersion and globals declare them (`ast.languageOptions`) and nothing shadows them.
|
|
287
|
+
|
|
288
|
+
### `eslint-no-object-constructor`
|
|
289
|
+
|
|
290
|
+
Only flags `Object()` / `new Object()` without arguments when `Object` resolves to the global. ESLint offers only a suggestion, so no fix is declared.
|
|
291
|
+
|
|
292
|
+
### `eslint-no-proto`
|
|
293
|
+
|
|
294
|
+
Matches member accesses whose static property name (ESLint getStaticPropertyName) is `__proto__`: a non-computed name with identifier escapes decoded, or a string or substitution-free template index by its cooked value.
|
|
295
|
+
|
|
296
|
+
### `eslint-no-redeclare`
|
|
297
|
+
|
|
298
|
+
Flags each definition after the first in the same scope (`binds.redefines`); with builtinGlobals, definitions of a configured or `/* global */`-declared global (`binds.builtin`). Inside `/* global */` comments it reports per item (M12a eslintDirective parse): an item naming a builtin/configured global, one an identifier declares in the global scope, or one an earlier global comment names.
|
|
299
|
+
|
|
300
|
+
### `eslint-no-return-assign`
|
|
301
|
+
|
|
302
|
+
Default `except-parens`: an unparenthesized assignment whose nearest statement/function/class ancestor is a `return` or an expression-bodied arrow, reported at that ancestor.
|
|
303
|
+
|
|
304
|
+
### `eslint-no-script-url`
|
|
305
|
+
|
|
306
|
+
Matches string literals and untagged, substitution-free template literals whose value starts with `javascript:` case-insensitively: cooked value, or for JSX attribute strings the raw text with HTML character references decoded. Default options of ESLint 10.11.0.
|
|
307
|
+
|
|
308
|
+
### `eslint-no-self-assign`
|
|
309
|
+
|
|
310
|
+
Covers `=`, `&&=`, `||=`, `??=` for identifiers and member chains with equal tokens, or one level deep equal objects and static property names (props: true). Destructuring follows ESLint's eachSelfAssignment: i-th array elements compared by index with holes counted, nothing after a right spread, a rest against a last spread; object properties by static key after the right object's last spread. Unrolled to 3 nested containers.
|
|
311
|
+
|
|
312
|
+
### `eslint-no-self-compare`
|
|
313
|
+
|
|
314
|
+
Operands compared by tokens, ignoring comments and parentheses around an operand (as ESTree drops them). Covers equality and relational operators.
|
|
315
|
+
|
|
316
|
+
### `eslint-no-sequences`
|
|
317
|
+
|
|
318
|
+
Default allowInParentheses: true. Exempts for-loop init/update and sequences wrapped in parentheses (doubled parentheses where the grammar already requires them, e.g. in an if condition).
|
|
319
|
+
|
|
320
|
+
### `eslint-no-setter-return`
|
|
321
|
+
|
|
322
|
+
Covers class/object `set` accessors and the `set` function of a descriptor passed to Object.defineProperty, Reflect.defineProperty, Object.defineProperties or Object.create, including an arrow setter's expression body. `Object` and `Reflect` must resolve to declared globals.
|
|
323
|
+
|
|
324
|
+
### `eslint-no-template-curly-in-string`
|
|
325
|
+
|
|
326
|
+
Value checked cooked, or for JSX attribute strings raw with HTML character references decoded.
|
|
327
|
+
|
|
328
|
+
### `eslint-no-unexpected-multiline`
|
|
329
|
+
|
|
330
|
+
Flags a line break before the `(` (or `<` of type arguments) of a call with arguments, the `[` of a computed member access, the template of a tagged template, or the first `/` of a division whose second `/` is directly followed by regex flags. Optional calls and members are skipped.
|
|
331
|
+
|
|
332
|
+
### `eslint-no-unneeded-ternary`
|
|
333
|
+
|
|
334
|
+
Fixes follow ESLint: invert the test, coerce with `!!`, or collapse; default-assignment form (`x ? x : y`) becomes `x || y`.
|
|
335
|
+
|
|
336
|
+
### `eslint-no-unsafe-finally`
|
|
337
|
+
|
|
338
|
+
A jump counts when the nearest finally lies before a function/class boundary; for unlabeled break/continue also before any enclosing loop or switch, and for a labeled jump before the labeled statement it targets.
|
|
339
|
+
|
|
340
|
+
### `eslint-no-unsafe-negation`
|
|
341
|
+
|
|
342
|
+
Relational operators (<, >, <=, >=) are only checked when enforceForOrderingRelations is enabled (off by default).
|
|
343
|
+
|
|
344
|
+
### `eslint-no-unsafe-optional-chaining`
|
|
345
|
+
|
|
346
|
+
Short-circuit propagates through parentheses, await, ||/??/&& operands, the last sequence element and ternary branches. Unsafe positions: callee, member object, tagged template, new, destructuring source, extends, for-of, non-object spread, in/instanceof, with. Arithmetic on optional chains only with disallowArithmeticOperators (off by default).
|
|
347
|
+
|
|
348
|
+
### `eslint-no-unused-expressions`
|
|
349
|
+
|
|
350
|
+
Unwraps parentheses and TS `as`/`<T>`/`!`/instantiation wrappers. Allowed: call, new, assignment, update, await, yield, import(), void, delete; directive prologue strings exempt. When ecmaVersion is at most 3 (no directive prologues), directive-shaped strings are reported too.
|
|
351
|
+
|
|
352
|
+
### `eslint-no-unused-labels`
|
|
353
|
+
|
|
354
|
+
Fix removes the label only when no comment sits between label and body, the body cannot become a directive, and removal creates no ASI hazard.
|
|
355
|
+
|
|
356
|
+
### `eslint-no-unused-private-class-members`
|
|
357
|
+
|
|
358
|
+
Uses `binds.used: false` on the private name: writes alone don't count as use for fields and methods, any reference counts for accessors. Reported at the last declaration. ESLint 10.11.0 defaults.
|
|
359
|
+
|
|
360
|
+
### `eslint-no-unused-vars`
|
|
361
|
+
|
|
362
|
+
Covers variables, parameters, caught errors, imports, types and type parameters. Reported where ESLint reports (the last write from the variable's own function, else its first definition) via `binds` and `resolves.write: "last"`; options filter on those. Also flags names matching an ignore pattern that are in fact used. An unused `/* global */` name with no declaration is reported at the name in the first comment that declares it (first three names of a comment).
|
|
363
|
+
|
|
364
|
+
### `eslint-no-useless-call`
|
|
365
|
+
|
|
366
|
+
thisArg must be token-equal (ESLint equalTokens) to the object `f` is read from, or null/undefined when `f` is not a member access.
|
|
367
|
+
|
|
368
|
+
### `eslint-no-useless-catch`
|
|
369
|
+
|
|
370
|
+
Catch whose first statement rethrows its own identifier parameter: reports the whole try statement when there is no finally, else just the catch clause.
|
|
371
|
+
|
|
372
|
+
### `eslint-no-useless-computed-key`
|
|
373
|
+
|
|
374
|
+
Default enforceForClassMembers: true. Object-literal exemptions for `__proto__`/`constructor`/`prototype` by cooked value. Fix replaces with the literal unless a comment sits in the brackets.
|
|
375
|
+
|
|
376
|
+
### `eslint-no-useless-concat`
|
|
377
|
+
|
|
378
|
+
Port of ESLint no-useless-concat. Flags a `+` whose nearest operands (looking through nested `+` chains and parentheses) are both string or template literals, and only when the right literal starts on the line where the left one ends (multi-line concatenation is allowed).
|
|
379
|
+
|
|
380
|
+
### `eslint-no-useless-constructor`
|
|
381
|
+
|
|
382
|
+
Flags an empty constructor only in a class without `extends`; otherwise a constructor whose body is only a `super(...)` call passing its parameters through unchanged. Pass-through follows ESLint's isPassingThrough for any number of simple parameters: each parameter and super argument matched by index and name, including a spread of a rest parameter, or a single spread of `arguments`.
|
|
383
|
+
|
|
384
|
+
### `eslint-one-var`
|
|
385
|
+
|
|
386
|
+
Port of ESLint one-var with default options (`always`). var scope is the enclosing function, let/const scope the enclosing block. `using` declarations are not modelled (grammar gap).
|
|
387
|
+
|
|
388
|
+
### `eslint-operator-assignment`
|
|
389
|
+
|
|
390
|
+
Default option `always`. References compared like ESLint's isSameReference without static computed keys; the operator's left operand is checked first, then the right for commutative operators. ESLint's canBeFixed gates the fix.
|
|
391
|
+
|
|
392
|
+
### `eslint-prefer-destructuring`
|
|
393
|
+
|
|
394
|
+
Checks declarations and assignments, array and object. Object destructuring only where the target name equals the property name. Array: plain (non-optional) access with an integer literal index (Number.isInteger); super and #private accesses skipped. Fix (object declarations only) as ESLint: only when no comment lies outside the object.
|
|
395
|
+
|
|
396
|
+
### `eslint-prefer-exponentiation-operator`
|
|
397
|
+
|
|
398
|
+
Flags global `Math.pow` including `globalThis.Math.pow`, computed and optional-chain forms; Math/globalThis resolved via scope. Fix split per parenthesization of base, exponent and result; cases ESLint fixes using token-adjacency spacing or a leading `;` get no fix.
|
|
399
|
+
|
|
400
|
+
### `eslint-prefer-numeric-literals`
|
|
401
|
+
|
|
402
|
+
Flags `parseInt` / `Number.parseInt` (global, scope-resolved) with a string literal and a radix literal of 2, 8 or 16; fixes to 0b/0o/0x only when the string is a valid literal body.
|
|
403
|
+
|
|
404
|
+
### `eslint-prefer-object-has-own`
|
|
405
|
+
|
|
406
|
+
Flags `Object.prototype.hasOwnProperty.call`, `Object.hasOwnProperty.call` and `({}).hasOwnProperty.call` when Object is the global. The `({})` form has no Object token to resolve and keeps an approximate scope graph.
|
|
407
|
+
|
|
408
|
+
### `eslint-prefer-spread`
|
|
409
|
+
|
|
410
|
+
Flags `f.apply(thisArg, args)` with a non-literal argument list when thisArg is null/undefined for a plain function, or has the same tokens as the applied method's object (ESLint equalTokens).
|
|
411
|
+
|
|
412
|
+
### `eslint-prefer-template`
|
|
413
|
+
|
|
414
|
+
Reports the outermost `+` concatenation chain that mixes a string literal with a non-string operand.
|
|
415
|
+
|
|
416
|
+
### `eslint-radix`
|
|
417
|
+
|
|
418
|
+
ESLint 10.11.0 radix, default options. Flags global parseInt / Number.parseInt with no arguments, no radix, or a radix that is not an integer 2..36 (any literal not such a Number, signed Number literals likewise, or the global `undefined`). The deprecated 'always'/'as-needed' option changes nothing.
|
|
419
|
+
|
|
420
|
+
### `eslint-require-await`
|
|
421
|
+
|
|
422
|
+
Reports an async non-generator function with a non-empty body that contains no await expression, for-await or await-using of its own.
|
|
423
|
+
|
|
424
|
+
### `eslint-sort-imports`
|
|
425
|
+
|
|
426
|
+
Each import compared with the previous declaration: member-syntax group order (none, all, multiple, single), then first local name within a group; specifiers sorted by local name (first unsorted one reported). No fix (ESLint's fix sorts a list).
|
|
427
|
+
|
|
428
|
+
### `eslint-sort-keys`
|
|
429
|
+
|
|
430
|
+
Default options: asc, case-sensitive, minKeys 2. Compares each key with the previous named key; a spread resets. Static key names; a computed identifier key compared by its name.
|
|
431
|
+
|
|
432
|
+
### `eslint-sort-vars`
|
|
433
|
+
|
|
434
|
+
Flags an identifier declarator when an earlier identifier declarator of the same declaration sorts after it. ESLint's sorting autofix is not reproduced.
|
|
435
|
+
|
|
436
|
+
### `eslint-strict`
|
|
437
|
+
|
|
438
|
+
Default `safe` mode: `global` for CommonJS or globalReturn, else `function`. Each check gated on the case's languageOptions as ESLint picks the mode: module code reports every directive as 'module'; impliedStrict (outside modules) as 'implied'.
|
|
439
|
+
|
|
440
|
+
### `eslint-use-isnan`
|
|
441
|
+
|
|
442
|
+
ESLint 10.11.0 use-isnan defaults: enforceForSwitchCase true, enforceForIndexOf false. NaN and Number are scope-resolved so a shadowing binding does not fire.
|
|
443
|
+
|
|
444
|
+
### `eslint-valid-typeof`
|
|
445
|
+
|
|
446
|
+
Default requireStringLiterals false. Also flags the global `undefined` (scope-resolved) compared with typeof.
|
|
447
|
+
|
|
448
|
+
### `eslint-vars-on-top`
|
|
449
|
+
|
|
450
|
+
A var must sit directly in a program, function body or static block, preceded only by declarations (after a leading run of directives and imports, except in static blocks).
|
|
451
|
+
|
|
452
|
+
### `eslint-yoda`
|
|
453
|
+
|
|
454
|
+
Options ["never", {"default": true}] i.e. exceptRange false. Literals: string, number/bigint, boolean, null, regex, substitution-free template, negated number; parentheses transparent.
|
|
@@ -14,7 +14,7 @@ Each copied file is the `code` of one of the rule's own `valid` or `invalid` Rul
|
|
|
14
14
|
left out, and identical code in the same language is written once. The port readiness gates' recorder (`npm run port-readiness:record`)
|
|
15
15
|
reuses those files and writes every other case the gates read, the same verbatim `code`, as
|
|
16
16
|
`upstream/eslint/fixtures/<rule>/<sha256 prefix>.<ext>`. Its recording (`recording.json`, which
|
|
17
|
-
`upstream/eslint/recording.lock` names
|
|
17
|
+
`upstream/eslint/recording.lock` names by its sha256; it is cached, not committed) also holds the `code` of every RuleTester case of
|
|
18
18
|
ESLint's rule tests, verbatim, as the words `not-overfit` reads.
|
|
19
19
|
|
|
20
20
|
Paths are relative to the pack directory, `packs/javascript/`.
|
|
@@ -10381,8 +10381,8 @@ Paths are relative to the pack directory, `packs/javascript/`.
|
|
|
10381
10381
|
| `upstream/eslint/fixtures/yoda/146.js` | `tests/lib/rules/yoda.js` | derived |
|
|
10382
10382
|
|
|
10383
10383
|
> `recording.json` is a port readiness recording, and no file of this pack, so it is recorded here rather than in the
|
|
10384
|
-
> table above: the tool-pack's `recording.lock` names it
|
|
10385
|
-
> It carries excerpts of this upstream's tests (`tests/lib/rules/*.js`: the `code` of each
|
|
10386
|
-
> redistributed under the licence above, together with Rerail's Apache-2.0;
|
|
10387
|
-
> upstream's own, at the pinned commit.
|
|
10384
|
+
> table above: the tool-pack's `recording.lock` names it by its sha256, and the bytes are an object in S3, not a file in
|
|
10385
|
+
> git (docs/port-readiness.md). It carries excerpts of this upstream's tests (`tests/lib/rules/*.js`: the `code` of each
|
|
10386
|
+
> RuleTester case), redistributed under the licence above, together with Rerail's Apache-2.0; `LICENSE` beside this file
|
|
10387
|
+
> is this upstream's own, at the pinned commit.
|
|
10388
10388
|
|
|
@@ -11,7 +11,7 @@ Each copied file is the `code` of one of the rule's own `valid` or `invalid` tes
|
|
|
11
11
|
recorder: cases for another parser or file type are left out, and identical cases are written once. The port readiness gates'
|
|
12
12
|
recorder (`npm run port-readiness:record`) reuses those files and writes every other case the gates read, the same verbatim
|
|
13
13
|
`code`, as `upstream/eslint-plugin-unicorn/fixtures/<rule>/<sha256 prefix>.<ext>`. Its recording (`recording.json`,
|
|
14
|
-
which `upstream/eslint-plugin-unicorn/recording.lock` names
|
|
14
|
+
which `upstream/eslint-plugin-unicorn/recording.lock` names by its sha256; it is cached, not committed) also holds the `code` of every
|
|
15
15
|
test case of the plugin's rule tests, verbatim, as the words `not-overfit` reads.
|
|
16
16
|
|
|
17
17
|
Paths are relative to the pack directory, `packs/javascript/`.
|
|
@@ -327,8 +327,8 @@ Paths are relative to the pack directory, `packs/javascript/`.
|
|
|
327
327
|
| `upstream/eslint-plugin-unicorn/fixtures/prefer-node-protocol/065.ts` | `test/prefer-node-protocol.js` | derived |
|
|
328
328
|
|
|
329
329
|
> `recording.json` is a port readiness recording, and no file of this pack, so it is recorded here rather than in the
|
|
330
|
-
> table above: the tool-pack's `recording.lock` names it
|
|
331
|
-
> It carries excerpts of this upstream's tests (`test/*.js`: the `code` of each RuleTester
|
|
332
|
-
> the licence above, together with Rerail's Apache-2.0;
|
|
333
|
-
> pinned commit.
|
|
330
|
+
> table above: the tool-pack's `recording.lock` names it by its sha256, and the bytes are an object in S3, not a file in
|
|
331
|
+
> git (docs/port-readiness.md). It carries excerpts of this upstream's tests (`test/*.js`: the `code` of each RuleTester
|
|
332
|
+
> case), redistributed under the licence above, together with Rerail's Apache-2.0; `LICENSE` beside this file is this
|
|
333
|
+
> upstream's own, at the pinned commit.
|
|
334
334
|
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"format":"rerail.policy/v1","id":"eslint-arrow-body-style","revision":4,"mode":"steer","description":"Port of ESLint's `arrow-body-style` rule (default options: as-needed). Flags an arrow block body that only returns a value. Fixes when ESLint's comment and ASI guards allow and the rewrite is a template of whole nodes. Options are declared in the `options` define (the rule's defaults); a variant is a config patch.","scope":{"include":["**/*"],"exclude":[]},"clauses":[{"id":"options","define":{"options":{"option":{"type":"string","nullable":true,"default":null},"requireReturnForObjectLiteral":{"type":"boolean","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"already-parenthesized":{"has":{"stopBy":"neighbor","kind":"return_statement","has":{"stopBy":"neighbor","kind":"parenthesized_expression"}}},"arg":{"has":{"stopBy":"neighbor","kind":"return_statement","has":{"stopBy":"neighbor","matches":"return-value","pattern":"$ARG"}}},"arrow-block":{"kind":"statement_block","inside":{"kind":"arrow_function","stopBy":"neighbor"}},"arrow-expression-body":{"not":{"any":[{"kind":"comment"},{"kind":"statement_block"}]},"follows":{"regex":"^=>$","stopBy":"end"},"inside":{"kind":"arrow_function","stopBy":"neighbor"}},"bare-return":{"has":{"stopBy":"neighbor","kind":"return_statement","not":{"has":{"stopBy":"neighbor","matches":"return-value"}}}},"block-statement":{"all":[{"not":{"kind":"comment"}},{"not":{"regex":"^[{}]$"}}]},"first-child":{"not":{"follows":{"regex":"[\\s\\S]"}}},"for-init":{"inside":{"stopBy":"end","follows":{"regex":"^\\($"},"inside":{"kind":"for_statement","stopBy":"neighbor"}}},"hazard-after":{"any":[{"precedes":{"stopBy":{"not":{"kind":"comment"}},"not":{"kind":"comment"},"regex":"^[(\\[/`+-]"}},{"all":[{"not":{"precedes":{"stopBy":"end","not":{"kind":"comment"}}}},{"inside":{"stopBy":"neighbor","matches":"hazard-after"}}]}]},"leads-with-paren-object":{"any":[{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","follows":{"regex":"^\\($"},"matches":"starts-with-object"}},{"has":{"stopBy":"neighbor","all":[{"matches":"first-child"},{"matches":"leads-with-paren-object"}]}}]},"needs-parens":{"any":[{"matches":"object-first"},{"has":{"stopBy":"neighbor","kind":"return_statement","has":{"stopBy":"neighbor","kind":"sequence_expression"}}},{"all":[{"inside":{"kind":"arrow_function","stopBy":"neighbor","has":{"stopBy":"end","kind":"binary_expression","has":{"stopBy":"neighbor","regex":"^in$"}}}},{"inside":{"kind":"arrow_function","stopBy":"neighbor","matches":"for-init"}}]}]},"no-comments":{"all":[{"not":{"has":{"kind":"comment"}}},{"not":{"has":{"kind":"return_statement","has":{"kind":"comment"}}}}]},"object-first":{"has":{"stopBy":"neighbor","kind":"return_statement","has":{"stopBy":"neighbor","matches":"return-value","regex":"^\\{"}}},"return-value":{"not":{"any":[{"kind":"comment"},{"regex":"^(?:return|;)$"}]}},"single-return":{"all":[{"has":{"stopBy":"neighbor","kind":"return_statement","pattern":"$RET"}},{"not":{"has":{"stopBy":"neighbor","all":[{"matches":"block-statement"},{"not":{"kind":"return_statement"}}]}}},{"not":{"has":{"stopBy":"neighbor","kind":"return_statement","precedes":{"kind":"return_statement","stopBy":"end"}}}}]},"starts-with-object":{"any":[{"kind":"object"},{"has":{"stopBy":"neighbor","all":[{"matches":"first-child"},{"matches":"starts-with-object"}]}}]},"unparen":{"any":[{"not":{"kind":"parenthesized_expression"},"pattern":"$INNER"},{"kind":"parenthesized_expression","has":{"not":{"any":[{"kind":"comment"},{"regex":"^[()]$"}]},"matches":"unparen"}}]},"unparen-object":{"any":[{"kind":"object"},{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","matches":"unparen-object"}}]},"r1":{"not":{"has":{"has":{"matches":"unparen-object","stopBy":"neighbor"},"kind":"return_statement","stopBy":"neighbor"}}},"r2":{"has":{"not":{"any":[{"kind":"comment"},{"regex":"^[()]$"}]},"pattern":"$X","stopBy":"neighbor"},"kind":"parenthesized_expression","regex":"^\\(\\{[\\s\\S]*\\S\\)$"},"r3":{"not":{"all":[{"not":{"matches":"bare-return"}},{"matches":"no-comments"},{"not":{"matches":"hazard-after"}},{"matches":"arg"}]}},"r4":{"any":[{"not":{"matches":"needs-parens"}},{"matches":"already-parenthesized"}]},"r5":{"has":{"matches":"block-statement","stopBy":"neighbor"}}}}},{"id":"unexpectedObjectBlock-fix","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"single-return"},{"$option":"requireReturnForObjectLiteral","cases":{"true":[{"matches":"r1"}]},"default":[],"spread":true},{"matches":"object-first"},{"not":{"matches":"bare-return"}},{"matches":"no-comments"},{"not":{"matches":"hazard-after"}},{"matches":"arg"},{"matches":"r4"}]},"when":{"option":{"option":{"in":[null,"never","as-needed"]}}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.","fix":"$ARG","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedObjectBlock-fix-parens","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"single-return"},{"$option":"requireReturnForObjectLiteral","cases":{"true":[{"matches":"r1"}]},"default":[],"spread":true},{"matches":"object-first"},{"not":{"matches":"bare-return"}},{"matches":"no-comments"},{"not":{"matches":"hazard-after"}},{"matches":"arg"},{"matches":"needs-parens"},{"not":{"matches":"already-parenthesized"}}]},"when":{"option":{"option":{"in":[null,"never","as-needed"]}}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.","fix":"($ARG)","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedObjectBlock-nofix","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"single-return"},{"$option":"requireReturnForObjectLiteral","cases":{"true":[{"matches":"r1"}]},"default":[],"spread":true},{"matches":"object-first"},{"matches":"r3"}]},"when":{"option":{"option":{"in":[null,"never","as-needed"]}}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedSingleBlock-fix","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"single-return"},{"$option":"requireReturnForObjectLiteral","cases":{"true":[{"matches":"r1"}]},"default":[],"spread":true},{"not":{"matches":"object-first"}},{"not":{"matches":"bare-return"}},{"matches":"no-comments"},{"not":{"matches":"hazard-after"}},{"matches":"arg"},{"matches":"r4"}]},"when":{"option":{"option":{"in":[null,"never","as-needed"]}}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.","fix":"$ARG","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedSingleBlock-fix-parens","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"single-return"},{"$option":"requireReturnForObjectLiteral","cases":{"true":[{"matches":"r1"}]},"default":[],"spread":true},{"not":{"matches":"object-first"}},{"not":{"matches":"bare-return"}},{"matches":"no-comments"},{"not":{"matches":"hazard-after"}},{"matches":"arg"},{"matches":"needs-parens"},{"not":{"matches":"already-parenthesized"}}]},"when":{"option":{"option":{"in":[null,"never","as-needed"]}}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.","fix":"($ARG)","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedSingleBlock-nofix","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"single-return"},{"$option":"requireReturnForObjectLiteral","cases":{"true":[{"matches":"r1"}]},"default":[],"spread":true},{"not":{"matches":"object-first"}},{"matches":"r3"}]},"when":{"option":{"option":{"in":[null,"never","as-needed"]}}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"expectedBlock-fix","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-expression-body"},{"$option":"option","cases":{"as-needed":[{"matches":"unparen-object"}]},"default":[],"spread":true},{"not":{"matches":"leads-with-paren-object"}},{"matches":"unparen"},{"pattern":"$B"}]},"when":{"option":{"option":{"in":["always","as-needed"]}}}}},"violation":{"anchor":"capture.INNER","code":"arrow-body-style","message":"Expected block statement surrounding arrow body.","fix":"{return $B}","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"expectedBlock-fix-object","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-expression-body"},{"$option":"option","cases":{"as-needed":[{"matches":"unparen-object"}]},"default":[],"spread":true},{"matches":"r2"},{"matches":"unparen"}]},"when":{"option":{"option":{"in":["always","as-needed"]}}}}},"violation":{"anchor":"capture.INNER","code":"arrow-body-style","message":"Expected block statement surrounding arrow body.","fix":"{return $X}","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"expectedBlock-nofix","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-expression-body"},{"$option":"option","cases":{"as-needed":[{"matches":"unparen-object"}]},"default":[],"spread":true},{"matches":"leads-with-paren-object"},{"not":{"matches":"r2"}},{"matches":"unparen"}]},"when":{"option":{"option":{"in":["always","as-needed"]}}}}},"violation":{"anchor":"capture.INNER","code":"arrow-body-style","message":"Expected block statement surrounding arrow body.","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedEmptyBlock","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"not":{"matches":"r5"}}]},"when":{"option":{"option":"never"}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; put a value of `undefined` immediately after the `=>`.","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedOtherBlock","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"r5"},{"not":{"matches":"single-return"}}]},"when":{"option":{"option":"never"}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body.","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}}]}
|
|
1
|
+
{"format":"rerail.policy/v1","id":"eslint-arrow-body-style","revision":4,"mode":"steer","description":"Drop the braces and return from an arrow function whose body only returns a value; write the value directly after the arrow.","scope":{"include":["**/*"],"exclude":[]},"clauses":[{"id":"options","define":{"options":{"option":{"type":"string","nullable":true,"default":null},"requireReturnForObjectLiteral":{"type":"boolean","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"already-parenthesized":{"has":{"stopBy":"neighbor","kind":"return_statement","has":{"stopBy":"neighbor","kind":"parenthesized_expression"}}},"arg":{"has":{"stopBy":"neighbor","kind":"return_statement","has":{"stopBy":"neighbor","matches":"return-value","pattern":"$ARG"}}},"arrow-block":{"kind":"statement_block","inside":{"kind":"arrow_function","stopBy":"neighbor"}},"arrow-expression-body":{"not":{"any":[{"kind":"comment"},{"kind":"statement_block"}]},"follows":{"regex":"^=>$","stopBy":"end"},"inside":{"kind":"arrow_function","stopBy":"neighbor"}},"bare-return":{"has":{"stopBy":"neighbor","kind":"return_statement","not":{"has":{"stopBy":"neighbor","matches":"return-value"}}}},"block-statement":{"all":[{"not":{"kind":"comment"}},{"not":{"regex":"^[{}]$"}}]},"first-child":{"not":{"follows":{"regex":"[\\s\\S]"}}},"for-init":{"inside":{"stopBy":"end","follows":{"regex":"^\\($"},"inside":{"kind":"for_statement","stopBy":"neighbor"}}},"hazard-after":{"any":[{"precedes":{"stopBy":{"not":{"kind":"comment"}},"not":{"kind":"comment"},"regex":"^[(\\[/`+-]"}},{"all":[{"not":{"precedes":{"stopBy":"end","not":{"kind":"comment"}}}},{"inside":{"stopBy":"neighbor","matches":"hazard-after"}}]}]},"leads-with-paren-object":{"any":[{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","follows":{"regex":"^\\($"},"matches":"starts-with-object"}},{"has":{"stopBy":"neighbor","all":[{"matches":"first-child"},{"matches":"leads-with-paren-object"}]}}]},"needs-parens":{"any":[{"matches":"object-first"},{"has":{"stopBy":"neighbor","kind":"return_statement","has":{"stopBy":"neighbor","kind":"sequence_expression"}}},{"all":[{"inside":{"kind":"arrow_function","stopBy":"neighbor","has":{"stopBy":"end","kind":"binary_expression","has":{"stopBy":"neighbor","regex":"^in$"}}}},{"inside":{"kind":"arrow_function","stopBy":"neighbor","matches":"for-init"}}]}]},"no-comments":{"all":[{"not":{"has":{"kind":"comment"}}},{"not":{"has":{"kind":"return_statement","has":{"kind":"comment"}}}}]},"object-first":{"has":{"stopBy":"neighbor","kind":"return_statement","has":{"stopBy":"neighbor","matches":"return-value","regex":"^\\{"}}},"return-value":{"not":{"any":[{"kind":"comment"},{"regex":"^(?:return|;)$"}]}},"single-return":{"all":[{"has":{"stopBy":"neighbor","kind":"return_statement","pattern":"$RET"}},{"not":{"has":{"stopBy":"neighbor","all":[{"matches":"block-statement"},{"not":{"kind":"return_statement"}}]}}},{"not":{"has":{"stopBy":"neighbor","kind":"return_statement","precedes":{"kind":"return_statement","stopBy":"end"}}}}]},"starts-with-object":{"any":[{"kind":"object"},{"has":{"stopBy":"neighbor","all":[{"matches":"first-child"},{"matches":"starts-with-object"}]}}]},"unparen":{"any":[{"not":{"kind":"parenthesized_expression"},"pattern":"$INNER"},{"kind":"parenthesized_expression","has":{"not":{"any":[{"kind":"comment"},{"regex":"^[()]$"}]},"matches":"unparen"}}]},"unparen-object":{"any":[{"kind":"object"},{"kind":"parenthesized_expression","has":{"stopBy":"neighbor","matches":"unparen-object"}}]},"r1":{"not":{"has":{"has":{"matches":"unparen-object","stopBy":"neighbor"},"kind":"return_statement","stopBy":"neighbor"}}},"r2":{"has":{"not":{"any":[{"kind":"comment"},{"regex":"^[()]$"}]},"pattern":"$X","stopBy":"neighbor"},"kind":"parenthesized_expression","regex":"^\\(\\{[\\s\\S]*\\S\\)$"},"r3":{"not":{"all":[{"not":{"matches":"bare-return"}},{"matches":"no-comments"},{"not":{"matches":"hazard-after"}},{"matches":"arg"}]}},"r4":{"any":[{"not":{"matches":"needs-parens"}},{"matches":"already-parenthesized"}]},"r5":{"has":{"matches":"block-statement","stopBy":"neighbor"}}}}},{"id":"unexpectedObjectBlock-fix","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"single-return"},{"$option":"requireReturnForObjectLiteral","cases":{"true":[{"matches":"r1"}]},"default":[],"spread":true},{"matches":"object-first"},{"not":{"matches":"bare-return"}},{"matches":"no-comments"},{"not":{"matches":"hazard-after"}},{"matches":"arg"},{"matches":"r4"}]},"when":{"option":{"option":{"in":[null,"never","as-needed"]}}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.","fix":"$ARG","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedObjectBlock-fix-parens","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"single-return"},{"$option":"requireReturnForObjectLiteral","cases":{"true":[{"matches":"r1"}]},"default":[],"spread":true},{"matches":"object-first"},{"not":{"matches":"bare-return"}},{"matches":"no-comments"},{"not":{"matches":"hazard-after"}},{"matches":"arg"},{"matches":"needs-parens"},{"not":{"matches":"already-parenthesized"}}]},"when":{"option":{"option":{"in":[null,"never","as-needed"]}}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.","fix":"($ARG)","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedObjectBlock-nofix","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"single-return"},{"$option":"requireReturnForObjectLiteral","cases":{"true":[{"matches":"r1"}]},"default":[],"spread":true},{"matches":"object-first"},{"matches":"r3"}]},"when":{"option":{"option":{"in":[null,"never","as-needed"]}}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; parenthesize the returned value and move it immediately after the `=>`.","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedSingleBlock-fix","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"single-return"},{"$option":"requireReturnForObjectLiteral","cases":{"true":[{"matches":"r1"}]},"default":[],"spread":true},{"not":{"matches":"object-first"}},{"not":{"matches":"bare-return"}},{"matches":"no-comments"},{"not":{"matches":"hazard-after"}},{"matches":"arg"},{"matches":"r4"}]},"when":{"option":{"option":{"in":[null,"never","as-needed"]}}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.","fix":"$ARG","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedSingleBlock-fix-parens","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"single-return"},{"$option":"requireReturnForObjectLiteral","cases":{"true":[{"matches":"r1"}]},"default":[],"spread":true},{"not":{"matches":"object-first"}},{"not":{"matches":"bare-return"}},{"matches":"no-comments"},{"not":{"matches":"hazard-after"}},{"matches":"arg"},{"matches":"needs-parens"},{"not":{"matches":"already-parenthesized"}}]},"when":{"option":{"option":{"in":[null,"never","as-needed"]}}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.","fix":"($ARG)","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedSingleBlock-nofix","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"single-return"},{"$option":"requireReturnForObjectLiteral","cases":{"true":[{"matches":"r1"}]},"default":[],"spread":true},{"not":{"matches":"object-first"}},{"matches":"r3"}]},"when":{"option":{"option":{"in":[null,"never","as-needed"]}}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; move the returned value immediately after the `=>`.","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"expectedBlock-fix","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-expression-body"},{"$option":"option","cases":{"as-needed":[{"matches":"unparen-object"}]},"default":[],"spread":true},{"not":{"matches":"leads-with-paren-object"}},{"matches":"unparen"},{"pattern":"$B"}]},"when":{"option":{"option":{"in":["always","as-needed"]}}}}},"violation":{"anchor":"capture.INNER","code":"arrow-body-style","message":"Expected block statement surrounding arrow body.","fix":"{return $B}","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"expectedBlock-fix-object","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-expression-body"},{"$option":"option","cases":{"as-needed":[{"matches":"unparen-object"}]},"default":[],"spread":true},{"matches":"r2"},{"matches":"unparen"}]},"when":{"option":{"option":{"in":["always","as-needed"]}}}}},"violation":{"anchor":"capture.INNER","code":"arrow-body-style","message":"Expected block statement surrounding arrow body.","fix":"{return $X}","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"expectedBlock-nofix","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-expression-body"},{"$option":"option","cases":{"as-needed":[{"matches":"unparen-object"}]},"default":[],"spread":true},{"matches":"leads-with-paren-object"},{"not":{"matches":"r2"}},{"matches":"unparen"}]},"when":{"option":{"option":{"in":["always","as-needed"]}}}}},"violation":{"anchor":"capture.INNER","code":"arrow-body-style","message":"Expected block statement surrounding arrow body.","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedEmptyBlock","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"not":{"matches":"r5"}}]},"when":{"option":{"option":"never"}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body; put a value of `undefined` immediately after the `=>`.","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}},{"id":"unexpectedOtherBlock","forbid":{"ast":{"language":"typescript","rule":{"all":[{"matches":"arrow-block"},{"matches":"r5"},{"not":{"matches":"single-return"}}]},"when":{"option":{"option":"never"}}}},"violation":{"anchor":"witness.span","code":"arrow-body-style","message":"Unexpected block statement surrounding arrow body.","suppress":{"eslint":{"rules":["arrow-body-style"]},"oxlint":{"rules":["arrow-body-style"]},"biome":{"rules":["lint/style/useConsistentArrowReturn"]}}}}]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"format":"rerail.policy/v1","id":"eslint-capitalized-comments","revision":5,"mode":"steer","description":"
|
|
1
|
+
{"format":"rerail.policy/v1","id":"eslint-capitalized-comments","revision":5,"mode":"steer","description":"Start every comment with a capital letter; directive comments and comments starting with a URL are skipped.","scope":{"include":["**/*"],"exclude":[]},"clauses":[{"id":"options","define":{"options":{"option":{"type":"string","nullable":true,"default":null},"ignoreInlineComments":{"type":"boolean","nullable":true,"default":null},"ignoreConsecutiveComments":{"type":"boolean","nullable":true,"default":null},"ignorePattern":{"type":"string","nullable":true,"default":null},"block.ignorePattern":{"type":"string","nullable":true,"default":null},"line.ignorePattern":{"type":"string","nullable":true,"default":null}}}},{"id":"shared","define":{"language":"typescript","utils":{"r1":{"all":[{"layout":{"before":{"breaks":{"eq":0},"comments":true,"to":"token"}}},{"layout":{"after":{"breaks":{"eq":0},"comments":true,"to":"token"}}}]}}}},{"id":"comment-case","forbid":{"ast":{"language":"typescript","rule":{"all":[{"kind":"comment"},{"regex":{"$option":"option","cases":{"never":"^(?://|/\\*)[\\s*]*(?<L>\\p{Lu})"},"default":"^(?://|/\\*)[\\s*]*(?<L>\\p{Ll})"}},{"not":{"regex":"^(?://|/\\*)\\s*(?:eslint|jshint\\s+|jslint\\s+|istanbul\\s+|globals?\\s+|exported\\s+|jscs)"}},{"not":{"regex":"^(?://|/\\*)[\\s*]*(?:[^:/?#\\s*]\\**)+:\\**/\\**/\\**[^?#*]"}},{"$option":"ignorePattern","cases":{"match":[],"Match":[],"foo|bar":[],"Foo|Bar":[],"ignored?":[]},"default":{"$option":"ignoreInlineComments","cases":{"true":[{"not":{"$option":"ignoreInlineComments","cases":{"true":{"matches":"r1"}},"default":{"follows":{"kind":"comment"}}}}]},"default":{"$option":"ignoreConsecutiveComments","cases":{"true":[{"not":{"$option":"ignoreInlineComments","cases":{"true":{"matches":"r1"}},"default":{"follows":{"kind":"comment"}}}}]},"default":[]}},"spread":true},{"$option":"ignorePattern","cases":{"match":[{"not":{"all":[{"regex":"^//"},{"regex":"^(?://|/\\*)[\\s*]*(?:match)"}]}}]},"default":[],"spread":true},{"$option":"ignorePattern","cases":{"match":[{"not":{"all":[{"regex":"^/\\*"},{"regex":"^(?://|/\\*)[\\s*]*(?:match)"}]}}]},"default":[],"spread":true},{"$option":"ignorePattern","cases":{"Match":[{"not":{"all":[{"regex":"^//"},{"regex":"^(?://|/\\*)[\\s*]*(?:Match)"}]}}]},"default":[],"spread":true},{"$option":"ignorePattern","cases":{"Match":[{"not":{"all":[{"regex":"^/\\*"},{"regex":"^(?://|/\\*)[\\s*]*(?:Match)"}]}}]},"default":[],"spread":true},{"$option":"ignorePattern","cases":{"foo|bar":[{"not":{"all":[{"regex":"^//"},{"regex":"^(?://|/\\*)[\\s*]*(?:foo|bar)"}]}}]},"default":[],"spread":true},{"$option":"ignorePattern","cases":{"foo|bar":[{"not":{"all":[{"regex":"^/\\*"},{"regex":"^(?://|/\\*)[\\s*]*(?:foo|bar)"}]}}]},"default":[],"spread":true},{"$option":"ignorePattern","cases":{"Foo|Bar":[{"not":{"all":[{"regex":"^//"},{"regex":"^(?://|/\\*)[\\s*]*(?:Foo|Bar)"}]}}]},"default":[],"spread":true},{"$option":"ignorePattern","cases":{"Foo|Bar":[{"not":{"all":[{"regex":"^/\\*"},{"regex":"^(?://|/\\*)[\\s*]*(?:Foo|Bar)"}]}}]},"default":[],"spread":true},{"$option":"ignorePattern","cases":{"ignored?":[{"not":{"all":[{"regex":"^//"},{"regex":"^(?://|/\\*)[\\s*]*(?:ignored?)"}]}}]},"default":[],"spread":true},{"$option":"ignorePattern","cases":{"ignored?":[{"not":{"all":[{"regex":"^/\\*"},{"regex":"^(?://|/\\*)[\\s*]*(?:ignored?)"}]}}]},"default":[],"spread":true},{"$option":"block.ignorePattern","cases":{"blockCommentIgnorePattern":[{"not":{"all":[{"regex":"^//"},{"regex":"^(?://|/\\*)[\\s*]*(?:lineCommentIgnorePattern)"}]}}]},"default":[],"spread":true},{"$option":"block.ignorePattern","cases":{"blockCommentIgnorePattern":[{"not":{"all":[{"regex":"^/\\*"},{"regex":"^(?://|/\\*)[\\s*]*(?:blockCommentIgnorePattern)"}]}}]},"default":[],"spread":true}]},"transform":{"C":{"convert":{"source":"$L","toCase":{"$option":"option","cases":{"never":"lowerCase"},"default":"upperCase"}}}}}},"violation":{"anchor":"witness.span","code":"capitalized-comments","message":{"$option":"option","cases":{"never":"Comments should not begin with an uppercase character."},"default":"Comments should not begin with a lowercase character."},"fix":{"template":"$C","range":"capture.L"},"suppress":{"eslint":{"rules":["capitalized-comments"]},"oxlint":{"rules":["capitalized-comments"]}}}}]}
|