eslint.config.ts
1,055 bytes
| 1 | import { globalIgnores } from 'eslint/config' |
|---|---|
| 2 | import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript' |
| 3 | import pluginVue from 'eslint-plugin-vue' |
| 4 | import pluginVitest from '@vitest/eslint-plugin' |
| 5 | import pluginOxlint from 'eslint-plugin-oxlint' |
| 6 | import skipFormatting from 'eslint-config-prettier/flat' |
| 7 | |
| 8 | // To allow more languages other than `ts` in `.vue` files, uncomment the following lines: |
| 9 | // import { configureVueProject } from '@vue/eslint-config-typescript' |
| 10 | // configureVueProject({ scriptLangs: ['ts', 'tsx'] }) |
| 11 | // More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup |
| 12 | |
| 13 | export default defineConfigWithVueTs( |
| 14 | { |
| 15 | name: 'app/files-to-lint', |
| 16 | files: ['**/*.{vue,ts,mts,tsx}'], |
| 17 | }, |
| 18 | |
| 19 | globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']), |
| 20 | |
| 21 | ...pluginVue.configs['flat/essential'], |
| 22 | vueTsConfigs.recommended, |
| 23 | |
| 24 | { |
| 25 | ...pluginVitest.configs.recommended, |
| 26 | files: ['src/**/__tests__/*'], |
| 27 | }, |
| 28 | |
| 29 | ...pluginOxlint.buildFromOxlintConfigFile('.oxlintrc.json'), |
| 30 | |
| 31 | skipFormatting, |
| 32 | ) |
| 33 | |