3

Separate out prettier and ESLint to run as different processes

 1 year ago
source link: https://bugzilla.mozilla.org/show_bug.cgi?id=1809497
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Details

Running ESLint with prettier integrated as part of it causes several issues:

  • eslint-plugin-html and prettier conflict if prettier is enabled on html files, causing inconsistent formatting.
  • We are unable to run separate formatting only linters (xref bug 1803229).
  • Prettier itself recommends against integrating the two. Quoting:

You end up with a lot of red squiggly lines in your editor, which gets annoying. Prettier is supposed to make you forget about formatting – and not be in your face about it!
They are slower than running Prettier directly.
They’re yet one layer of indirection where things may break.

Hence I think we should work towards separating these. From a configuration perspective it should be reasonably simple, the biggest part will be getting the commands hooked up right so as not to break workflows.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK