Commit 526e9056 by Jaxon

style: monorepo仓库使用lintstage来校验.该插件会仅对git提交的文件进行校验.适合老项目

1 parent 0b9f2f16
export default {
"*.{js,ts,tsx,jsx,vue}": [ "prettier --write", "eslint --fix" ],
"*.{md,json,css,less,scss}": [ "prettier --write" ],
"*.{js,jsx,ts,tsx,vue,md}": "pnpm eslint --cache --fix",
"package.json": "pnpm eslint --cache --fix",
"{!(package)*.json,*.code-snippets,.!(browserslist)*rc}": "pnpm eslint --cache --fix",
"*.{scss,less,styl,html,vue,css,wxss}":"pnpm stylelint --fix --allow-empty-input",
};
......@@ -252,9 +252,7 @@
"oxc.enable": false,
"cSpell.words": ["archiver", "axios", "dotenv", "isequal", "jspm", "napi", "nolebase", "rollup", "vitest"],
// 语言特定配置 - LESS 注释
"[less]": {
"editor.comments.lineComment": "//",
"editor.comments.blockComment": ["/*", "*/"]
"[yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
......@@ -31,7 +31,6 @@
"axios-adapter-uniapp": "^0.1.4",
"axios-miniprogram-adapter": "^0.3.5",
"crypto-js": "^4.2.0",
"lib": "file:../lib",
"pinyin-pro": "^3.27.0",
"uview-plus": "^3.6.4",
"vue": "3.4.21",
......
......@@ -46,24 +46,8 @@ pre-commit:
commands:
code-workspace:
run: pnpm vsh code-workspace --auto-commit
lint-md:
run: pnpm eslint --cache --fix {staged_files}
glob: "*.md"
lint-vue:
glob: "*.vue"
run: pnpm eslint --cache --fix {staged_files}
lint-js:
run: pnpm eslint --cache --fix {staged_files}
glob: "*.{js,jsx,ts,tsx}"
lint-style:
run: pnpm stylelint --fix --allow-empty-input {staged_files}
glob: "*.{scss,less,styl,html,vue,css,wxss}"
lint-package:
run: pnpm eslint --cache --fix {staged_files}
glob: "package.json"
lint-json:
run: pnpm eslint --cache --fix {staged_files}
glob: "{!(package)*.json,*.code-snippets,.!(browserslist)*rc}"
lint-staged:
run: pnpm lint-staged
post-merge:
commands:
......
......@@ -79,6 +79,7 @@
"happy-dom": "catalog:",
"husky": "^9.1.7",
"lefthook": "catalog:",
"lint-staged": "^16.2.7",
"playwright": "catalog:",
"rimraf": "catalog:",
"rollup": "catalog:",
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!