Skip to content

Commit

Permalink
ci: adding a pre-commit with npx lint-staged
Browse files Browse the repository at this point in the history
  • Loading branch information
poppyseedDev committed Oct 4, 2024
1 parent 7d7ceba commit 59fac0c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npm run prettier
3 changes: 3 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*.{js,json,md,sol,ts,yml}": ["npm run prettier -- --write", "git add"]
}
11 changes: 5 additions & 6 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [2, 'always', ['ci', 'chore', 'docs', 'ticket', 'feat', 'fix', 'perf', 'refactor', 'revert', 'style']],
},
};

extends: ["@commitlint/config-conventional"],
rules: {
"type-enum": [2, "always", ["ci", "chore", "docs", "ticket", "feat", "fix", "perf", "refactor", "revert", "style"]],
},
};

0 comments on commit 59fac0c

Please sign in to comment.