-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Adds prettier plugin to eslint #40118
Conversation
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
@@ -7,7 +7,7 @@ module.exports = { | |||
'wpcalypso/react', | |||
'plugin:jsx-a11y/recommended', | |||
'plugin:jest/recommended', | |||
'prettier', | |||
'plugin:prettier/recommended', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the recommended config from https://prettier.io/docs/en/integrating-with-linters.html#recommended-configuration
This does three things:
- Extends
"prettier"
(as before) - Add plugin
"prettier"
that allow running prettier as an eslint rule - Configure prettier rules to use "error" level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢LGTM
Note for other VSCode users: the eslint extension docs explain how you'll configure codeActionsOnSave
:
https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint
Typically, in settings.json, you'll just add:
"editor.codeActionsOnSave": { "source.fixAll": true }
Changes proposed in this Pull Request
Testing instructions
.js
file and type anything with formatting errors (eg: extra spaces)