Skip to content

Commit

Permalink
chore: add lint-staged for running the lint & test scripts (#1349)
Browse files Browse the repository at this point in the history
* chore(husky): add `pre-push` hook

* feat: add `lint-staged` for running scripts

* style: fix lint issue

* chore: remove lint-staged as devDep

* fix: remove pre-push hook

Signed-off-by: Vinayak Kulkarni <[email protected]>
  • Loading branch information
vinayakkulkarni authored Apr 25, 2022
1 parent ae369b2 commit 615f617
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm run lint
npm run test
npx --no-install lint-staged
3 changes: 3 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
'*.{js,ts}': 'npm run lint && npm test'
}

0 comments on commit 615f617

Please sign in to comment.