|
| 1 | +import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript' |
| 2 | +import pluginVue from 'eslint-plugin-vue' |
| 3 | +import skipFormatting from '@vue/eslint-config-prettier/skip-formatting' |
| 4 | +import importPlugin from "eslint-plugin-import" |
| 5 | + |
| 6 | +// To allow more languages other than `ts` in `.vue` files, uncomment the following lines: |
| 7 | +// import { configureVueProject } from '@vue/eslint-config-typescript' |
| 8 | +// configureVueProject({ scriptLangs: ['ts', 'tsx'] }) |
| 9 | +// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup |
| 10 | + |
| 11 | +export default defineConfigWithVueTs( |
| 12 | + { |
| 13 | + name: 'app/files-to-lint', |
| 14 | + files: ["app/frontend/**/*.{ts,mts,tsx,vue}"] |
| 15 | + }, |
| 16 | + { ignores: ["app/frontend/routes/*"] }, |
| 17 | + |
| 18 | + pluginVue.configs['flat/essential'], |
| 19 | + vueTsConfigs.recommended, |
| 20 | + { |
| 21 | + ...importPlugin.flatConfigs.recommended, |
| 22 | + ...importPlugin.flatConfigs.typescript, |
| 23 | + rules: { |
| 24 | + "import/order": [ |
| 25 | + "error", |
| 26 | + { |
| 27 | + pathGroups: [ |
| 28 | + { |
| 29 | + pattern: "@/**", |
| 30 | + group: "external", |
| 31 | + position: "after", |
| 32 | + }, |
| 33 | + ], |
| 34 | + "newlines-between": "always", |
| 35 | + "named": true, |
| 36 | + alphabetize: { order: "asc" }, |
| 37 | + }, |
| 38 | + ], |
| 39 | + "import/first": "error", |
| 40 | + "import/extensions": ["error", "never", { "svg": "always", "png": "always", "jpg": "always", "jpeg": "always", "gif": "always", "webp": "always" }], |
| 41 | + "@typescript-eslint/consistent-type-imports": "error", |
| 42 | + }, |
| 43 | + }, |
| 44 | + skipFormatting, |
| 45 | +) |
0 commit comments