Skip to content

Put eslint-disable above ts-nocheck in generated types - #1244

Merged
theoephraim merged 1 commit into
dmno-dev:mainfrom
bercedev:eslint-disable-above-ts-nocheck
Oct 29, 2026
Merged

theoephraim merged 1 commit into
dmno-dev:mainfrom
bercedev:eslint-disable-above-ts-nocheck

Conversation

@bercedev

Copy link
Copy Markdown
Contributor

Fixes #1243

the generated .d.ts had // @ts-nocheck before /* eslint-disable */, so a lint rule that flags @ts-nocheck (like @typescript-eslint/ban-ts-comment) still reported that line. the two lines are swapped now, so eslint is off before it.

@ts-nocheck still works there, ts reads it from any of the leading comments (the autogenerated banner was already above it). checked with tsc --strict on a file with that header and a type error: no errors reported.

added a check to the existing generateTsTypesSrc output test that the eslint-disable line comes first; it fails on main.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes Reviewed the generated TypeScript header fix and its regression coverage for #1243.

  • Comment ordering: Moves /* eslint-disable */ before // @ts-nocheck, preventing @typescript-eslint/ban-ts-comment from reporting the generated directive while preserving TypeScript suppression.
  • Regression coverage: Adds assertions that both directives are present and ordered correctly. All 94 focused type-generation tests passed; the build, changed-file lint, and direct ESLint/TypeScript behavior probes also passed.
  • Release entry: Includes a varlock patch entry describing the generated-file lint fix.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@theoephraim
theoephraim force-pushed the eslint-disable-above-ts-nocheck branch from cf1edc4 to 1f0dc52 Compare October 29, 2026 06:09
@theoephraim
theoephraim merged commit cc44d52 into dmno-dev:main Oct 29, 2026
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Move eslint-disable above @ts-nocheck in generated types file

2 participants