Skip to content

Commit

Permalink
chore: Add husky and lint-staged
Browse files Browse the repository at this point in the history
For auto-running of lint job on staged files and prevent commits with lint issues
  • Loading branch information
one-aalam committed Jul 12, 2021
1 parent 856878f commit fb36039
Show file tree
Hide file tree
Showing 3 changed files with 723 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
dist
.env
idea
16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,27 @@
"eslint": "^7.30.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^3.4.0",
"husky": "^7.0.1",
"lint-staged": "^11.0.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.3.2",
"ts-node-dev": "^1.1.8",
"typescript": "^4.3.5"
},
"dependencies": {
"dotenv": "^10.0.0"
},
"husky": {
"hooks": {
"pre-commit": "CI=1 npm-run-all --parallel type:check && lint-staged"
}
},
"lint-staged": {
"*.+(js|ts)": [
"yarn run lint"
],
"*.+(js|json|ts)": [
"yarn run format"
]
}
}
Loading

0 comments on commit fb36039

Please sign in to comment.