Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
chore: precommit configs
Browse files Browse the repository at this point in the history
  • Loading branch information
niloofar-deriv committed Oct 16, 2023
1 parent 82cda93 commit 2a6bd99
Show file tree
Hide file tree
Showing 6 changed files with 2,428 additions and 50 deletions.
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx --no -- commitlint --edit ${1}
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"

npx lint-staged --concurrent false --relative
13 changes: 13 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
export default {
extends: ['@commitlint/config-conventional'],
rules: {
'body-max-line-length': [0, 'never', 'Infinity'],
'subject-case': [0, 'never', 'sentence-case'],
'footer-max-line-length': [0, 'never', 'Infinity'],
'type-enum': [
2,
'always',
['feat', 'fix', 'docs', 'style', 'refactor', 'perf', 'test', 'build', 'ci', 'chore', 'revert'],
],
},
};
3 changes: 3 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default {
'{apps,libs}/**/*.{js,ts,jsx,tsx,json}': [files => `nx affected:lint --files=${files.join(',')} --parallel`],
};
Loading

0 comments on commit 2a6bd99

Please sign in to comment.