techdocs icon indicating copy to clipboard operation
techdocs copied to clipboard

Transition from stylelint to prettier

Open Cronus1007 opened this issue 4 years ago • 2 comments

Discussion 🗣

Prettier is an opinionated code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules that take the maximum line length into account, wrapping code when necessary; Stylelint: A mighty, modern CSS linter. A mighty, modern CSS linter that helps you enforce consistent conventions and avoid errors in your stylesheets.

Context

Pros of Prettier

  • Atom/VSCode package
  • Follows the Ruby Style Guide by default
  • Customizable
  • Runs offline
  • Open Source

Tools integrated with Prettier

  • JS
  • TS
  • REactjs
  • Angularjs
  • Vuejs
  • CSS
  • Less
  • SCSS
  • markdown

Detailed Description

Cronus1007 avatar Mar 11 '21 10:03 Cronus1007

Could you provide more context of where Stylelint is used, how it is not achieving what it should be achieving in our repositories, where Prettier would need to be setup, and how this relates to ESLint?

jolanglinais avatar Mar 11 '21 13:03 jolanglinais

The Stylelint is used in all the packages of the Web Components Repository. It doesn't relates to ESLint. Both prettier and eslint are linting formatters. Have a look upon this for more info regarding stylelint vs prettier https://stackshare.io/stackups/prettier-vs-stylelint#:~:text=opinionated%20code%20formatter.-,Prettier%20is%20an%20opinionated%20code%20formatter.,A%20mighty%2C%20modern%20CSS%20linter.

Cronus1007 avatar Mar 11 '21 13:03 Cronus1007