We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a9b81c commit ebe03dfCopy full SHA for ebe03df
recipes/format-and-lint/prettier.md
@@ -0,0 +1,42 @@
1
+# Prettier
2
+
3
+JavaScript formatting with Prettier.
4
5
+## Disable
6
7
+Disable a line:
8
9
+```
10
+// eslint-disable-next-line prettier/prettier
11
12
13
14
+## Resources
15
16
+- [Prettier](https://prettier.io/) homepage
17
+- [Configuration file](https://prettier.io/docs/en/configuration.html)
18
+- [Options](https://prettier.io/docs/en/options.html)
19
20
21
+## Samples
22
23
+### Basic
24
25
+- `.prettierrc.json`
26
+ ```json
27
+ {
28
+ "trailingComma": "all",
29
+ "tabWidth": 2,
30
+ "semi": true,
31
+ "singleQuote": false
32
+ }
33
+ ```
34
+- `prettier.config.js` or `.prettierrc.js`
35
+ ```javascript
36
+ module.exports = {
37
+ trailingComma: "es5",
38
+ tabWidth: 4,
39
+ semi: false,
40
+ singleQuote: true,
41
+ };
42
0 commit comments