Skip to content

Commit

Permalink
ci: treat warnings as errors if they exceed a maximum number of 10 #9
Browse files Browse the repository at this point in the history
  • Loading branch information
olavis committed Feb 7, 2023
1 parent fcdc9f6 commit 939f03c
Show file tree
Hide file tree
Showing 3 changed files with 269 additions and 9 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
- name: run CI
run: |
yarn install
yarn lint
yarn lint-staged
yarn test
yarn build
yarn build
env:
CI: false
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@
"eject": "react-scripts eject",
"lint": "eslint --fix --ext .ts,.tsx .",
"prepare": "husky install",
"pre-commit": "yarn test --watchAll=false && yarn lint"
"pre-commit": "yarn test --watchAll=false && yarn lint-staged"
},
"lint-staged": {
"*.{ts,tsx}": "yarn lint --max-warnings 10"
},
"browserslist": {
"production": [
Expand All @@ -47,6 +50,7 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.31.10",
"husky": "^8.0.0",
"lint-staged": "^13.1.0",
"prettier": "^2.8.2"
}
}
Loading

0 comments on commit 939f03c

Please sign in to comment.