(feat) add husky + precommit hooks

This commit is contained in:
Cory Dransfeldt 2023-03-25 11:56:58 -07:00
parent 3eecb6e406
commit d1d845326d
No known key found for this signature in database
4 changed files with 1217 additions and 14 deletions

View file

@ -8,7 +8,8 @@
"debug": "DEBUG=Eleventy* npx @11ty/eleventy --serve & npx tailwindcss -i ./tailwind.css -o _site/assets/styles/tailwind.css --watch",
"lint": "eslint .",
"lint:fix": "eslint . --fix",
"build": "rm -rf .cache && ELEVENTY_PRODUCTION=true eleventy && NODE_ENV=production npx tailwindcss -i ./tailwind.css -c ./tailwind.config.js -o _site/assets/styles/tailwind.css"
"build": "rm -rf .cache && ELEVENTY_PRODUCTION=true eleventy && NODE_ENV=production npx tailwindcss -i ./tailwind.css -c ./tailwind.config.js -o _site/assets/styles/tailwind.css",
"prepare": "husky install"
},
"keywords": [],
"author": "Cory Dransfeldt",
@ -24,18 +25,22 @@
"postcss": "^8.4.5",
"prettier": "^2.8.7",
"prettier-plugin-tailwindcss": "^0.2.5",
"sanitize-html": "^2.10.0"
"sanitize-html": "^2.10.0",
"husky": "^8.0.0"
},
"dependencies": {
"@11ty/eleventy-activity-feed": "^1.0.9",
"@11ty/eleventy-fetch": "^4.0.0",
"@11ty/eleventy-img": "^3.0.0",
"@extractus/feed-extractor": "^6.2.1",
"@funboxteam/markdown-lint": "^2.0.1",
"@sherby/eleventy-plugin-files-minifier": "^1.1.1",
"@tailwindcss/typography": "^0.5.1",
"autoprefixer": "^10.4.2",
"dotenv-flow": "^3.2.0",
"eleventy-plugin-unfurl": "^1.0.0",
"husky": "^8.0.3",
"lint-staged": "^13.2.0",
"liquidjs": "^10.7.0",
"markdown-it": "^13.0.1",
"markdown-it-anchor": "^8.4.1",
@ -43,5 +48,14 @@
"marked": "^4.3.0",
"tailwind-dracula": "^1.1.0",
"tailwindcss": "^3.0.18"
},
"lint-staged":{
"**/*.{js,jsx,ts,tsx}":[
"npx prettier --write",
"npx eslint --fix"
],
"*.md": [
"markdown-lint --fix --typograph"
]
}
}