Skip to content

Commit

Permalink
Setup lint-staged and husky
Browse files Browse the repository at this point in the history
  • Loading branch information
hirasso committed Mar 25, 2024
1 parent 1827526 commit 1d8daaa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx lint-staged
4 changes: 4 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export default {
// @see https://github.com/lint-staged/lint-staged?tab=readme-ov-file#reuse-npm-script
'**/*.{js,jsx,mjs,cjs,ts,mts,css,scss,md}': ['npm run format --']
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"src"
],
"scripts": {
"prepare": "husky",
"build": "swup package:build",
"dev": "swup package:dev",
"lint": "swup package:lint",
Expand Down

0 comments on commit 1d8daaa

Please sign in to comment.