Description
Before You File a Bug Report Please Confirm You Have Done The Following...
- I have tried restarting my IDE and the issue persists.
- I have updated to the latest version of the packages.
- I have searched for related issues and found none that matched my issue.
- I have read the FAQ and my problem is not listed.
Issue Description
ESLint 9 added new options to their no-unused-vars
rule:
reportUsedIgnorePattern
- Will indicate a problem if an item matches its ignore pattern, but is actually being usedignoreClassWithStaticInitBlock
- Ignores classes with items in static initialization blocks that would normally be marked as unused
See no-unused-vars
for more info.
These options don't appear to be implemented in typescript-eslint's no-unused-vars
extension rule.
Expected Outcome
I would expect index.ts
in the reproduction repo to be linted and throw the linting errors seen in this ESLint Playground Link. This uses the same code as in the reproduction repo.
Actual Outcome
An error is thrown by typescript-eslint, because these options are not recognized / implemented in the extension rule:
Oops! Something went wrong! :(
ESLint: 9.3.0
Error: Key "rules": Key "@typescript-eslint/no-unused-vars":
Value {"varsIgnorePattern":"^_","reportUsedIgnorePattern":true,"ignoreClassWithStaticInitBlock":true} should be string.
Value {"varsIgnorePattern":"^_","reportUsedIgnorePattern":true,"ignoreClassWithStaticInitBlock":true} should be equal to one of the allowed values.
Value {"varsIgnorePattern":"^_","reportUsedIgnorePattern":true,"ignoreClassWithStaticInitBlock":true} should NOT have additional properties.
Unexpected property "reportUsedIgnorePattern". Expected properties: "vars", "varsIgnorePattern", "args", "ignoreRestSiblings", "argsIgnorePattern", "caughtErrors", "caughtErrorsIgnorePattern", "destructuredArrayIgnorePattern".
Value {"varsIgnorePattern":"^_","reportUsedIgnorePattern":true,"ignoreClassWithStaticInitBlock":true} should match exactly one schema in oneOf.
Reproduction Repository Link
https://github.com/bachmacintosh/tseslint-no-unused-vars
Repro Steps
- clone the repo
npm install
npm run lint
Versions
package | version |
---|---|
typescript-eslint |
8.0.0-alpha.14 |
TypeScript |
5.4.5 |
ESLint |
9.3.0 |
node |
20.12.2 |