Commit 34b9870
build(website): enable the strictest tsconfig flags that already pass (#15300)
*PR Created by the Glary-Bot Agent*
---
## Summary
`astro/tsconfigs/strictest` layers nine options on top of the `strict`
preset the app already uses. Measured each against `apps/website`: seven
report zero errors once six dead declarations are removed. This turns
those seven on.
## Changes
- **What**: enables `noUnusedLocals`, `noUnusedParameters`,
`noImplicitReturns`, `noFallthroughCasesInSwitch`, `noImplicitOverride`,
`allowUnreachableCode: false`, `allowUnusedLabels: false`, and deletes
the six declarations that blocked them:
- `data/drops.ts` — `FEATURED_BADGE` (unused `LocalizedText`)
- `layouts/BaseLayout.astro` — unused `Locale` type import
- `pages/careers.astro` + `pages/zh-CN/careers.astro` — `siteUrl`
destructured but never read
- `scripts/generate-models.ts` — unused `RawModel` interface
- `components/product/enterprise/TeamSection.vue` — `routes` computed
and its `getRoutes` import
- **Breaking**: none. Every deletion is a declaration with no reader.
## Review Focus
**Measured, not guessed.** Error counts per flag against this app:
| flag | errors | enabled here |
|---|---:|:---:|
| `noUnusedParameters` | 0 | yes |
| `noImplicitReturns` | 0 | yes |
| `noFallthroughCasesInSwitch` | 0 | yes |
| `noImplicitOverride` | 0 | yes |
| `allowUnreachableCode: false` | 0 | yes |
| `allowUnusedLabels: false` | 0 | yes |
| `noUnusedLocals` | 6 | yes (fixed here) |
| `exactOptionalPropertyTypes` | **75** | no |
| `noUncheckedIndexedAccess` | **202** | no |
The last two are left off deliberately — each needs its own remediation
pass, not a flag flip. `noUncheckedIndexedAccess` in particular would
touch every array index and `Record` lookup in the app.
`TeamSection.vue` is only reachable by `vue-tsc`, which this app does
not run yet (that arrives in #15284). It is fixed here anyway so the
flag stays clean once that lands.
## Verification
`astro check` 0 errors with the flags on · 422 unit tests passing (1
pre-existing `minimaxMusic3` failure, also on `main`) · production build
595 pages · oxfmt clean.
Confirmed the new flags introduce no `vue-tsc` regressions: `vue-tsc`
reports the same 9 pre-existing SFC errors as `main` (same four files,
same counts — those are what #15282/#15283 fix), and **zero**
TS6133/TS6196/TS7027/TS7030 diagnostics, i.e. none attributable to these
flags. This PR is therefore independent of that stack and can merge in
any order relative to it.
---------
Co-authored-by: Glary-Bot <glary-bot@users.noreply.github.com>
Co-authored-by: Alexander Brown <drjkl@comfy.org>1 parent da403f8 commit 34b9870
12 files changed
Lines changed: 92 additions & 28 deletions
File tree
- apps/website
- scripts
- src
- components/product
- api
- enterprise
- data
- layouts
- pages
- zh-CN
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 25 | | |
32 | 26 | | |
33 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
| 113 | + | |
124 | 114 | | |
125 | 115 | | |
126 | 116 | | |
| |||
224 | 214 | | |
225 | 215 | | |
226 | 216 | | |
227 | | - | |
| 217 | + | |
228 | 218 | | |
229 | 219 | | |
230 | 220 | | |
231 | 221 | | |
232 | 222 | | |
233 | | - | |
| 223 | + | |
234 | 224 | | |
235 | 225 | | |
236 | 226 | | |
| |||
Lines changed: 44 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
12 | | - | |
13 | | - | |
14 | 11 | | |
15 | 12 | | |
16 | 13 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
0 commit comments