Commit 2cef19f
authored
improvement(audits): ratchet unused exports, explicit any, and file names (#8550)
* improvement(audits): ratchet knip unused exports, types, and duplicates
check:unused-exports runs knip once with the dead-code issue types gated at
zero plus exports/types/duplicates compared against a shrink-only baseline
of path#symbol entries. Package entry exports stay public surface via an
explicit includeEntryExports: false. run-audits skips check:dead-code since
this pass covers it.
* improvement(audits): ratchet explicit any and non-null assertions per file
check:explicit-any runs Biome's noExplicitAny and noNonNullAssertion rules
(off repo-wide) and fails when a file's count rises or drops without a
baseline update.
* improvement(audits): enforce file naming conventions with a ratchet
check:file-names flags non-kebab-case paths, utils/helpers files that repeat
their folder's role, and files that repeat their parent folder's name, with
the expected short name in the failure output.
* docs(agents): point naming and any rules at their checks; run root test in ship gate
* improvement(audits): make baseline updates shrink-only and tolerate biome diagnostic exit codes
* improvement(audits): fail closed on missing baselines, write nothing on refused updates, flag utils/utils.ts
* improvement(audits): include root scripts in the explicit-any ratchet
* fix(audits): gate every knip issue type and exclude generated contracts from the export ratchet
knip's dependencies include also reports optionalPeerDependencies, which the
strict list dropped. Gate every non-ratchet issue key so a new type fails
closed. Generated contract files are excluded via ignoreIssues so rerunning
their generators cannot trip the ratchet (359 baseline entries dropped).
Print a rename hint when a baselined symbol moves files.
* improvement(audits): lint tracked uploads source, reject any/! suppressions, name-check root scripts
Anchor biome's build/out/uploads ignores to the real output and runtime
dirs so apps/sim/lib/uploads and the uploads API routes are linted and
counted by check:explicit-any (baseline grows only under those paths).
check:explicit-any fails on biome-ignore comments for its two rules.
check:file-names scans root scripts/ and vitest.shared.ts, allows Next.js
interception segments and dot-prefixed names, ignores the old path of an
unstaged mv, and points tool-mandated names at its allowlist. All three
ratchets print a rename hint instead of only the shrink instruction.
* improvement(audits): rebaseline ratchets on current staging, lint newly covered uploads files, anchor suppression detection to comments
* improvement(audits): fail on unparsable files, refuse suppressed updates, require balanced dynamic segments1 parent e3211dd commit 2cef19f
17 files changed
Lines changed: 9736 additions & 22 deletions
File tree
- .agents/skills/ship
- apps/sim/lib/uploads
- contexts/workspace
- providers/s3
- server
- utils
- scripts
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
| 88 | + | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | 155 | | |
159 | 156 | | |
160 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | 13 | | |
22 | 14 | | |
23 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | 20 | | |
| |||
32 | 36 | | |
33 | 37 | | |
34 | 38 | | |
35 | | - | |
| 39 | + | |
| 40 | + | |
36 | 41 | | |
37 | 42 | | |
38 | 43 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
6 | 12 | | |
7 | 13 | | |
8 | 14 | | |
| |||
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
36 | 45 | | |
37 | 46 | | |
38 | 47 | | |
| |||
87 | 96 | | |
88 | 97 | | |
89 | 98 | | |
90 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
91 | 104 | | |
92 | 105 | | |
93 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
85 | 88 | | |
86 | 89 | | |
87 | 90 | | |
| |||
0 commit comments