@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 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
- Every old name is still REGISTERED, as a deprecated alias of the same rule, so a
34
- config entry, an `eslint-disable` comment or a suppressions baseline naming it
35
- keeps working while you migrate; ESLint reports the deprecation and names the
36
- replacement. Neither preset wires an alias, so nothing double-reports. The map is
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 old keys are kept
44
- rather than dropped: [`docs/rules/_renames.md`](../../docs/rules/_renames.md).
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: "8.0.0"
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: allRules,
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,