eslint-plugin-fast-import 2.0.0 → 2.1.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/CHANGELOG.md +7 -0
- package/dist/plugin.d.ts +2 -1
- package/dist/rules/alias/alias.d.ts +2 -1
- package/dist/rules/alias/alias.js +60 -32
- package/dist/rules/alias/alias.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 2.1.0 (3/13/2026)
|
|
4
|
+
|
|
5
|
+
- Fixed logic errors in `prefer-alias-imports` rule
|
|
6
|
+
- Renamed `relative-if-descendant` mode to `relative-if-local` to accurately represent what it actually does
|
|
7
|
+
- Technically this is a breaking change, but due to the previous release being so recent and very few downloads of 2.0.0, I'm instead going to just deprecate 2.0.0
|
|
8
|
+
- Added configurable `minSharedPathDepth` option to `prefer-alias-imports` rule
|
|
9
|
+
|
|
3
10
|
## 2.0.0 (3/13/2026)
|
|
4
11
|
|
|
5
12
|
- Added `prefer-alias-imports` rule
|
package/dist/plugin.d.ts
CHANGED
|
@@ -63,7 +63,8 @@ declare const plugin: {
|
|
|
63
63
|
name: string;
|
|
64
64
|
};
|
|
65
65
|
'prefer-alias-imports': TSESLint.RuleModule<"preferAlias" | "preferRelative", [{
|
|
66
|
-
mode?: "always" | "relative-if-
|
|
66
|
+
mode?: "always" | "relative-if-local" | undefined;
|
|
67
|
+
minSharedPathDepth?: number | undefined;
|
|
67
68
|
} | undefined], unknown, TSESLint.RuleListener> & {
|
|
68
69
|
name: string;
|
|
69
70
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare const preferAliasImports: import("@typescript-eslint/utils/ts-eslint").RuleModule<"preferAlias" | "preferRelative", [{
|
|
2
|
-
mode?: "always" | "relative-if-
|
|
2
|
+
mode?: "always" | "relative-if-local" | undefined;
|
|
3
|
+
minSharedPathDepth?: number | undefined;
|
|
3
4
|
} | undefined], unknown, import("@typescript-eslint/utils/ts-eslint").RuleListener> & {
|
|
4
5
|
name: string;
|
|
5
6
|
};
|
|
@@ -2,10 +2,12 @@ import { dirname, relative, resolve } from 'node:path';
|
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { InternalError } from '../../util/error.js';
|
|
4
4
|
import { createRule, getESMInfo, getLocFromRange } from '../util.js';
|
|
5
|
-
const MODE_DEFAULT = 'relative-if-
|
|
5
|
+
const MODE_DEFAULT = 'relative-if-local';
|
|
6
|
+
const MIN_SHARED_PATH_DEPTH_DEFAULT = 1;
|
|
6
7
|
const schema = z
|
|
7
8
|
.strictObject({
|
|
8
|
-
mode: z.enum(['always', 'relative-if-
|
|
9
|
+
mode: z.enum(['always', 'relative-if-local']).optional(),
|
|
10
|
+
minSharedPathDepth: z.number().int().min(0).optional(),
|
|
9
11
|
})
|
|
10
12
|
.optional();
|
|
11
13
|
/**
|
|
@@ -22,18 +24,41 @@ function findBestWildcardAlias(absolutePath, wildcardAliases) {
|
|
|
22
24
|
}
|
|
23
25
|
return best;
|
|
24
26
|
}
|
|
27
|
+
function getAliasInternalPathSegments(absolutePath, aliasPath) {
|
|
28
|
+
if (!absolutePath.startsWith(aliasPath)) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
return absolutePath
|
|
32
|
+
.slice(aliasPath.length)
|
|
33
|
+
.split(/[/\\]+/)
|
|
34
|
+
.filter(Boolean);
|
|
35
|
+
}
|
|
36
|
+
function getSharedPathDepth(sourcePath, targetPath, aliasPath) {
|
|
37
|
+
const sourceSegments = getAliasInternalPathSegments(sourcePath, aliasPath);
|
|
38
|
+
const targetSegments = getAliasInternalPathSegments(targetPath, aliasPath);
|
|
39
|
+
if (!sourceSegments || !targetSegments) {
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
let sharedPathDepth = 0;
|
|
43
|
+
while (sharedPathDepth < sourceSegments.length &&
|
|
44
|
+
sharedPathDepth < targetSegments.length &&
|
|
45
|
+
sourceSegments[sharedPathDepth] === targetSegments[sharedPathDepth]) {
|
|
46
|
+
sharedPathDepth++;
|
|
47
|
+
}
|
|
48
|
+
return sharedPathDepth;
|
|
49
|
+
}
|
|
25
50
|
export const preferAliasImports = createRule({
|
|
26
51
|
name: 'prefer-alias-imports',
|
|
27
52
|
meta: {
|
|
28
53
|
docs: {
|
|
29
|
-
description: 'Enforces the use of alias imports instead of relative paths when an alias is available, and vice versa for files under the same alias',
|
|
54
|
+
description: 'Enforces the use of alias imports instead of relative paths when an alias is available, and vice versa for sufficiently local files under the same alias',
|
|
30
55
|
},
|
|
31
56
|
schema: [schema.toJSONSchema()],
|
|
32
57
|
fixable: 'code',
|
|
33
58
|
type: 'suggestion',
|
|
34
59
|
messages: {
|
|
35
60
|
preferAlias: 'Use alias import "{{alias}}" instead of relative path "{{relative}}"',
|
|
36
|
-
preferRelative: 'Use relative import "{{relative}}" instead of alias "{{alias}}" for files under the same alias',
|
|
61
|
+
preferRelative: 'Use relative import "{{relative}}" instead of alias "{{alias}}" for local files under the same alias',
|
|
37
62
|
},
|
|
38
63
|
},
|
|
39
64
|
defaultOptions: [{ mode: MODE_DEFAULT }],
|
|
@@ -54,8 +79,8 @@ export const preferAliasImports = createRule({
|
|
|
54
79
|
Object.keys(fixedAliases).length === 0) {
|
|
55
80
|
return {};
|
|
56
81
|
}
|
|
57
|
-
const { mode = MODE_DEFAULT } = context.options[0] ?? {};
|
|
58
|
-
// Pre-compute the current file's "home alias" for relative-if-
|
|
82
|
+
const { mode = MODE_DEFAULT, minSharedPathDepth = MIN_SHARED_PATH_DEPTH_DEFAULT, } = context.options[0] ?? {};
|
|
83
|
+
// Pre-compute the current file's "home alias" for relative-if-local mode
|
|
59
84
|
const homeAlias = findBestWildcardAlias(context.filename, wildcardAliases);
|
|
60
85
|
for (const importEntry of [
|
|
61
86
|
...fileInfo.singleImports,
|
|
@@ -86,9 +111,8 @@ export const preferAliasImports = createRule({
|
|
|
86
111
|
}
|
|
87
112
|
}
|
|
88
113
|
// Check wildcard aliases
|
|
89
|
-
if (!matchedAliasName) {
|
|
90
|
-
const
|
|
91
|
-
const match = findBestWildcardAlias(absolutePath, wildcardAliases);
|
|
114
|
+
if (!matchedAliasName && resolvedModulePath) {
|
|
115
|
+
const match = findBestWildcardAlias(resolvedModulePath, wildcardAliases);
|
|
92
116
|
if (match) {
|
|
93
117
|
matchedAliasSymbol = match.symbol;
|
|
94
118
|
matchedAliasPath = match.path;
|
|
@@ -97,15 +121,22 @@ export const preferAliasImports = createRule({
|
|
|
97
121
|
if (!matchedAliasName && !matchedAliasSymbol) {
|
|
98
122
|
continue;
|
|
99
123
|
}
|
|
100
|
-
|
|
101
|
-
|
|
124
|
+
const sharedPathDepth = homeAlias &&
|
|
125
|
+
resolvedModulePath &&
|
|
126
|
+
matchedAliasSymbol === homeAlias.symbol &&
|
|
127
|
+
matchedAliasPath === homeAlias.path
|
|
128
|
+
? getSharedPathDepth(context.filename, resolvedModulePath, homeAlias.path)
|
|
129
|
+
: undefined;
|
|
130
|
+
// In relative-if-local mode, skip if the files are local enough
|
|
131
|
+
if (mode === 'relative-if-local') {
|
|
102
132
|
if (matchedAliasName) {
|
|
103
133
|
// Fixed alias — always different from a wildcard home alias, so report
|
|
104
134
|
}
|
|
105
135
|
else if (homeAlias &&
|
|
106
136
|
matchedAliasSymbol === homeAlias.symbol &&
|
|
107
|
-
matchedAliasPath === homeAlias.path
|
|
108
|
-
|
|
137
|
+
matchedAliasPath === homeAlias.path &&
|
|
138
|
+
sharedPathDepth !== undefined &&
|
|
139
|
+
sharedPathDepth >= minSharedPathDepth) {
|
|
109
140
|
continue;
|
|
110
141
|
}
|
|
111
142
|
}
|
|
@@ -135,28 +166,25 @@ export const preferAliasImports = createRule({
|
|
|
135
166
|
},
|
|
136
167
|
});
|
|
137
168
|
}
|
|
138
|
-
else if (mode === 'relative-if-
|
|
169
|
+
else if (mode === 'relative-if-local') {
|
|
139
170
|
// --- Alias import: check if it should be relative ---
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
(!matchedSymbol || path.length > (matchedPath?.length ?? 0))) {
|
|
146
|
-
matchedSymbol = symbol;
|
|
147
|
-
matchedPath = path;
|
|
148
|
-
}
|
|
171
|
+
if (moduleSpecifier in fixedAliases) {
|
|
172
|
+
continue;
|
|
173
|
+
}
|
|
174
|
+
if (!importEntry.resolvedModulePath) {
|
|
175
|
+
continue;
|
|
149
176
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
177
|
+
const matchedAlias = findBestWildcardAlias(importEntry.resolvedModulePath, wildcardAliases);
|
|
178
|
+
const sharedPathDepth = homeAlias && matchedAlias && matchedAlias.path === homeAlias.path
|
|
179
|
+
? getSharedPathDepth(context.filename, importEntry.resolvedModulePath, homeAlias.path)
|
|
180
|
+
: undefined;
|
|
181
|
+
if (matchedAlias &&
|
|
153
182
|
homeAlias &&
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
let newSpecifier = relative(dirname(context.filename),
|
|
159
|
-
// Ensure it starts with ./ or ../
|
|
183
|
+
matchedAlias.symbol === homeAlias.symbol &&
|
|
184
|
+
matchedAlias.path === homeAlias.path &&
|
|
185
|
+
sharedPathDepth !== undefined &&
|
|
186
|
+
sharedPathDepth >= minSharedPathDepth) {
|
|
187
|
+
let newSpecifier = relative(dirname(context.filename), resolve(matchedAlias.path, moduleSpecifier.slice(matchedAlias.symbol.length)));
|
|
160
188
|
if (!newSpecifier.startsWith('.')) {
|
|
161
189
|
newSpecifier = './' + newSpecifier;
|
|
162
190
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alias.js","sourceRoot":"","sources":["../../../src/rules/alias/alias.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAIvD,OAAO,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