feat: 添加 eslint-plugin-unicorn 依赖,更新 ESLint 配置以支持新规则
This commit is contained in:
@ -4,6 +4,7 @@ import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescri
|
||||
import pluginImport from 'eslint-plugin-import-x';
|
||||
import oxlint from 'eslint-plugin-oxlint';
|
||||
import perfectionist from 'eslint-plugin-perfectionist';
|
||||
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
|
||||
import pluginVue from 'eslint-plugin-vue';
|
||||
import path from 'node:path';
|
||||
import { fileURLToPath } from 'node:url';
|
||||
@ -20,6 +21,7 @@ configureVueProject({ scriptLangs: ['ts', 'tsx', 'js', 'jsx'] });
|
||||
|
||||
export default defineConfigWithVueTs(
|
||||
includeIgnoreFile(gitignorePath), // oxlint . --fix -D correctness --ignore-path .gitignore
|
||||
{ ignores: ['typed-router.d.ts'] },
|
||||
{
|
||||
files: ['**/*.{ts,mts,tsx,vue}'],
|
||||
name: 'app/files-to-lint',
|
||||
@ -33,6 +35,17 @@ export default defineConfigWithVueTs(
|
||||
pluginVue.configs['flat/essential'],
|
||||
vueTsConfigs.recommended,
|
||||
|
||||
eslintPluginUnicorn.configs.recommended,
|
||||
{
|
||||
rules: {
|
||||
'unicorn/filename-case': 'off',
|
||||
'unicorn/no-console-spaces': 'off',
|
||||
'unicorn/no-null': 'off',
|
||||
'unicorn/no-useless-spread': 'off',
|
||||
'unicorn/prevent-abbreviations': 'off',
|
||||
},
|
||||
},
|
||||
|
||||
// {
|
||||
// ...pluginVitest.configs.recommended,
|
||||
// files: ['src/**/__tests__/*'],
|
||||
|
Reference in New Issue
Block a user