Skip to content

Commit

Permalink
build(lint): use lint-staged to auto fix and add lint issues on commit
Browse files Browse the repository at this point in the history
  • Loading branch information
ttshivers committed Aug 30, 2020
1 parent ba6dd8b commit 20d174d
Show file tree
Hide file tree
Showing 5 changed files with 718 additions and 50 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ Dockerfile
.releaserc
.editorconfig
.commitlintrc.js
.huskyrc
.huskyrc
.lintstagedrc
2 changes: 1 addition & 1 deletion .huskyrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"hooks": {
"pre-commit": "npm run lint",
"pre-commit": "lint-staged",
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
}
}
5 changes: 5 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"*.{js,jsx}": [
"npm run lint -- --fix",
]
}
Loading

0 comments on commit 20d174d

Please sign in to comment.