prettier/prettier-eslint

Integration with CI/CD (gitlab)

michelgokan opened this issue · 1 comments

Is there any command that I can validate/check if formatting standard has been implemented based on BOTH eslint AND prettier formatting rules using this plugin? For example, in case there are conflicting changes in eslint (with prettier), eslint --format can only check if the code is formatted according to eslint formatting rules, and running prettier can only check if the code is passing the prettier formatting rules, but there is no command that can check both (including the conflicting changes). In this scenario, if I run eslint first and prettier next, it will pass the eslint but will fail prettier, and if run prettier first and eslint next, eslint will fail and prettier will pass.

I'm wondering if there is any way I can validate the code based on all rulesets (considering the conflicting ones too).

Maybe you want https://github.com/prettier/eslint-plugin-prettier

Or eslint-config-prettier .eslintrc.js