|
| 1 | +import pluginVue from 'eslint-plugin-vue' |
| 2 | +import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript' |
| 3 | +import pluginVitest from '@vitest/eslint-plugin' |
| 4 | +// eslint-disable-next-line @typescript-eslint/ban-ts-comment |
| 5 | +// @ts-ignore |
| 6 | +import pluginCypress from 'eslint-plugin-cypress/flat' |
| 7 | +import skipFormatting from '@vue/eslint-config-prettier/skip-formatting' |
| 8 | + |
| 9 | +// To allow more languages other than `ts` in `.vue` files, uncomment the following lines: |
| 10 | +// import { configureVueProject } from '@vue/eslint-config-typescript' |
| 11 | +// configureVueProject({ scriptLangs: ['ts', 'tsx'] }) |
| 12 | +// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup |
| 13 | + |
| 14 | +export default defineConfigWithVueTs( |
| 15 | + { |
| 16 | + name: 'app/files-to-lint', |
| 17 | + files: ['**/*.{ts,mts,tsx,vue}'], |
| 18 | + }, |
| 19 | + |
| 20 | + { |
| 21 | + name: 'app/files-to-ignore', |
| 22 | + ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'], |
| 23 | + }, |
| 24 | + |
| 25 | + pluginVue.configs['flat/essential'], |
| 26 | + vueTsConfigs.recommended, |
| 27 | + |
| 28 | + { |
| 29 | + ...pluginVitest.configs.recommended, |
| 30 | + files: ['src/**/__tests__/*'], |
| 31 | + }, |
| 32 | + |
| 33 | + { |
| 34 | + ...pluginCypress.configs.recommended, |
| 35 | + files: [ |
| 36 | + 'cypress/e2e/**/*.{cy,spec}.{js,ts,jsx,tsx}', |
| 37 | + 'cypress/support/**/*.{js,ts,jsx,tsx}' |
| 38 | + ], |
| 39 | + }, |
| 40 | + skipFormatting, |
| 41 | +) |
0 commit comments