Commit c00463e
committed
quality: clear prefer-exists-sync — stat-for-metadata triage
35 → 0 prefer-exists-sync violations. All are legitimate stat calls
that read metadata (size, mtime) or discriminate file type (isFile,
isDirectory, isSymbolicLink) — not pure existence checks.
* src/fs/inspect.ts: whole file is the stat-wrapper surface; file-
level oxlint-disable.
* src/fs/find-up.ts: needs isFile()/isDirectory() to filter results
by type; file-level disable.
* src/dlx/binary.ts: DLX cache uses stat for size/mtime metadata;
file-level disable.
* src/dlx/detect.ts, src/ipc.ts, src/process-lock.ts,
src/fs/validate.ts: inline disables — single sites, each with a
one-line `--` explanation (mtime for cache, lstat for symlink
discrimination, accessSync(R_OK) for permission, etc.).
* scripts/build-externals/bundler.mts, scripts/validate/file-size.mts:
inline disables — both read stats.size for logging / size limits.
* test/unit/fs.test.mts, test/unit/process-lock.test.mts,
test/unit/ipc.test.mts, test/unit/dlx/package.test.mts,
test/integration/fs.test.mts: file-level disables — tests verify
stat output (mtime stability, isDirectory/isFile transitions, size
growth), not existence.
Net: 352 → 317 violations. Remaining: 280 sort-source-methods
(blocked on #65), 36 no-status-emoji (intentional test/rule-plugin/
coverage UI), 1 no-placeholders (rule plugin's fixture file).1 parent a4fe6db commit c00463e
14 files changed
Lines changed: 22 additions & 1 deletion
File tree
- scripts
- build-externals
- validate
- src
- dlx
- fs
- test
- integration
- unit
- dlx
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
106 | | - | |
| 106 | + | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| 79 | + | |
79 | 80 | | |
80 | 81 | | |
81 | 82 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
3 | 5 | | |
4 | 6 | | |
5 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
| 169 | + | |
169 | 170 | | |
170 | 171 | | |
171 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
9 | 11 | | |
10 | 12 | | |
11 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 237 | + | |
237 | 238 | | |
238 | 239 | | |
239 | 240 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
0 commit comments