If you are disabling Prettier's/ESLint formatting in JavaScript or HTML
files please use:
// prettier-ignore
Rather than:
// eslint-disable-next-line prettier/prettier
This should only be used in a few situations, e.g. for when we have a
constant array that is more readable when laid out as a table.
The ESLint FAQ has been updated with a section describing this
<https://firefox-source-docs.mozilla.org/code-quality/lint/linters/eslint.html#this-code-shouldn-t-be-formatted>.
If the code is generated, or from third parties, please add it to the
appropriate files
<https://firefox-source-docs.mozilla.org/code-quality/lint/linters/eslint.html#this-code-should-neither-be-linted-nor-formatted>.
This will prevent all linters from touching it.
The reason for this change is that I am currently working on separating
out Prettier from ESLint
<https://bugzilla.mozilla.org/show_bug.cgi?id=1809497>, so that they are
run as separate processes. As part of this, we need to transition to use
Prettier's ignore syntax rather than the syntax for ESLint. I have
replaced most of the instances in the tree of the old method, and will
tidy up the remainder soon.
Mark.
--
You received this message because you are subscribed to the Google Groups
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/6f70be63-b6aa-8c84-63ad-4cbd36772f78%40mozilla.com.