feat: 添加 oxlint 配置文件并更新 lint 脚本
Some checks failed
/ build-and-deploy-to-vercel (push) Successful in 2m53s
/ lint-build-and-check (push) Successful in 4m15s
/ playwright (push) Failing after 6m44s
/ surge (push) Successful in 2m53s

This commit is contained in:
mini2024
2025-03-31 01:41:17 +08:00
parent 3adafb58d5
commit 5ba87212b9
3 changed files with 11 additions and 2 deletions

8
.oxlintrc.json Normal file
View File

@ -0,0 +1,8 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
// https://oxc.rs/docs/guide/usage/linter/rules/unicorn/no-new-array.html
// "rules": {
// "unicorn/no-new-array": "warn"
// },
"ignorePatterns": ["src/shadcn/**", "src/components/InspiraUI/**"]
}

View File

@ -20,7 +20,6 @@ configureVueProject({ scriptLangs: ['ts', 'tsx', 'js', 'jsx'] });
export default defineConfigWithVueTs(
includeIgnoreFile(path.resolve(__dirname, '.gitignore')),
// npx oxlint . --fix -D correctness --ignore-pattern '/src/components/InspiraUI/*'
{ ignores: ['typed-router.d.ts', 'src/shadcn/**', 'src/components/InspiraUI/**'] },
{

View File

@ -12,7 +12,9 @@
"format": "prettier --write src/",
"type-check": "vue-tsc --build",
"lint": "run-s lint:*",
"_lint:oxlint": "oxlint . --fix -D correctness --ignore-path .gitignore",
"_oxlint_cfg": "oxlint . --fix --ignore-path=.gitignore --print-config",
"__oxlint_-D": "oxlint . --fix --deny=correctness",
"lint:oxlint": "oxlint . --fix",
"lint:eslint": "eslint . --fix",
"prepare": "husky",
"playwright": "playwright test",