SKY-R105 · Quality, structure and performance
TypeScript type-check policy
Many bundlers, such as Vite and esbuild, strip TypeScript types without checking them. SKY-R105 reports a package.json that sits next to a tsconfig.json but has no npm script that runs the TypeScript compiler's check.
- Languages
- TypeScript
- Quality gate
- counted toward the gate limits (full and diff scans). Advice that is measured on every
--qualityscan but not listed by default. It is listed, and counted towardmax_quality, with--all-adviceor when the rule is named in[tool.skylos.gate] rules. A diff scan checks it only when the change touches a policy file such aspackage.jsonortsconfig.json. - Finding type
- advice
Why it matters
The build succeeds even when the code has type errors, so a wrong property name or a missing null check ships to users. The "strict": true in tsconfig.json is then only applied in editors.
What Skylos flags
{ "name": "shop-web", "private": true, "scripts": { "dev": "vite", "build": "vite build" }}{ "compilerOptions": { "strict": true, "noEmit": true }}export const cartLimit: number = 50;What Skylos leaves alone
{ "name": "shop-web", "private": true, "scripts": { "dev": "vite", "build": "vue-tsc --noEmit && vite build" }}Why Skylos leaves it alone
The build script runs vue-tsc --noEmit before bundling. Skylos reads each command in a script, including after &&, and accepts tsc or vue-tsc as the type check.
How Skylos decides
- Runs with
--quality, once per scanned project. A diff scan runs it only when a policy file is among the changed files. - Visits every
package.jsonin the project (outside excluded folders and virtual environments) that has atsconfig.jsonin the same folder. - Splits each npm script into commands (through
&&,;,|,sh -c,npx,pnpm execand similar) and accepts a command that runstscorvue-tsc, unless it only prints help or the version, or passes--noCheck. - Also accepts a Next.js project whose script runs
next build, unless its Next config setsignoreBuildErrorsto anything butfalse. - Otherwise reports LOW on line 1 of that
package.json.
How to fix it
Add a script that runs tsc --noEmit and run it in CI, or put the check in front of the build.
{ "name": "shop-web", "private": true, "scripts": { "dev": "vite",Removed: "build": "vite build"Added: "typecheck": "tsc --noEmit",Added: "build": "tsc --noEmit && vite build" }}When it can be wrong
- A type check that runs only in a CI file, a Makefile or a separate tool is not seen, so the package is reported.
- Any script that runs
tsccounts, even one that neither CI nor the build ever calls.
Seeing a case that isn't listed here? Report the wrong result so the rule can be fixed. Don't paste company code: describe the shape of it.
How to silence it
ignore = ["SKY-R105"]under[tool.skylos]in apyproject.tomlat the project root turns the check off. JSON has no comments, so there is no inline marker.