feat: configured prettier, pretty-quick and husky

This commit is contained in:
Florent Chehab 2020-05-07 21:43:13 +02:00
parent c67b369d83
commit a61debebb4
No known key found for this signature in database
GPG Key ID: 9A0CE018889EA246
3 changed files with 13 additions and 2 deletions

View File

@ -8,5 +8,5 @@ indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
[{*.js,*.css}]
[{*.js,*.css,*.html}]
indent_size = 4

3
.prettierrc.json Normal file
View File

@ -0,0 +1,3 @@
{
"printWidth": 100
}

View File

@ -8,7 +8,10 @@
"build": "webpack --config config/webpack.build.js",
"start:dev": "node scripts/server.js --mode=development",
"start:prod": "npm run build && node scripts/server.js --mode=production",
"test": "echo \"No tests needed!\" && exit 1"
"test": "echo \"No tests needed!\" && exit 1",
"pretty-quick": "pretty-quick",
"format": "prettier --write .",
"style": "prettier --check ."
},
"repository": {
"type": "git",
@ -19,6 +22,11 @@
"Sketchboard",
"lightweight"
],
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
},
"dependencies": {
"dompurify": "^2.0.7",
"express": "4.*",