Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add unused-imports plugin #230

Merged
merged 1 commit into from Nov 16, 2021
Merged

Conversation

courier-new
Copy link
Contributor

Adds eslint-plugin-unused-imports, which identifies and reports unused imports just like TS already does, but has one distinct advantage: autofix!! Here's a recording demonstration where my editor runs eslint --fix on save:

Screen.Recording.2021-11-15.at.2.24.34.PM.mov

It's SO easy to miss an unused import locally because they hide way up at the top of your file where you're not doing actual work. If I had a dollar for every time I've amended a commit or pushed the commit "Remove unused import" only after I realized CI failed... πŸ€¦β€β™€οΈ For those of us with setups that run eslint autofix on save, this is a lifesaver.

@courier-new courier-new requested a review from a team November 15, 2021 22:26
@courier-new courier-new self-assigned this Nov 15, 2021
Copy link
Contributor

@vovakulikov vovakulikov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! πŸ‘

Copy link
Contributor

@umpox umpox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

πŸ™Œ

@courier-new courier-new merged commit 063a054 into master Nov 16, 2021
@courier-new courier-new deleted the kr/unused-imports-rule branch November 16, 2021 20:19
@sourcegraph-buildkite
Copy link
Collaborator

πŸŽ‰ This PR is included in version 0.26.0 πŸŽ‰

The release is available on:

Your semantic-release bot πŸ“¦πŸš€

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants