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

Handle deprecated rules (closes #112) #121

Merged
merged 6 commits into from Oct 26, 2019

Conversation

alexilyaev
Copy link
Contributor

@alexilyaev alexilyaev commented Oct 19, 2019

  • Conditionally add deprecated rules based on environment variable

Can now pass an environment variable to tell eslint-config-prettier not to add deprecated rules.

ESLINT_CONFIG_PRETTIER_NO_DEPRECATED=1 npx eslint-find-rules -d .eslintrc

Details

Copy link
Member

@lydell lydell left a comment

Choose a reason for hiding this comment

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

Nice!

Now need to add:

  • A test.
  • Documentation. I think we could add a new sub-heading under Installation. At the end of the Installation section to be specific. Maybe "Excluding deprecated rules". That section would need to explain that eslint-config-prettier turns off a couple of deprecated rules and that that is nothing to worry about usually. Then we could mention the eslint-find-rules use case.

index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
react.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
react.js Outdated Show resolved Hide resolved
react.js Outdated Show resolved Hide resolved
alexilyaev and others added 2 commits October 20, 2019 20:37
Co-Authored-By: Simon Lydell <simon.lydell@gmail.com>
@alexilyaev
Copy link
Contributor Author

@lydell I think I'm done.
The test was a bit tricky, see comments in my code.

@lydell
Copy link
Member

lydell commented Oct 23, 2019

Thanks! I’ll get back to you this weekend.

@lydell lydell merged commit 4fdaa04 into prettier:master Oct 26, 2019
@alexilyaev
Copy link
Contributor Author

@lydell Cool, I like the the updates you've made.

@alexilyaev alexilyaev deleted the handle-deprecated-rules branch October 26, 2019 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants