Browse Source
* chore: update deps * chore: update archiver v8 * fix: 还原 vue/html-closing-bracket-newline * feat: 增加默认配置和配置注释 * feat: 增加oxlint默认插件配置和注释 * refactor: remove unicorn ESLint configuration and update dependencies - Deleted the unicorn ESLint configuration file from the lint-configs package. - Removed unicorn configuration from the main index file. - Updated oxlint-config to include a comprehensive set of unicorn rules. - Adjusted preferences and vxe-table files to disable specific unicorn rules. - Removed references to eslint-plugin-unicorn from pnpm-lock.yaml and pnpm-workspace.yaml. * refactor: 移除 eslint 的 @typescript-eslint/eslint-plugin 依赖,将 TypeScript 配置迁移到 oxlint * feat: open typeAware * fix: mac 和linux下报错pull/8070/head
committed by
GitHub
24 changed files with 978 additions and 860 deletions
@ -1,3 +1,10 @@ |
|||
{ |
|||
"extends": "./.nitro/types/tsconfig.json" |
|||
"$schema": "https://json.schemastore.org/tsconfig", |
|||
"extends": "@vben/tsconfig/node.json", |
|||
"compilerOptions": { |
|||
"paths": { |
|||
"~/*": ["./*"] |
|||
} |
|||
}, |
|||
"exclude": ["node_modules", "dist", ".nitro"] |
|||
} |
|||
|
|||
@ -1,44 +0,0 @@ |
|||
import type { Linter } from 'eslint'; |
|||
|
|||
import { interopDefault } from '../util'; |
|||
|
|||
const rulesCoveredByOxlint = new Set([ |
|||
'unicorn/consistent-function-scoping', |
|||
'unicorn/no-process-exit', |
|||
'unicorn/prefer-global-this', |
|||
'unicorn/prefer-module', |
|||
]); |
|||
|
|||
export async function unicorn(): Promise<Linter.Config[]> { |
|||
const pluginUnicorn = await interopDefault(import('eslint-plugin-unicorn')); |
|||
const recommendedRules = Object.fromEntries( |
|||
Object.entries(pluginUnicorn.configs.recommended.rules ?? {}).filter( |
|||
([ruleName]) => !rulesCoveredByOxlint.has(ruleName), |
|||
), |
|||
); |
|||
|
|||
return [ |
|||
{ |
|||
plugins: { |
|||
unicorn: pluginUnicorn, |
|||
}, |
|||
rules: { |
|||
...recommendedRules, |
|||
|
|||
'unicorn/better-regex': 'off', |
|||
'unicorn/consistent-destructuring': 'off', |
|||
'unicorn/expiring-todo-comments': 'off', |
|||
'unicorn/filename-case': 'off', |
|||
'unicorn/import-style': 'off', |
|||
'unicorn/no-array-for-each': 'off', |
|||
'unicorn/no-null': 'off', |
|||
'unicorn/no-useless-undefined': 'off', |
|||
'unicorn/prefer-at': 'off', |
|||
'unicorn/prefer-dom-node-text-content': 'off', |
|||
'unicorn/prefer-export-from': ['error', { ignoreUsedVariables: true }], |
|||
'unicorn/prefer-top-level-await': 'off', |
|||
'unicorn/prevent-abbreviations': 'off', |
|||
}, |
|||
}, |
|||
]; |
|||
} |
|||
@ -1,7 +1,24 @@ |
|||
import type { OxlintConfig } from 'oxlint'; |
|||
|
|||
const plugins: OxlintConfig = { |
|||
plugins: ['import', 'node', 'oxc', 'typescript', 'unicorn', 'vitest', 'vue'], |
|||
/** |
|||
* oxlint 支持的插件,将默认开启的也显示配置 |
|||
* type: eslint | react | unicorn | typescript | oxc | |
|||
* import | jsdoc | jest | vitest | jsx-a11y | nextjs | |
|||
* react-perf | promise | node | vue |
|||
* |
|||
* Default: eslint,typescript,unicorn,oxc |
|||
*/ |
|||
plugins: [ |
|||
'eslint', |
|||
'import', |
|||
'node', |
|||
'oxc', |
|||
'typescript', |
|||
'unicorn', |
|||
'vitest', |
|||
'vue', |
|||
], |
|||
}; |
|||
|
|||
export { plugins }; |
|||
|
|||
File diff suppressed because it is too large
Loading…
Reference in new issue