@sarj/eslint-plugin 8.0.0 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -7
- package/dist/index.cjs +2 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -7
- package/dist/index.d.ts +4 -7
- package/dist/index.js +2 -23
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ rename moves them.
|
|
|
21
21
|
|
|
22
22
|
Presets: `recommended` (warn-first), `strict` (every rule at error), `style-guide` (formatting/naming subset).
|
|
23
23
|
|
|
24
|
-
## Renamed in 7.0.0 (breaking)
|
|
24
|
+
## Renamed in 7.0.0, aliases deleted in 9.0.0 (breaking)
|
|
25
25
|
|
|
26
26
|
| Old name | New name |
|
|
27
27
|
| --- | --- |
|
|
@@ -30,18 +30,21 @@ Presets: `recommended` (warn-first), `strict` (every rule at error), `style-guid
|
|
|
30
30
|
| `@sarj/strict-test-assertions` | `@sarj/prefer-whole-object-assertion` |
|
|
31
31
|
| `@sarj/trailing-value-narration` | `@sarj/no-trailing-value-narration` |
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
7.0.0 kept each old name registered as a deprecated alias. 9.0.0 deletes them, so
|
|
34
|
+
the new names are the only names — and an old name left in a config, an
|
|
35
|
+
`eslint-disable` comment or a suppressions baseline now makes ESLint exit 2 with
|
|
36
|
+
`Could not find "@sarj/<rule>" in plugin "@sarj"` before it reads a file.
|
|
37
|
+
|
|
38
|
+
Run `sarj-lint-configs doctor` before upgrading: it reads the shipped rule ledger
|
|
39
|
+
and names every file holding an old name, with the replacement. The map is also
|
|
37
40
|
exported for codemods:
|
|
38
41
|
|
|
39
42
|
```js
|
|
40
43
|
import { renamedRules } from "@sarj/eslint-plugin";
|
|
41
44
|
```
|
|
42
45
|
|
|
43
|
-
Migration steps, the reasoning behind each name, and why the
|
|
44
|
-
|
|
46
|
+
Migration steps, the reasoning behind each name, and why the aliases went:
|
|
47
|
+
[`docs/rules/_renames.md`](../../docs/rules/_renames.md).
|
|
45
48
|
|
|
46
49
|
## New in 4.1.0 — `no-hand-rolled-sleep`
|
|
47
50
|
|
package/dist/index.cjs
CHANGED
|
@@ -9289,29 +9289,8 @@ var rules = {
|
|
|
9289
9289
|
};
|
|
9290
9290
|
var meta = {
|
|
9291
9291
|
name: "@sarj/eslint-plugin",
|
|
9292
|
-
version: "
|
|
9292
|
+
version: "9.0.0"
|
|
9293
9293
|
};
|
|
9294
|
-
var renames = renamedRules;
|
|
9295
|
-
var deprecatedAliases = Object.fromEntries(
|
|
9296
|
-
Object.entries(renames).map(([from, to]) => {
|
|
9297
|
-
const rule = rules[to];
|
|
9298
|
-
return [
|
|
9299
|
-
from,
|
|
9300
|
-
{
|
|
9301
|
-
...rule,
|
|
9302
|
-
meta: {
|
|
9303
|
-
...rule.meta,
|
|
9304
|
-
deprecated: {
|
|
9305
|
-
message: `Renamed to \`@sarj/${to}\`.`,
|
|
9306
|
-
replacedBy: [{ rule: { name: `@sarj/${to}` } }],
|
|
9307
|
-
deprecatedSince: meta.version
|
|
9308
|
-
}
|
|
9309
|
-
}
|
|
9310
|
-
}
|
|
9311
|
-
];
|
|
9312
|
-
})
|
|
9313
|
-
);
|
|
9314
|
-
var allRules = { ...rules, ...deprecatedAliases };
|
|
9315
9294
|
var recommendedRules = {
|
|
9316
9295
|
"@sarj/enforce-file-structure": "warn",
|
|
9317
9296
|
"@sarj/no-async-callback-in-wait-for": "warn",
|
|
@@ -9418,7 +9397,7 @@ var strictRules = {
|
|
|
9418
9397
|
};
|
|
9419
9398
|
var plugin = {
|
|
9420
9399
|
meta,
|
|
9421
|
-
rules
|
|
9400
|
+
rules,
|
|
9422
9401
|
// Withdrawn names travel WITH the plugin so a consumer's migration script and
|
|
9423
9402
|
// this repo's gates read one map, not two. See src/rules/_retired.ts.
|
|
9424
9403
|
retiredRules,
|