generated from homebridge/homebridge-plugin-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prettier.config.js
49 lines (39 loc) · 948 Bytes
/
prettier.config.js
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
42
43
44
45
46
47
48
49
// @ts-check
/*
prettier.config.js
Prettier:
How to install:
npm install --save-dev prettier eslint-config-prettier eslint-plugin-prettier
Add package.json scripts:
*/
// "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json,css,md}\"",
// "format:check": "prettier --check \"src/**/*.{js,jsx,ts,tsx,json,css,md}\"",
/*
Add .prettierignore
# Ignore artifacts:
dist
node_modules
build
coverage
# Ignore all HTML files:
*/
// **/*.html
export default {
printWidth: 180, // default 80
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: true, // default false
quoteProps: 'preserve', // default 'as-needed'
jsxSingleQuote: false,
trailingComma: 'all',
bracketSpacing: true,
bracketSameLine: false,
arrowParens: 'always',
requirePragma: false,
insertPragma: false,
proseWrap: 'preserve',
endOfLine: 'lf',
embeddedLanguageFormatting: 'off', // default 'auto'
singleAttributePerLine: false,
};