init prettier

This commit is contained in:
Bowen Tan 2021-08-20 17:32:06 +08:00
parent b1f41cdaff
commit 5bde173d72
2 changed files with 14 additions and 2 deletions

11
.prettierrc Normal file
View File

@ -0,0 +1,11 @@
{
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "es5",
"bracketSpacing": true,
"jsxBracketSameLine": true,
"arrowParens": "avoid",
"endOfLine": "lf"
}

View File

@ -7,7 +7,8 @@
"devDependencies": {
"husky": "^6.0.0",
"lerna": "^4.0.0",
"lint-staged": "^11.0.0"
"lint-staged": "^11.0.0",
"prettier": "^2.3.2"
},
"workspaces": [
"packages/*"
@ -18,7 +19,7 @@
}
},
"lint-staged": {
"packages/**/!(generated)/*.{js,ts,tsx,yml,json}": [
"*.{ts,tsx,html,json}": [
"prettier --write",
"git add"
]