Skip to content

fix: scope base no-unused-vars rule to plain JS files - #31

Merged
dirkjanfaber merged 1 commit into
mainfrom
chore/fix-eslint-ts-type-signature-lint
Aug 2, 2026
Merged

dirkjanfaber merged 1 commit into
mainfrom
chore/fix-eslint-ts-type-signature-lint

Conversation

@dirkjanfaber

Copy link
Copy Markdown
Owner

The base ESLint no-unused-vars rule doesn't understand TypeScript function-type-only signatures (e.g. (this: any, config: any) => void), so it was flagging their named parameters — including this — as unused in threshold-control.test.ts even though @typescript-eslint/no-unused-vars already covers real unused vars/args in .ts files. Restrict the base rule to **/*.js so it only applies where it's actually correct.

The base ESLint no-unused-vars rule doesn't understand TypeScript
function-type-only signatures (e.g. `(this: any, config: any) => void`),
so it was flagging their named parameters — including `this` — as unused
in threshold-control.test.ts even though @typescript-eslint/no-unused-vars
already covers real unused vars/args in .ts files. Restrict the base rule
to **/*.js so it only applies where it's actually correct.
@dirkjanfaber
dirkjanfaber merged commit 97870ea into main Aug 2, 2026
2 checks passed
@dirkjanfaber
dirkjanfaber deleted the chore/fix-eslint-ts-type-signature-lint branch August 2, 2026 07:50
@dirkjanfaber
dirkjanfaber restored the chore/fix-eslint-ts-type-signature-lint branch August 2, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant