@dereekb/util 13.12.0 → 13.12.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.
- package/eslint/index.cjs.js +550 -78
- package/eslint/index.esm.js +550 -78
- package/eslint/package.json +1 -1
- package/eslint/src/lib/require-deprecated-alias-placement.rule.d.ts +17 -11
- package/fetch/package.json +2 -2
- package/package.json +1 -1
- package/test/package.json +2 -2
package/eslint/package.json
CHANGED
|
@@ -47,23 +47,29 @@ interface RuleContext {
|
|
|
47
47
|
readonly sourceCode: AstNode;
|
|
48
48
|
}
|
|
49
49
|
/**
|
|
50
|
-
* ESLint rule requiring that
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
50
|
+
* ESLint rule requiring that `@deprecated` *aliases* live at the bottom of the file under a
|
|
51
|
+
* `// COMPAT: Deprecated aliases` line comment, and that no non-deprecated exports follow the
|
|
52
|
+
* marker. The rule mirrors the workspace's "Deprecated Alias Placement" convention so that
|
|
53
|
+
* deprecated aliases stay segregated from current code and are easy to spot for removal.
|
|
54
|
+
*
|
|
55
|
+
* Only *relocatable* deprecated statements participate (see {@link computeMovableStatements}):
|
|
56
|
+
* type-only declarations (always runtime-safe to move) and runtime value aliases — a
|
|
57
|
+
* `VariableDeclaration` whose initializer references a non-deprecated binding — that are not
|
|
58
|
+
* referenced elsewhere in the file. Primary runtime definitions (literal-valued consts, functions,
|
|
59
|
+
* classes, enums) and any value still referenced by other code are left exactly where they are, so
|
|
60
|
+
* the autofix can never reorder a value below its uses (a use-before-declaration error).
|
|
54
61
|
*
|
|
55
62
|
* The rule reports at most one violation per concern (missing marker, alias above marker,
|
|
56
63
|
* non-deprecated below marker) to keep editor noise manageable; once the first violation in a
|
|
57
64
|
* category is fixed, re-linting will surface the next one.
|
|
58
65
|
*
|
|
59
66
|
* Autofix coverage:
|
|
60
|
-
* - `missingCompatMarker` — inserts `// COMPAT: Deprecated aliases` and consolidates all
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
* - `deprecatedAliasNotAtBottom` — moves the misplaced deprecated block from above the marker to
|
|
67
|
+
* - `missingCompatMarker` — inserts `// COMPAT: Deprecated aliases` and consolidates all movable
|
|
68
|
+
* blocks at the bottom of the file. When the movable tail is already at the bottom of the file,
|
|
69
|
+
* only the marker line is inserted (no statements are moved). When movable aliases are
|
|
70
|
+
* interleaved with other statements, the autofix removes each movable block from its current
|
|
71
|
+
* location and re-emits them in source order at the bottom of the file under the marker.
|
|
72
|
+
* - `deprecatedAliasNotAtBottom` — moves the misplaced movable block from above the marker to
|
|
67
73
|
* just after the marker. One block per pass; ESLint's autofix loop converges across multiple
|
|
68
74
|
* violations.
|
|
69
75
|
* - `nonDeprecatedAfterMarker` — moves the misplaced non-deprecated block from below the marker
|
package/fetch/package.json
CHANGED
package/package.json
CHANGED