]> git.lizzy.rs Git - rust.git/commit
prettier config
authorAndrei Listochkin <andrei.listochkin@ferrous-systems.com>
Wed, 11 May 2022 17:19:45 +0000 (18:19 +0100)
committerAndrei Listochkin <andrei.listochkin@ferrous-systems.com>
Tue, 17 May 2022 17:12:49 +0000 (18:12 +0100)
commit4fcdb0fea02d7d64450a6a48d4a9ac1b546b66f9
tree255daad38b8d0b3a5b1c91445f2eeddfc35cd538
parent7e95c14ea730c6b06f5760c8c92e69b9a6def828
prettier config

[Prettier][1] is an up-to date code formatter for JavaScript ecosystem.

For settings we rely on [EditorConfig][2] for things like tab style and
size (with added bonus that the code editor with an EditorConfig plugin
does some automated code formatting on file save for you). Unfortunately,
Prettier's Glob handling isn't great:
 1. `*.{ts,js,json}` has no effect
 2. Similarly, in a list of globs `*.ts,*.js,*.json` only the first glob
has an effect, the rest are ignored.
That's why the file looks the way it does.

The only other setting we change is line width. [Lukas][3] suggested we
use 100 instead of 80, because that's what Rustfmt is using.

[1]: https://prettier.io
[2]: https://editorconfig.org
[3]: https://github.com/Veykril
.editorconfig [new file with mode: 0644]
editors/code/.eslintrc.js
editors/code/.prettierignore [new file with mode: 0644]
editors/code/.prettierrc.js [new file with mode: 0644]
editors/code/package-lock.json
editors/code/package.json