The fix feature of eslint is pretty great and can auto-format/fix much of your code according to your ESLint config. prettier is a more powerful automatic formatter. One of the nice things about prettier is how opinionated it is. Unfortunately, it's not opinionated enough and/or some opinions differ from my own. So after prettier formats the code, I start getting linting errors. This formats your code via prettier, and then passes the result of that to eslint --fix. This way you can get the benefits of prettier's superior formatting capabilities, but also benefit from the configuration capabilities of eslint. The path of the file being formatted can be used to override eslintConfig (eslint will be used to find the relevant config for the file).

Features

  • The config to use for formatting with ESLint. Can be overridden with filePath
  • The path of the file being formatted can be used to override eslintConfig (eslint will be used to find the relevant config for the file)
  • prettier-eslint does quite a bit of logging if you want it to
  • By default, prettier-eslint will run prettier first, then eslint --fix
  • prettier-eslint will only propagate parsing errors when either prettier or eslint fails
  • The eslintConfig and prettierOptions can each be provided as an argument

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow prettier-eslint

prettier-eslint Web Site

Other Useful Business Software
Data management solutions for confident marketing Icon
Data management solutions for confident marketing

For companies wanting a complete Data Management solution that is native to Salesforce

Verify, deduplicate, manipulate, and assign records automatically to keep your CRM data accurate, complete, and ready for business.
Learn More
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of prettier-eslint!

Additional Project Details

Programming Language

JavaScript

Related Categories

JavaScript Source Code Analysis Tool

Registered

2022-10-20