Skip to content

Commit

Permalink
ci: add husky and commitlint (#550)
Browse files Browse the repository at this point in the history
Co-authored-by: PacificYield <[email protected]>
  • Loading branch information
poppyseedDev and PacificYield authored Nov 29, 2024
1 parent a316ad4 commit bc50734
Show file tree
Hide file tree
Showing 6 changed files with 880 additions and 12 deletions.
1 change: 1 addition & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npx --no-install commitlint --edit
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
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"]
}
14 changes: 14 additions & 0 deletions commitlint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import type { UserConfig } from '@commitlint/types';

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

export default Configuration;
Loading

0 comments on commit bc50734

Please sign in to comment.