SKY-L035 · Logic and resilience
Blanket ESLint disable
A /* eslint-disable */ comment at the top of a file with no rule names. It turns off every ESLint rule for the whole file, including the ones that catch real bugs, such as unhandled promises and unused variables.
- Languages
- TypeScript, JavaScript
- Quality gate
- counted toward the gate limits (full and diff scans)
- Finding type
- review
Why it matters
Coding agents often add it to make a lint error go away. From then on ESLint checks nothing in that file, so new mistakes added later pass CI without a single warning.
What Skylos flags
/* eslint-disable */import { db } from "../db"; export async function purgeExpiredSessions(): Promise<number> { const result = await db.sessions.deleteMany({ expiresAt: { lt: new Date() } }); console.log(`purged ${result.count} sessions`); return result.count;}What Skylos leaves alone
/* eslint-disable no-console -- this job reports progress on stdout */import { db } from "../db"; export async function purgeExpiredSessions(): Promise<number> { const result = await db.sessions.deleteMany({ expiresAt: { lt: new Date() } }); console.log(`purged ${result.count} sessions`); return result.count;}Why Skylos leaves it alone
The comment names the one rule it turns off (no-console) and says why. Every other ESLint rule still checks the file.
More languages
JavaScript
Flagged
#!/usr/bin/env node/* eslint-disable -- legacy export, will be rewritten */const fs = require("fs"); const rows = JSON.parse(fs.readFileSync("orders.json", "utf8"));fs.writeFileSync("orders.csv", rows.map((row) => row.join(",")).join("\n"));Not flagged
#!/usr/bin/env node/* eslint-disable */const fs = require("fs");/* eslint-enable */ const rows = JSON.parse(fs.readFileSync("orders.json", "utf8"));fs.writeFileSync("orders.csv", rows.map((row) => row.join(",")).join("\n"));Why Skylos leaves it alone
A later /* eslint-enable */ turns the rules back on, so the disabled region is limited. A reason after -- does not count as a rule name: the flagged version is still a blanket disable.
How Skylos decides
- Runs with
--qualityon.ts,.tsx,.js,.jsx,.mts,.cts,.mjsand.cjsfiles. Generated and minified files are skipped. - Reads only the comments before the first statement (a
#!line may come first). Looks for a block comment/* eslint-disable */that names no rule; text after--is a reason, not a rule name. - Skips the file when a bare
/* eslint-enable */block comment comes after it anywhere in the file. - Line comments (
// eslint-disable-next-line),eslint-disable-lineand disables placed later in the file are not checked. Reports HIGH on the line of the comment.
How to fix it
Remove the comment and fix what ESLint reports. Where a rule really does not fit, turn off only that rule, with a reason, on the narrowest scope: one line with // eslint-disable-next-line rule-name, or the file with /* eslint-disable rule-name -- reason */.
Removed: /* eslint-disable */import { db } from "../db"; export async function purgeExpiredSessions(): Promise<number> { const result = await db.sessions.deleteMany({ expiresAt: { lt: new Date() } });Added: // eslint-disable-next-line no-console -- job output goes to the scheduler log console.log(`purged ${result.count} sessions`); return result.count;}When it can be wrong
- A vendored or generated file that is not marked as generated (no
@generatedheader, not underdist,build,generatedorvendor) is reported. Mark it or exclude the folder instead.
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
Put the marker on the same line as the comment.
TypeScript /* eslint-disable */ // skylos: ignore[SKY-L035] copied third-party file[tool.skylos] ignore = ["SKY-L035"]turns the rule off for the project.