Skip to content

Commit

Permalink
Added lint-staged and husky for linting on commit
Browse files Browse the repository at this point in the history
  • Loading branch information
codemonkey800 committed Apr 9, 2021
1 parent 12e35b3 commit 08e289c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
5 changes: 5 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

cd client
node_modules/.bin/lint-staged
6 changes: 6 additions & 0 deletions client/.lintstagedrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
'*.{js,ts,tsx,scss,md,yml,yaml,json}':
- prettier --write
'*.{js,ts,tsx}':
- eslint --fix
'*.scss':
- stylelint --fix
1 change: 1 addition & 0 deletions client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"e2e": "jest -c jest/e2e.config.js",
"e2e:watch": "pnpm e2e -- --watch",
"e2e:update": "pnpm e2e -- --updateSnapshot",
"postinstall": "cd .. && husky install",
"start": "next start -p 8080",
"test": "jest -c jest/test.config.js",
"test:watch": "pnpm jest -- --watch",
Expand Down

0 comments on commit 08e289c

Please sign in to comment.