Skip to content

Commit 7b30ef3

Browse files
committed
docs: add opinions to readme
1 parent e28a119 commit 7b30ef3

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

README.md

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,38 @@
22

33
Shared Prettier configuration for usage within the [fullstax Gmbh & CO. KG](https://www.fullstax.de).
44

5+
## Opinions
6+
7+
We stick to the very opinionated [default options](https://prettier.io/docs/en/options.html) of the [current version of prettier](https://www.npmjs.com/package/prettier) but we have a few (strong) opinions of our own:
8+
9+
### singleQuote
10+
11+
We set `singleQuote: true`.
12+
13+
We don't use jsx or other abominations, and also don't thing you should put long strings inside you code. So for us singel quotes are just more lightweight and improve readability when used together with string-templates, that we use for most strings.
14+
15+
### useTabs
16+
17+
We set `useTabs: true` and we have a very strong opinion about this!
18+
19+
Why the hell would you use spaces for indentation? That's just very unprofessional! https://www.youtube.com/watch?v=SsoOG6ZeyUI
20+
21+
### printWidth
22+
23+
We use a `printWidth` of `100` instead of the default `80`
24+
25+
While this is explicitly discurraged in [the prettier docs](https://prettier.io/docs/en/options.html#print-width) we acknowledge that screens are much wider than high, nowadays.
26+
27+
We just prefer a little less broken up lines in our code. This is not a strong opinion but instead of putting a big warning-block inside their docs prettier should acknowledge that a lot of projects currently overwrite the default of 80! Not every developer is using vim...
28+
29+
### arrowParens
30+
31+
We (still) use `arrowParens: avoid`
32+
33+
Prettier recently made the very hard change from `avoid` to `always` in v2](https://prettier.io/docs/en/options.html#arrow-function-parentheses). While we think the change makes sense we want to keep out code bases consistend for now.
34+
35+
We propably will change this in a future version!
36+
537
## Install
638

739
```bash
@@ -29,6 +61,6 @@ This option is useful, if you want to overwrite the common config with a project
2961
```js
3062
module.exports = {
3163
...require("@fullstax/prettier-config"),
32-
"printWidth": 80,
64+
"arrowParens": "always",
3365
};
3466
```

prettierrc.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
"singleQuote": true,
33
"useTabs": true,
44
"printWidth": 100,
5-
"trailingComma": "es5",
65
"arrowParens": "avoid"
76
}

0 commit comments

Comments
 (0)