Skip to content

Commit

Permalink
refactor: add lint-staged and tests run to git-hooks (apertureless#731)
Browse files Browse the repository at this point in the history
* refactor: add lint-staget and tests run to git-hooks

* refactor: add lint-staged for .ts and .vue files

* refactor: add commit message git hook
  • Loading branch information
thabarbados authored Dec 7, 2021
1 parent 8c7a7c5 commit ba4d6d6
Show file tree
Hide file tree
Showing 4 changed files with 281 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"*.js": ["eslint", "prettier --write"],
"*.vue": ["eslint", "prettier --write"],
"*.ts": ["eslint", "prettier --write"]
}
5 changes: 5 additions & 0 deletions .simple-git-hooks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"commit-msg": "yarn commitlint --edit \"$1\"",
"pre-commit": "yarn lint-staged",
"pre-push": "yarn test"
}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
"karma-sourcemap-loader": "^0.3.7",
"karma-spec-reporter": "0.0.30",
"karma-webpack": "2",
"lint-staged": "^12.1.2",
"lolex": "^1.6.0",
"mocha": "^3.1.0",
"opn": "^5.1.0",
Expand All @@ -124,6 +125,7 @@
"portfinder": "^1.0.13",
"selenium-server": "^3.3.1",
"shelljs": "^0.7.7",
"simple-git-hooks": "^2.7.0",
"sinon": "^2.1.0",
"sinon-chai": "^2.9.0",
"standard-version": "^9.3.2",
Expand Down
Loading

0 comments on commit ba4d6d6

Please sign in to comment.