chore: configure lint-staged and commitlint

This commit is contained in:
张翔
2026-03-24 13:30:03 +08:00
parent 34167c11d5
commit 99f9267bca
5 changed files with 34 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
npx --no -- commitlint --edit $1
+1
View File
@@ -0,0 +1 @@
npx lint-staged
+8
View File
@@ -0,0 +1,8 @@
{
"*.{js,jsx,ts,tsx}": [
"eslint --fix"
],
"*.{json,md}": [
"eslint --fix"
]
}
+23
View File
@@ -0,0 +1,23 @@
module.exports = {
extends: ['@commitlint/config-conventional'],
rules: {
'type-enum': [
2,
'always',
[
'feat',
'fix',
'docs',
'style',
'refactor',
'perf',
'test',
'chore',
'revert',
'build',
'ci'
]
],
'subject-case': [0]
}
};
+1
View File
@@ -0,0 +1 @@
console.log('test');