Skip to content

Commit

Permalink
Add lint, format and check scripts + prettier stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
denniskigen committed Mar 28, 2021
1 parent d711a20 commit ab4b4e0
Show file tree
Hide file tree
Showing 15 changed files with 682 additions and 672 deletions.
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
build
coverage
public
5 changes: 4 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
{
"trailingCommas": "es5"
"endOfLine": "lf",
"printWidth": 80,
"tabWidth": 2,
"trailingComma": "es5"
}
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
"test": "react-scripts test",
"test:non-watch": "react-scripts test --watchAll=false",
"coverage": "react-scripts test --coverage --watchAll=false",
"eject": "react-scripts eject"
"eject": "react-scripts eject",
"lint": "eslint . --cache-location node_modules/.cache/eslint",
"format": "prettier --write \"**/*.+(js|json|css|html)\"",
"check": "prettier --check \"**/*.+(js|json|css|html)\""
},
"eslintConfig": {
"extends": "react-app"
Expand Down Expand Up @@ -49,7 +52,7 @@
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged && npm run test:non-watch"
"pre-commit": "pretty-quick --staged && npm run format && npm run check && npm run test:non-watch"
}
},
"jest": {
Expand Down
Loading

1 comment on commit ab4b4e0

@vercel
Copy link

@vercel vercel bot commented on ab4b4e0 Mar 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.