Skip to content

Commit

Permalink
Add config files for prettier: package install of prettier + husky + …
Browse files Browse the repository at this point in the history
…lint-staged, add prettierignore, and add prettier commit hooks
  • Loading branch information
ibrand committed Aug 5, 2019
1 parent 04173b8 commit a6406cb
Show file tree
Hide file tree
Showing 3 changed files with 517 additions and 13 deletions.
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
19 changes: 18 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,12 @@
"eslint-plugin-react": "^5.2.2",
"fakeredis": "^2.0.0",
"foreman": "^1.4.1",
"husky": "^3.0.1",
"json2csv": "^3.6.2",
"lint-staged": "^9.2.0",
"mockdate": "^2.0.2",
"nodemon": "^1.9.2",
"prettier": "1.13.6",
"prettier": "^1.18.2",
"react-hot-loader": "^1.3.0",
"react-scripts": "^2.1.3",
"react-test-renderer": "15",
Expand All @@ -177,5 +179,20 @@
"sqlite3": "^4.0.0",
"wait-on": "^2.1.0",
"webpack-dev-server": "^2.9.4"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.{js,css,json,md}": [
"prettier --write",
"git add"
],
"*.{js,jsx}": [
"eslint --fix",
"git add"
]
}
}
Loading

0 comments on commit a6406cb

Please sign in to comment.