ts// import prettierConfig from "@vue/eslint-config-prettier";
import skipFormatting from '@vue/eslint-config-prettier/skip-formatting'
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
import pluginVue from 'eslint-plugin-vue'
// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
// import { configureVueProject } from '@vue/eslint-config-typescript'
// configureVueProject({ scriptLangs: ['ts', 'tsx'] })
// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup
/**
* @description: 查看所有的配置(eslint-plugin-vue: https://eslint.vuejs.org/rules/
* @description: 查看所有的配置(typescript-eslint): https://typescript-eslint.io/rules/
*/
export default defineConfigWithVueTs(
{
files: ['**/*.{ts,mts,tsx,vue}'],
name: 'app/files-to-lint',
},
{
ignores: ['**/dist/**', '**/dist-ssr/**', '**/coverage/**'],
name: 'app/files-to-ignore',
},
pluginVue.configs['flat/essential'],
vueTsConfigs.stylisticTypeChecked,
vueTsConfigs.strictTypeChecked,
// prettierConfig, // Use Separate Commands for Linting and Formatting
skipFormatting,
)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30