Skip to content

Commit

Permalink
lint: use lint-staged for pre-commit hook, eslint everything for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgeorpinel committed Nov 6, 2019
1 parent 3576b22 commit 36874f9
Show file tree
Hide file tree
Showing 3 changed files with 503 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:

- run: yarn format-check

- run: yarn lint
- run: yarn lint-check

- save_cache:
paths:
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"start": "NODE_ENV=production node server.js",
"format-staged": "pretty-quick --staged --no-restage --bail",
"format-check": "pretty-quick --check --verbose",
"lint": "eslint src pages"
"lint-check": "eslint src pages"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -64,12 +64,16 @@
"eslint-plugin-react": "^7.14.3",
"husky": "^3.0.4",
"jest": "^24.9.0",
"lint-staged": "^10.0.0-1",
"prettier": "^1.18.2",
"pretty-quick": "^1.11.1"
},
"husky": {
"hooks": {
"pre-commit": "yarn format-staged && yarn lint"
"pre-commit": "yarn format-staged && lint-staged"
}
},
"lint-staged": {
"*.{js,jsx}": "eslint"
}
}
Loading

0 comments on commit 36874f9

Please sign in to comment.