sweepline / eslint-plugin-unused-imports

Package to separate no-unused-vars and no-unused-imports for eslint as well as providing an autofixer for the latter.
MIT License
504 stars 21 forks source link

`no-unused-imports` complains about decorator param #92

Closed suevalov closed 1 month ago

suevalov commented 1 month ago

Problem

no-unused-imports warns of a decorator parameter as an unused import.

Example of the code, where of is a violation of no-unused-imports

@Resolver(of => Comment)
export class CommentResolver extends BaseResolver {
}

Versions

Package versions:

    "@typescript-eslint/eslint-plugin": "7.7.0",
    "@typescript-eslint/parser": "7.10.0",
    "eslint": "8.56.0",
    "eslint-plugin-unused-imports": "3.2.0",

Expected

It should only be taken care by unused-imports/no-unused-vars rule.

charlescrain commented 1 month ago

Same issue with:

 "eslint": "9.8.0",
 "eslint-plugin-unused-imports": "4.0.1",
 "@typescript-eslint/eslint-plugin": "8.0.1",
 "@typescript-eslint/parser": "8.0.1",
antfu commented 1 month ago

We temporarily closed this due to the lack of enough information. We could not identify whether it was a bug or a userland misconfiguration with the given info. Please provide a minimal reproduction to reopen the issue. Thanks.

Why reproduction is required