Closed
Description
Repro
{
"rules": {
"@typescript-eslint/no-unused-vars": ["error"]
}
}
import { SomeType } from 'foo';
export function fn0(SomeType: SomeType){}
type AnotherType;
export function fn1(AnotherType: AnotherType){}
export function fn2(NonExistedType: NonExistedType) {}
Expected Result
All pass the rule or none of them pass the rule
Actual Result
Import is not OK, but the rest is fine even though the first parameter is not used.
When type node is visited, the parameter is marked as used..😰 see: #363
Additional Info
I know it's not possible to implement this rule without type information which will slow down the linting a lot.. But it should be possible to make the behavior consistent?
Versions
package | version |
---|---|
@typescript-eslint/eslint-plugin |
X.Y.Z |
@typescript-eslint/parser |
X.Y.Z |
TypeScript |
X.Y.Z |
ESLint |
X.Y.Z |
node |
X.Y.Z |
npm |
X.Y.Z |