chore: 更新 lint 配置和忽略文件
- 添加 .eslintignore 文件并配置忽略规则 - 更新 .oxlintrc.json 的 ignorePatterns 配置 - 简化 package.json 中的 lint 命令 - 调整 .vscode/settings.json 的文件关联
This commit is contained in:
parent
24622137c8
commit
a79e59cdf3
4
.eslintignore
Normal file
4
.eslintignore
Normal file
@ -0,0 +1,4 @@
|
||||
vite.config.ts
|
||||
uno.config.ts
|
||||
pages.config.ts
|
||||
manifest.config.ts
|
@ -12,7 +12,7 @@
|
||||
"globals": {
|
||||
"foo": "readonly"
|
||||
},
|
||||
"ignorePatterns": ["src/static/**", "src/uni_modules/**"],
|
||||
"ignorePatterns": ["node_modules", "dist", "src/static/**", "src/uni_modules/**"],
|
||||
"settings": {},
|
||||
"overrides": [
|
||||
{
|
||||
|
2
.vscode/settings.json
vendored
2
.vscode/settings.json
vendored
@ -60,6 +60,6 @@
|
||||
"README.md": "index.html,favicon.ico,robots.txt,CHANGELOG.md",
|
||||
"pages.config.ts": "manifest.config.ts,openapi-ts-request.config.ts",
|
||||
"package.json": "pnpm-lock.yaml,pnpm-workspace.yaml,LICENSE,.gitattributes,.gitignore,.gitpod.yml,CNAME,.npmrc,.browserslistrc",
|
||||
"tsconfig.json": ".commitlintrc.*,.prettier*,.editorconfig,.commitlint.cjs"
|
||||
".oxlintrc.json": "tsconfig.json,.commitlintrc.*,.prettier*,.editorconfig,.commitlint.cjs,.eslint*"
|
||||
}
|
||||
}
|
||||
|
@ -71,8 +71,8 @@
|
||||
"type-check": "vue-tsc --noEmit",
|
||||
"openapi-ts-request": "openapi-ts",
|
||||
"prepare": "git init && husky",
|
||||
"lint:oxlint": "oxlint src/**/*.{ts,js,vue}",
|
||||
"lint:oxlint-fix": "oxlint --fix src/**/*.{ts,js,vue}"
|
||||
"lint": "oxlint",
|
||||
"lint-fix": "oxlint --fix"
|
||||
},
|
||||
"lint-staged": {
|
||||
"**/*.{html,cjs,json,md,scss,css,txt}": [
|
||||
|
@ -37,6 +37,12 @@ const toSubPage = () => {
|
||||
url: '/pages-sub/demo/index',
|
||||
})
|
||||
}
|
||||
|
||||
// 奇怪:同样的代码放在 vue 里面不会校验到错误,放在 .ts 文件里面会校验到错误
|
||||
// const testOxlint = (name: string) => {
|
||||
// console.log('oxlint')
|
||||
// }
|
||||
// testOxlint('oxlint')
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
Loading…
x
Reference in New Issue
Block a user