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

Add deprecated flags to imports-first metadata #625

Merged

Conversation

randycoulman
Copy link
Contributor

Over on eslint-find-rules, there has been some discussion about being able to detect deprecated rules in order to not report them as unused and to report when they are still being used.

In order to implement those features, there needs to be a way to detect that a rule has been deprecated. Core ESLint rules that are deprecated are marked as such in their metadata.

This PR adds the same deprecated flag to the metadata of the deprecated rule in this plugin.

I added a very specific spec for this rule to make sure that imports-first is marked as deprecated, but first (which is its new name) is not. There might be a better way to write a more generic test, but when there’s only a single deprecated rule, it’s hard to know what the right direction is.

Copy link
Collaborator

@jfmengels jfmengels left a comment

Choose a reason for hiding this comment

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

Sounds good to me!

@coveralls
Copy link

coveralls commented Oct 14, 2016

Coverage Status

Coverage increased (+0.01%) to 94.91% when pulling 52327ac on randycoulman:add-deprecated-to-metadata into d9605a0 on benmosher:master.

Copy link
Member

@benmosher benmosher left a comment

Choose a reason for hiding this comment

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

👍🏻 thanks! Didn't realize this was out in the wild!

@jfmengels
Copy link
Collaborator

@benmosher Any reason you didn't merge this? I'm 👍 with this

@benmosher benmosher merged commit 2602b5d into import-js:master Nov 2, 2016
@randycoulman randycoulman deleted the add-deprecated-to-metadata branch July 1, 2017 23:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants