Comment ne plus jamais avoir de CI front bloquée par prettier

Une histoire de dev🧑‍💻

Prettier

Prettier is an opinionated code formatter.
 

It removes all original styling and ensures that all outputted code conforms to a consistent style.
 

Prettier takes your code and reprints it from scratch by taking the line length into account.

ESLint

ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code, with the goal of making code more consistent and avoiding bugs.

 

ESLint is completely pluggable. Every single rule is a plugin and you can add more at runtime. You can also add community plugins, configurations, and parsers to extend the functionality of ESLint.

Les problèmes

Prettier

ESLint

La solution

Bonus lintstaged

deck

By Léo Anesi

deck

  • 82