Skip to main content

SKY-L035 · Logic and resilience

Blanket ESLint disable

High

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
Wrong result? Report itA false positive, a missed case or a confusing message: it goes privately to the founder.

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

src/jobs/purge.ts · TypeScriptReported on line 1
/* 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

src/jobs/purge.ts · TypeScript
/* 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

scripts/legacy-export.js · JavaScriptReported on line 2
#!/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

scripts/legacy-export.js · JavaScript
#!/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

  1. Runs with --quality on .ts, .tsx, .js, .jsx, .mts, .cts, .mjs and .cjs files. Generated and minified files are skipped.
  2. 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.
  3. Skips the file when a bare /* eslint-enable */ block comment comes after it anywhere in the file.
  4. Line comments (// eslint-disable-next-line), eslint-disable-line and 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 */.

src/jobs/purge.ts · TypeScript · the fix, against the flagged file
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 @generated header, not under dist, build, generated or vendor) 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.

From the Skylos rule handbook, Skylos 5.8.0 (commit 5b880b0). All rules.