fix:添加代码的git提交规范
This commit is contained in:
13
lint-staged.config.cjs
Normal file
13
lint-staged.config.cjs
Normal file
@@ -0,0 +1,13 @@
|
||||
module.exports = {
|
||||
// 对所有JavaScript和TypeScript文件执行ESLint检查并自动修复
|
||||
'*.{js,jsx,ts,tsx}': ['prettier --write'],
|
||||
|
||||
// 对样式文件执行Prettier格式化和StyleLint检查
|
||||
'*.{css,scss,less}': ['stylelint --fix', 'prettier --write'],
|
||||
|
||||
// 对JSON、MD等文件执行Prettier格式化
|
||||
'*.{json,md,yml,yaml}': ['prettier --write'],
|
||||
|
||||
// 对Vue文件同时进行ESLint和Prettier处理
|
||||
'*.vue': ['prettier --write']
|
||||
}
|
||||
Reference in New Issue
Block a user