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

Issue when linting UI library #86

Closed skitscha closed 1 month ago

skitscha commented 2 months ago

I'm trying to run the linter on a UI library. However, this plugin seems to blowup when its gets to a specific component each time. It is giving me the error: TypeError: Cannot destructure property 'parent' of 'node' as it is undefined.

Rule: "unused-imports/no-unused-imports"

It seems to be blowing up on this line of code: image

Do you have any ideas on what could be causing this?

Samuel-Therrien-Beslogic commented 2 months ago

What's your eslint-plugin-unused-imports and @typescript-eslint/eslint-plugin versions ? I had the same issue and it was fixed by updating eslint-plugin-unused-imports@3.2.0. See https://github.com/sweepline/eslint-plugin-unused-imports/issues/77

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