-
-
Notifications
You must be signed in to change notification settings - Fork 303
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
🔬 ESLint + (optionally) Prettier Integration with WordPress Standards #73
Comments
I have just pushed a basic ESLint integration for the WPGulp2.0. If anyone is interested in reviewing the history of changes take a look at this commit 252ca86 |
If you read the description above you'll get to know that there's just one spacing rule that Prettier doesn't support and that's a blocker for WordPress. Anywho, I have made the first pass on the ESLint integration as per the official WordPress ESLint configuration and with VSCode they are working quite well. Since there is already a WPCS ESLint config, and I've tried it successfully alongside the VS Code ESLint extension. I think the missing piece to the puzzle at this point is a Prettier config file that matches WPCS. That way Prettier can handle the formatting while ESLint handles the code quality rules. For those curious why you would use Prettier and ESLint, here's a good explanation. https://prettier.io/docs/en/comparison.html You should also read the progress related to ESLint + Prettier with WordPress at this Gutenberg issue. So, far, I am happy with ESLint only and can do without Prettier. Can you check the current ESLint integration and see if there's anything that could be improved before we add ESNext support? I have just pushed a basic ESLint integration for the WPGulp2.0 take a look → 252ca86 |
I've left some comments :) |
@dingo-d Where? |
In the PR, but you've answered them :D |
ESLint helps linting the ECMAScript and Prettier is the best Opinionated Code Formatter as in it uses AST and rewrites everything from scratch addressing all the consistencies.
The text was updated successfully, but these errors were encountered: