Skip to content

Commit ee1333c

Browse files
o-k-a-yPazaz
andauthored
chore: lint staged files (2004Scape#425)
* chore: add husky pre-commit hook to lint staged files * chore: add conventional commit linting * chore: add script to output todo comments and output on staged files on commit * chore: sort staged package.json changes on commit --------- Co-authored-by: Pazaz <[email protected]>
1 parent b040db3 commit ee1333c

File tree

5 files changed

+5873
-3874
lines changed

5 files changed

+5873
-3874
lines changed

.husky/commit-msg

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no -- @commitlint/cli --edit $1

.husky/pre-commit

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged --verbose

commitlint.config.ts

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { RuleConfigSeverity, type UserConfig } from '@commitlint/types';
2+
3+
/**
4+
* https://commitlint.js.org/reference/configuration.html
5+
*/
6+
const Configuration: UserConfig = {
7+
extends: ['@commitlint/config-conventional'],
8+
formatter: '@commitlint/format',
9+
rules: {
10+
'subject-case': [RuleConfigSeverity.Disabled, 'always', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
11+
}
12+
};
13+
14+
export default Configuration;

0 commit comments

Comments
 (0)