eslint-config icon indicating copy to clipboard operation
eslint-config copied to clipboard

feat: add `unused-imports/no-unused-imports-ts` rule

Open Aperrix opened this issue 1 year ago • 2 comments

Description

I noticed that the auto-fix of unused imports didn't work well for .ts files, using the config-viewer I noticed that a rule was unused and activating it worked so I suggest adding it.

image

Linked Issues

Additional context

Aperrix avatar Feb 21 '24 15:02 Aperrix

I couldn't find any docs for that rule - I don't understand why we need it, isn't TypeScript already checking for that?

antfu avatar Feb 22 '24 11:02 antfu

You are right, they're not documented, but they're present in the lib's exports. There doesn't seem to be any special treatment linked to the no-unused-imports-ts rule, but thanks to this rule it works correctly, I can't explain it. 🤐

There may be a better modification to make, but this is my first contribution, I haven't delved into the eslint config code yet. 😅

image

Aperrix avatar Feb 22 '24 12:02 Aperrix