Skip to content

Commit

Permalink
Add husky, lint-staged, and a pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
tvanantwerp committed Oct 7, 2022
1 parent 7fa2566 commit 5225667
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions starters/remix-gql-tailwind/.husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

cd remix-gql-tailwind
npx lint-staged
10 changes: 9 additions & 1 deletion starters/remix-gql-tailwind/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"start": "remix-serve build",
"test": "jest",
"storybook": "concurrently -n css,storybook -c cyan,magenta \"npm run dev:css\" \"start-storybook -p 6006\"",
"build-storybook": "build-storybook"
"build-storybook": "build-storybook",
"prepare": "husky install"
},
"dependencies": {
"@remix-run/node": "1.6.1",
Expand Down Expand Up @@ -49,7 +50,9 @@
"eslint": "8.9.0",
"eslint-plugin-storybook": "0.5.7",
"eslint-plugin-unused-imports": "2.0.0",
"husky": "^8.0.0",
"jest": "27.5.1",
"lint-staged": "^13.0.3",
"postcss": "8.4.8",
"postcss-cli": "9.1.0",
"prettier": "2.5.1",
Expand All @@ -59,6 +62,11 @@
"typescript": "4.6.2",
"vite": "2.8.6"
},
"lint-staged": {
"app/**/*.+(js|mjs|ts|tsx|css|md|yml)": [
"prettier --write"
]
},
"engines": {
"node": ">=14"
},
Expand Down

0 comments on commit 5225667

Please sign in to comment.