| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- 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',
- },
- },
- )
|