Prettier · Opinionated Code Formatter
Opinionated Code Formatter
prettier.io
// prettierrc.js
module.exports = {
printWidth: 200,
tabWidth: 2,
useTabs: false,
semi: true,
singleQuote: true,
quoteProps: "as-needed",
jsxSingleQuote: false,
trailingComma: "es5",
bracketSpacing: true,
bracketSameLine: false,
arrowParens: "always",
singleAttributePerLine: false,
endOfLine: "auto",
overrides: [
{
files: "*.js",
options: {
printWidth: 10000
}
}
]
}
// prettierrc.json
{
"printWidth": 200,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"quoteProps": "as-needed",
"jsxSingleQuote": false,
"trailingComma": "es5",/
"bracketSpacing": true,
"bracketSameLine": false,
"arrowParens": "always",
"singleAttributePerLine": false,
"endOfLine": "auto",/
"overrides": [
{
"files": "*.js",
"options": {
"printWidth": 10000
}
}
]
}
'IT > JavaScript' 카테고리의 다른 글
Vite #1 (0) | 2022.12.26 |
---|---|
JavaScript 번들러 (0) | 2022.12.26 |
ES5 문법 #4 ~ JSON, Date, Object... (0) | 2022.12.15 |
ES5 문법 #3 ~ Array (0) | 2022.12.14 |
ES5 문법 #2 ~ string (0) | 2022.12.13 |