mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 13:20:44 +00:00
docs: add quirk about using nodejs (#298)
* doc: add quircks about nodejs * doc: make shorter sentences
This commit is contained in:
parent
9bbdb8d48a
commit
1061c920be
2 changed files with 21 additions and 0 deletions
|
@ -4,6 +4,9 @@ At times, certain plugins refuse to play nicely. Be it as a result of generating
|
||||||
lua from Nix, or the state of packaging. This page shall list any plugins that
|
lua from Nix, or the state of packaging. This page shall list any plugins that
|
||||||
are known to misbehave, and potential workarounds.
|
are known to misbehave, and potential workarounds.
|
||||||
|
|
||||||
|
```{=include=} chapters
|
||||||
|
plugins/nodejs.md
|
||||||
|
```
|
||||||
<!--
|
<!--
|
||||||
If adding a new section, uncomment this part and add your page to
|
If adding a new section, uncomment this part and add your page to
|
||||||
plugins/<page>.md
|
plugins/<page>.md
|
||||||
|
|
18
docs/manual/plugins/nodejs.md
Normal file
18
docs/manual/plugins/nodejs.md
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# NodeJS {#ch-plugins-nodejs}
|
||||||
|
|
||||||
|
## eslint-plugin-prettier {#sec-eslint-plugin-prettier}
|
||||||
|
|
||||||
|
When working with NodeJS, everything works as expected, but some projects have settings that can fool nvf.
|
||||||
|
|
||||||
|
If [this plugin](https://github.com/prettier/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-formating relying on your prettier config, while your eslint config diagnoses formatting [which it's not supposed to](https://prettier.io/docs/en/comparison.html))
|
||||||
|
|
||||||
|
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, and separate prettier and eslint.
|
||||||
|
2. PR this repo to add an ESLint formatter and configure nvf to use it.
|
Loading…
Reference in a new issue