Use .prettierignore / .prettierrc files

This commit is contained in:
Mathieu Acthernoene 2017-09-12 01:13:17 +02:00
parent 74119d471d
commit 1f2b3d8d29
3 changed files with 7 additions and 3 deletions

1
.prettierignore Normal file
View File

@ -0,0 +1 @@
example/node_modules/

3
.prettierrc Normal file
View File

@ -0,0 +1,3 @@
{
"singleQuote": true
}

View File

@ -8,11 +8,11 @@
"main": "index.js",
"scripts": {
"precommit": "lint-staged",
"prettier": "prettier --single-quote --write '{,!(node_modules)/**/}*.js'"
"prettier": "prettier --write '**/*.js'"
},
"lint-staged": {
"{,!(node_modules)/**/}*.js": [
"prettier --single-quote --write",
"**/*.js": [
"prettier --write",
"git add"
]
},