-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprettier.config.js
More file actions
41 lines (36 loc) · 1.06 KB
/
Copy pathprettier.config.js
File metadata and controls
41 lines (36 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// prettier.config.js
module.exports = {
/**
* Festlegen, ob einfache Anführungszeichen (true) oder doppelte (false)
* verwendet werden. Der Standard in der Community ist 'true'.
*/
singleQuote: true,
/**
* Steuert das nachgestellte Komma. 'all' fügt es überall hinzu,
* wo es in ES5 gültig ist (Objekte, Arrays) UND in Funktionsargumenten.
* Das macht Code-Diffs (Änderungen in Git) viel sauberer.
*/
trailingComma: 'all',
/**
* Die maximale Zeilenlänge. 80 ist der alte Standard,
* 100 oder 120 sind heute gängiger. 100 ist ein guter Mittelweg.
*/
printWidth: 100,
/**
* Sollen Semikolons am Zeilenende stehen? Ja, für TypeScript ist das
* die sicherste und gängigste Einstellung.
*/
semi: true,
/**
* Die Anzahl der Leerzeichen für einen Einzug (Tab).
* 2 ist der fast universelle Standard für JS/TS.
*/
tabWidth: 2,
/**
* Klammern um einzelne Arrow-Funktions-Parameter.
* 'always' (Standard) -> (x) => x
* 'avoid' -> x => x
* 'always' ist konsistenter.
*/
arrowParens: 'always',
};