Prettier

Creator
Creator
Seonglae Cho
Created
Created
2020 Mar 11 4:39
Editor
Edited
Edited
2023 Aug 5 4:10

Code Formatter

ESLint에도 formatting 관련 규칙들이 있지만, Prettier는 formatting에 특화되어 있다.
{ "singleQuote": true, "endOfLine": "lf", "semi": false, "tabWidth": 2, "printWidth": 125, "arrowParens": "avoid", "jsxBracketSameLine": true, "trailingComma": "all", }
 
 
{ "singleQuote": true, "semi": false, "arrowParens": "always", "tabWidth": 2, "endOfLine": "auto", "printWidth": 150, "proseWrap": "always", "useTabs": false, "trailingComma": "none", "bracketSpacing": true, "jsxBracketSameLine": false, "arrowParens": "avoid" } }
 
"format": "prettier --write \"**/*.{js,jsx,json,md,vue}\" --ignore-path .gitignore"
 
 
prettier inline
 
 

arrow function no parent

eol

 
 

Recommendations