Skip to content

Handle deprecated rules (closes #112)#121

Merged
lydell merged 6 commits intoprettier:masterfrom
alexilyaev:handle-deprecated-rules
Oct 26, 2019
Merged

Handle deprecated rules (closes #112)#121
lydell merged 6 commits intoprettier:masterfrom
alexilyaev:handle-deprecated-rules

Conversation

@alexilyaev
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread index.js Outdated
Comment thread index.js Outdated
Comment thread react.js Outdated
Comment thread index.js Outdated
Comment thread index.js Outdated
Comment thread react.js Outdated
Comment thread react.js Outdated
@alexilyaev
Copy link
Copy Markdown
Contributor Author

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

@lydell
Copy link
Copy Markdown
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
Copy Markdown
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.

2 participants