diff --git a/starters/remix-gql-tailwind/.husky/pre-commit b/starters/remix-gql-tailwind/.husky/pre-commit new file mode 100644 index 000000000..ecb4e0003 --- /dev/null +++ b/starters/remix-gql-tailwind/.husky/pre-commit @@ -0,0 +1,5 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +cd remix-gql-tailwind +npx lint-staged diff --git a/starters/remix-gql-tailwind/package.json b/starters/remix-gql-tailwind/package.json index 66a67f55b..bd3bc9fc2 100644 --- a/starters/remix-gql-tailwind/package.json +++ b/starters/remix-gql-tailwind/package.json @@ -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", @@ -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", @@ -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" },