mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-01-02 09:05:55 +00:00
docs: fix headings; move quirks to includes block'
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ie853fc60a60c6ff6a945dc67560639ac6a6a6964
This commit is contained in:
parent
9f7da0727a
commit
8a1ef233eb
9 changed files with 61 additions and 48 deletions
29
docs/manual/quirks/nodejs.md
Normal file
29
docs/manual/quirks/nodejs.md
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
## NodeJS {#ch-quirks-nodejs}
|
||||
|
||||
### eslint-plugin-prettier {#sec-eslint-plugin-prettier}
|
||||
|
||||
[eslint-plugin-prettier]: https://github.com/prettier/eslint-plugin-prettier
|
||||
[not supposed to]: https://prettier.io/docs/en/comparison.html
|
||||
|
||||
When working with NodeJS, which is _obviously_ known for its meticulous
|
||||
standards, most things are bound to work as expected but some projects, tools
|
||||
and settings may fool the default configurations of tools provided by **nvf**.
|
||||
|
||||
If
|
||||
|
||||
If [eslint-plugin-prettier] or similar is included, you might get a situation
|
||||
where your Eslint configuration diagnoses your formatting according to its own
|
||||
config (usually `.eslintrc.js`). The issue there is your formatting is made via
|
||||
prettierd.
|
||||
|
||||
This results in auto-formatting relying on your prettier configuration, while
|
||||
your Eslint configuration diagnoses formatting "issues" while it's
|
||||
[not supposed to]. In the end, you get discrepancies between what your editor
|
||||
does and what it wants.
|
||||
|
||||
Solutions are:
|
||||
|
||||
1. Don't add a formatting config to Eslint, instead separate Prettier and
|
||||
Eslint.
|
||||
2. PR the repo in question to add an ESLint formatter, and configure **nvf** to
|
||||
use it.
|
||||
Loading…
Add table
Add a link
Reference in a new issue