import skipFormatting from '@vue/eslint-config-prettier/skip-formatting' import { configureVueProject, defineConfigWithVueTs, vueTsConfigs, } from '@vue/eslint-config-typescript' import { globalIgnores } from 'eslint/config' import simpleImportSort from 'eslint-plugin-simple-import-sort' import pluginVue from 'eslint-plugin-vue' configureVueProject({ scriptLangs: ['ts', 'tsx'] }) export default defineConfigWithVueTs( { name: 'app/files-to-lint', files: ['**/*.{js,mjs,cjs,ts,mts,tsx,vue}'], }, { name: 'app/linter-options', linterOptions: { reportUnusedDisableDirectives: false, }, }, globalIgnores([ '**/dist/**', '**/dist-ssr/**', '**/coverage/**', '**/node_modules/**', '**/.rsbuild/**', '**/.rspack_cache/**', '**/.cache/**', '**/public/**', '**/.github/**', '**/.husky/**', '**/.vscode/**', '**/.idea/**', '**/code-style/**', '**/docs/**', '**/bin/**', '**/src/mock/**', '**/*.md', '**/*.woff', '**/*.ttf', '**/Dockerfile', '**/commitlint.config.js', ]), pluginVue.configs['flat/essential'], vueTsConfigs.recommended, skipFormatting, { name: 'app/rules', plugins: { 'simple-import-sort': simpleImportSort, }, rules: { '@typescript-eslint/ban-ts-comment': 'off', '@typescript-eslint/no-empty-object-type': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-require-imports': 'off', '@typescript-eslint/no-this-alias': 'off', '@typescript-eslint/no-unused-expressions': 'off', '@typescript-eslint/no-unused-vars': 'off', '@typescript-eslint/no-unsafe-function-type': 'off', 'no-async-promise-executor': 'off', 'no-unused-vars': 'off', 'prefer-const': 'off', 'simple-import-sort/exports': 'warn', 'simple-import-sort/imports': [ 'warn', { groups: [['^\\u0000'], ['^node:'], ['^@?\\w'], ['^@/'], ['^\\.']], }, ], 'vue/attributes-order': [ 'warn', { alphabetical: false, order: [ 'DEFINITION', 'LIST_RENDERING', 'CONDITIONALS', 'RENDER_MODIFIERS', 'GLOBAL', ['UNIQUE', 'SLOT'], 'TWO_WAY_BINDING', 'OTHER_DIRECTIVES', 'OTHER_ATTR', 'EVENTS', 'CONTENT', ], }, ], 'vue/multi-word-component-names': 'off', 'vue/no-dupe-keys': 'warn', 'vue/no-undef-properties': 'error', 'vue/no-unused-properties': 'warn', }, }, )