@zukhruf/eslint 0.8.24 → 0.8.25
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.
|
@@ -3,10 +3,16 @@ import type { Rule } from 'eslint';
|
|
|
3
3
|
* Code that makes its own temporary directory picks its own cleanup, and the
|
|
4
4
|
* copies drift: one forgets the retry that Windows needs for a file that is
|
|
5
5
|
* still open, another compares the path with what a child process reports,
|
|
6
|
-
* which on macOS is the real path behind the `/var` symlink
|
|
7
|
-
* of `@zukhruf/fs` gives the real path and
|
|
8
|
-
* the
|
|
9
|
-
*
|
|
6
|
+
* which on macOS is the real path behind the `/var` symlink, and a third never
|
|
7
|
+
* removes it. `TemporaryFiles` of `@zukhruf/fs` gives the real path and
|
|
8
|
+
* removes the directory with the retry. The rule reports `mkdtemp`, and a
|
|
9
|
+
* path under `tmpdir()` with a name that differs on each run (a
|
|
10
|
+
* `randomUUID()`, `Date.now()`, `process.pid`, `performance.now()` or
|
|
11
|
+
* `Math.random()`), whatever then makes it: `mkdir`, `writeFile` or a function
|
|
12
|
+
* that writes files there. A folder with a fixed name is found again by the
|
|
13
|
+
* next run, so it is not temporary. Only the functions of `node:fs`,
|
|
14
|
+
* `node:os`, `node:path` and `node:crypto` count: the rule follows the imports
|
|
15
|
+
* of the file and its `const` declarations, not a value passed in.
|
|
10
16
|
*/
|
|
11
17
|
declare const rule: Rule.RuleModule;
|
|
12
18
|
export default rule;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-raw-temp-directory.d.ts","sourceRoot":"","sources":["../../src/imports/no-raw-temp-directory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"no-raw-temp-directory.d.ts","sourceRoot":"","sources":["../../src/imports/no-raw-temp-directory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAmEnC;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,UAiMhB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,12 +1,35 @@
|
|
|
1
|
-
import { identifierName, isAstNode, isType, } from "../authoring/ast.js";
|
|
2
|
-
const
|
|
3
|
-
|
|
1
|
+
import { identifierName, isAstNode, isType, resolvedVariable, } from "../authoring/ast.js";
|
|
2
|
+
const MODULES = new Map([
|
|
3
|
+
['fs', 'fs'],
|
|
4
|
+
['node:fs', 'fs'],
|
|
5
|
+
['fs/promises', 'fs/promises'],
|
|
6
|
+
['node:fs/promises', 'fs/promises'],
|
|
7
|
+
['os', 'os'],
|
|
8
|
+
['node:os', 'os'],
|
|
9
|
+
['path', 'path'],
|
|
10
|
+
['node:path', 'path'],
|
|
11
|
+
['path/posix', 'path'],
|
|
12
|
+
['node:path/posix', 'path'],
|
|
13
|
+
['path/win32', 'path'],
|
|
14
|
+
['node:path/win32', 'path'],
|
|
15
|
+
['crypto', 'crypto'],
|
|
16
|
+
['node:crypto', 'crypto'],
|
|
17
|
+
]);
|
|
4
18
|
const MKDTEMP = new Set([
|
|
5
19
|
'mkdtemp',
|
|
6
20
|
'mkdtempSync',
|
|
7
21
|
'mkdtempDisposable',
|
|
8
22
|
'mkdtempDisposableSync',
|
|
9
23
|
]);
|
|
24
|
+
const TMPDIR = new Set(['tmpdir']);
|
|
25
|
+
const JOIN = new Set(['join', 'resolve']);
|
|
26
|
+
const RANDOM_UUID = new Set(['randomUUID']);
|
|
27
|
+
/** Global calls whose value differs on each run: `Date.now()` and the like. */
|
|
28
|
+
const UNIQUE_GLOBAL_CALLS = new Map([
|
|
29
|
+
['Date', 'now'],
|
|
30
|
+
['performance', 'now'],
|
|
31
|
+
['Math', 'random'],
|
|
32
|
+
]);
|
|
10
33
|
function importedName(specifier) {
|
|
11
34
|
const imported = specifier['imported'];
|
|
12
35
|
return isType(imported, 'Literal') && typeof imported['value'] === 'string'
|
|
@@ -21,64 +44,144 @@ function memberName(member) {
|
|
|
21
44
|
? property['value']
|
|
22
45
|
: undefined;
|
|
23
46
|
}
|
|
47
|
+
function isMember(node, object, property) {
|
|
48
|
+
return (isType(node, 'MemberExpression') &&
|
|
49
|
+
identifierName(node['object']) === object &&
|
|
50
|
+
memberName(node) === property);
|
|
51
|
+
}
|
|
24
52
|
/**
|
|
25
53
|
* Code that makes its own temporary directory picks its own cleanup, and the
|
|
26
54
|
* copies drift: one forgets the retry that Windows needs for a file that is
|
|
27
55
|
* still open, another compares the path with what a child process reports,
|
|
28
|
-
* which on macOS is the real path behind the `/var` symlink
|
|
29
|
-
* of `@zukhruf/fs` gives the real path and
|
|
30
|
-
* the
|
|
31
|
-
*
|
|
56
|
+
* which on macOS is the real path behind the `/var` symlink, and a third never
|
|
57
|
+
* removes it. `TemporaryFiles` of `@zukhruf/fs` gives the real path and
|
|
58
|
+
* removes the directory with the retry. The rule reports `mkdtemp`, and a
|
|
59
|
+
* path under `tmpdir()` with a name that differs on each run (a
|
|
60
|
+
* `randomUUID()`, `Date.now()`, `process.pid`, `performance.now()` or
|
|
61
|
+
* `Math.random()`), whatever then makes it: `mkdir`, `writeFile` or a function
|
|
62
|
+
* that writes files there. A folder with a fixed name is found again by the
|
|
63
|
+
* next run, so it is not temporary. Only the functions of `node:fs`,
|
|
64
|
+
* `node:os`, `node:path` and `node:crypto` count: the rule follows the imports
|
|
65
|
+
* of the file and its `const` declarations, not a value passed in.
|
|
32
66
|
*/
|
|
33
67
|
const rule = {
|
|
34
68
|
meta: {
|
|
35
69
|
type: 'problem',
|
|
36
70
|
docs: {
|
|
37
|
-
description: 'Disallow a raw temporary directory; use TemporaryFiles of @zukhruf/fs',
|
|
71
|
+
description: 'Disallow a raw temporary directory, made with mkdtemp or named by hand with a unique name under tmpdir(); use TemporaryFiles of @zukhruf/fs',
|
|
38
72
|
},
|
|
39
73
|
schema: [],
|
|
40
74
|
messages: {
|
|
41
75
|
matched: 'Use `await using dir = await new TemporaryFiles().directory(prefix)` from @zukhruf/fs, or `using dir = new TemporaryFiles().directorySync(prefix)` in code that cannot wait: one standard temporary directory, at its real path, removed with a retry for Windows.',
|
|
76
|
+
uniquePath: 'A path with a unique name under tmpdir() is a temporary directory made by hand: use `await using dir = await new TemporaryFiles().directory(prefix)` from @zukhruf/fs, or `using dir = new TemporaryFiles().directorySync(prefix)` in code that cannot wait: one standard temporary directory, at its real path, removed with a retry for Windows.',
|
|
42
77
|
},
|
|
43
78
|
},
|
|
44
79
|
create(context) {
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
|
|
80
|
+
const mkdtempFunctions = new Set();
|
|
81
|
+
const tmpdirFunctions = new Set();
|
|
82
|
+
const joinFunctions = new Set();
|
|
83
|
+
const uuidFunctions = new Set();
|
|
84
|
+
const modules = {
|
|
85
|
+
fs: new Set(),
|
|
86
|
+
'fs/promises': new Set(),
|
|
87
|
+
os: new Set(),
|
|
88
|
+
path: new Set(),
|
|
89
|
+
// Node and the browsers give `crypto` as a global.
|
|
90
|
+
crypto: new Set(['crypto']),
|
|
91
|
+
};
|
|
92
|
+
function isModule(node, module) {
|
|
49
93
|
const name = identifierName(node);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return (
|
|
56
|
-
|
|
94
|
+
return name !== undefined && modules[module].has(name);
|
|
95
|
+
}
|
|
96
|
+
function isFsObject(node) {
|
|
97
|
+
if (isModule(node, 'fs') || isModule(node, 'fs/promises'))
|
|
98
|
+
return true;
|
|
99
|
+
return (isType(node, 'MemberExpression') &&
|
|
100
|
+
isModule(node['object'], 'fs') &&
|
|
57
101
|
memberName(node) === 'promises');
|
|
58
102
|
}
|
|
59
|
-
function
|
|
103
|
+
function calls(callee, functions, properties, isObject) {
|
|
60
104
|
const name = identifierName(callee);
|
|
61
105
|
if (name !== undefined)
|
|
62
106
|
return functions.has(name);
|
|
63
107
|
if (!isType(callee, 'MemberExpression'))
|
|
64
108
|
return false;
|
|
65
109
|
const property = memberName(callee);
|
|
66
|
-
|
|
110
|
+
return (property !== undefined &&
|
|
111
|
+
properties.has(property) &&
|
|
112
|
+
isObject(callee['object']));
|
|
113
|
+
}
|
|
114
|
+
/** The initial value of a `const` that `node` reads, or `node` itself. */
|
|
115
|
+
function constValue(node, seen) {
|
|
116
|
+
if (!isType(node, 'Identifier') || seen.has(node))
|
|
117
|
+
return node;
|
|
118
|
+
seen.add(node);
|
|
119
|
+
const definitions = resolvedVariable(context, node)?.defs ?? [];
|
|
120
|
+
const [definition] = definitions;
|
|
121
|
+
if (definitions.length !== 1 ||
|
|
122
|
+
definition?.type !== 'Variable' ||
|
|
123
|
+
definition.parent.kind !== 'const' ||
|
|
124
|
+
definition.node.init == null) {
|
|
125
|
+
return node;
|
|
126
|
+
}
|
|
127
|
+
return constValue(definition.node.init, seen);
|
|
128
|
+
}
|
|
129
|
+
function isUniqueSource(node) {
|
|
130
|
+
if (isType(node, 'MemberExpression')) {
|
|
131
|
+
return isMember(node, 'process', 'pid');
|
|
132
|
+
}
|
|
133
|
+
if (!isType(node, 'CallExpression'))
|
|
134
|
+
return false;
|
|
135
|
+
const callee = node['callee'];
|
|
136
|
+
if (calls(callee, uuidFunctions, RANDOM_UUID, (object) => isModule(object, 'crypto'))) {
|
|
137
|
+
return true;
|
|
138
|
+
}
|
|
139
|
+
return [...UNIQUE_GLOBAL_CALLS].some(([object, property]) => isMember(callee, object, property));
|
|
140
|
+
}
|
|
141
|
+
/** Whether the value of `node` holds a part that differs on each run. */
|
|
142
|
+
function isUnique(node, seen) {
|
|
143
|
+
const value = constValue(node, seen);
|
|
144
|
+
if (!isAstNode(value))
|
|
67
145
|
return false;
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
return ((
|
|
71
|
-
|
|
146
|
+
if (isUniqueSource(value))
|
|
147
|
+
return true;
|
|
148
|
+
return Object.entries(value).some(([key, child]) => key !== 'parent' &&
|
|
149
|
+
(Array.isArray(child) ? child : [child]).some((item) => isAstNode(item) && isUnique(item, seen)));
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* For a path under `tmpdir()`, whether one of its names differs on each
|
|
153
|
+
* run; `undefined` for any other path.
|
|
154
|
+
*/
|
|
155
|
+
function temporaryPath(node, seen) {
|
|
156
|
+
const value = constValue(node, seen);
|
|
157
|
+
if (!isType(value, 'CallExpression'))
|
|
158
|
+
return undefined;
|
|
159
|
+
const callee = value['callee'];
|
|
160
|
+
if (calls(callee, tmpdirFunctions, TMPDIR, (o) => isModule(o, 'os'))) {
|
|
161
|
+
return 'fixed';
|
|
162
|
+
}
|
|
163
|
+
if (!calls(callee, joinFunctions, JOIN, (o) => isModule(o, 'path'))) {
|
|
164
|
+
return undefined;
|
|
165
|
+
}
|
|
166
|
+
const parts = value['arguments'];
|
|
167
|
+
if (!Array.isArray(parts))
|
|
168
|
+
return undefined;
|
|
169
|
+
const [parent, ...names] = parts;
|
|
170
|
+
const parentPath = temporaryPath(parent, seen);
|
|
171
|
+
if (parentPath === undefined)
|
|
172
|
+
return undefined;
|
|
173
|
+
return parentPath === 'unique' ||
|
|
174
|
+
names.some((name) => isUnique(name, seen))
|
|
175
|
+
? 'unique'
|
|
176
|
+
: 'fixed';
|
|
72
177
|
}
|
|
73
178
|
return {
|
|
74
179
|
ImportDeclaration(node) {
|
|
75
180
|
if (!isAstNode(node) || !isAstNode(node['source']))
|
|
76
181
|
return;
|
|
77
182
|
const source = node['source']['value'];
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
const isFs = FS.has(source);
|
|
81
|
-
if (!isFs && !FS_PROMISES.has(source))
|
|
183
|
+
const module = typeof source === 'string' ? MODULES.get(source) : undefined;
|
|
184
|
+
if (module === undefined)
|
|
82
185
|
return;
|
|
83
186
|
const specifiers = node['specifiers'];
|
|
84
187
|
if (!Array.isArray(specifiers))
|
|
@@ -90,21 +193,48 @@ const rule = {
|
|
|
90
193
|
if (local === undefined)
|
|
91
194
|
continue;
|
|
92
195
|
if (specifier.type !== 'ImportSpecifier') {
|
|
93
|
-
|
|
196
|
+
modules[module].add(local);
|
|
94
197
|
continue;
|
|
95
198
|
}
|
|
96
199
|
const imported = importedName(specifier);
|
|
97
|
-
if (imported
|
|
98
|
-
|
|
200
|
+
if (imported === undefined)
|
|
201
|
+
continue;
|
|
202
|
+
if (module === 'fs' || module === 'fs/promises') {
|
|
203
|
+
if (MKDTEMP.has(imported))
|
|
204
|
+
mkdtempFunctions.add(local);
|
|
205
|
+
else if (module === 'fs' && imported === 'promises') {
|
|
206
|
+
modules['fs/promises'].add(local);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
else if (module === 'os' && TMPDIR.has(imported)) {
|
|
210
|
+
tmpdirFunctions.add(local);
|
|
211
|
+
}
|
|
212
|
+
else if (module === 'path' && JOIN.has(imported)) {
|
|
213
|
+
joinFunctions.add(local);
|
|
99
214
|
}
|
|
100
|
-
else if (
|
|
101
|
-
|
|
215
|
+
else if (module === 'crypto' && RANDOM_UUID.has(imported)) {
|
|
216
|
+
uuidFunctions.add(local);
|
|
102
217
|
}
|
|
103
218
|
}
|
|
104
219
|
},
|
|
105
220
|
CallExpression(node) {
|
|
106
|
-
if (isAstNode(node)
|
|
221
|
+
if (!isAstNode(node))
|
|
222
|
+
return;
|
|
223
|
+
const callee = node['callee'];
|
|
224
|
+
if (calls(callee, mkdtempFunctions, MKDTEMP, isFsObject)) {
|
|
107
225
|
context.report({ node, messageId: 'matched' });
|
|
226
|
+
return;
|
|
227
|
+
}
|
|
228
|
+
if (!calls(callee, joinFunctions, JOIN, (o) => isModule(o, 'path'))) {
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
// The join that adds the unique name is reported, not each join under it.
|
|
232
|
+
const [parent] = Array.isArray(node['arguments'])
|
|
233
|
+
? node['arguments']
|
|
234
|
+
: [];
|
|
235
|
+
if (temporaryPath(node, new Set()) === 'unique' &&
|
|
236
|
+
temporaryPath(parent, new Set()) !== 'unique') {
|
|
237
|
+
context.report({ node, messageId: 'uniquePath' });
|
|
108
238
|
}
|
|
109
239
|
},
|
|
110
240
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"no-raw-temp-directory.js","sourceRoot":"","sources":["../../src/imports/no-raw-temp-directory.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,cAAc,EACd,SAAS,EACT,MAAM,
|
|
1
|
+
{"version":3,"file":"no-raw-temp-directory.js","sourceRoot":"","sources":["../../src/imports/no-raw-temp-directory.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,cAAc,EACd,SAAS,EACT,MAAM,EACN,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAI7B,MAAM,OAAO,GAAG,IAAI,GAAG,CAAiB;IACtC,CAAC,IAAI,EAAE,IAAI,CAAC;IACZ,CAAC,SAAS,EAAE,IAAI,CAAC;IACjB,CAAC,aAAa,EAAE,aAAa,CAAC;IAC9B,CAAC,kBAAkB,EAAE,aAAa,CAAC;IACnC,CAAC,IAAI,EAAE,IAAI,CAAC;IACZ,CAAC,SAAS,EAAE,IAAI,CAAC;IACjB,CAAC,MAAM,EAAE,MAAM,CAAC;IAChB,CAAC,WAAW,EAAE,MAAM,CAAC;IACrB,CAAC,YAAY,EAAE,MAAM,CAAC;IACtB,CAAC,iBAAiB,EAAE,MAAM,CAAC;IAC3B,CAAC,YAAY,EAAE,MAAM,CAAC;IACtB,CAAC,iBAAiB,EAAE,MAAM,CAAC;IAC3B,CAAC,QAAQ,EAAE,QAAQ,CAAC;IACpB,CAAC,aAAa,EAAE,QAAQ,CAAC;CAC1B,CAAC,CAAC;AACH,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC;IACtB,SAAS;IACT,aAAa;IACb,mBAAmB;IACnB,uBAAuB;CACxB,CAAC,CAAC;AACH,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;AACnC,MAAM,IAAI,GAAG,IAAI,G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AW,CAAC;oBACnB,CAAC,CAAC,EAAE,CAAC;gBACP,IACE,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,EAAE,CAAC,KAAK,QAAQ;oBAC3C,aAAa,CAAC,MAAM,EAAE,IAAI,GAAG,EAAE,CAAC,KAAK,QAAQ,EAC7C,CAAC;oBACD,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC,CAAC;gBACpD,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zukhruf/eslint",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.25",
|
|
4
4
|
"description": "ESLint rules and configs shared across workspaces. Each check is its own named rule, so a repo's own config cannot silently erase it. This workspace lints itself with it.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
"ts-api-utils": "^2.5.0"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@zukhruf/fs": "^0.8.
|
|
72
|
-
"@zukhruf/testing": "^0.8.
|
|
71
|
+
"@zukhruf/fs": "^0.8.25",
|
|
72
|
+
"@zukhruf/testing": "^0.8.25",
|
|
73
73
|
"esbuild": "0.28.2"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|