diff --git a/configs/typescript.js b/configs/typescript.js index ea6df75..a33c312 100644 --- a/configs/typescript.js +++ b/configs/typescript.js @@ -12,6 +12,12 @@ export default defineConfig(options => { ...tseslint.configs.recommended, ...tseslint.configs.stylistic, ), + ...overrides( + tseslint.config(...tseslint.configs.stylisticTypeChecked), + { + files: [mixed ? GLOB_TS : GLOB_ALL], + }, + ), { languageOptions: { parserOptions: { @@ -110,12 +116,6 @@ export default defineConfig(options => { }, }, ...stylisticTs(), - ...overrides( - tseslint.config(...tseslint.configs.stylisticTypeChecked), - { - files: [mixed ? GLOB_TS : GLOB_ALL], - }, - ), { files: [mixed ? GLOB_TS : GLOB_ALL], plugins: { diff --git a/configs/vue.js b/configs/vue.js index 0130662..56ef6e2 100644 --- a/configs/vue.js +++ b/configs/vue.js @@ -119,8 +119,10 @@ export default defineConfig(options => { ...(options.jsx ? [ { files: [GLOB_VUE], - parserOptions: { - project: null, + languageOptions: { + parserOptions: { + project: null, + }, }, }, ] : []), @@ -425,14 +427,16 @@ export default defineConfig(options => { ] : []), ...(options.vue.macros ? [ { - globals: { - $: 'readonly', - $$: 'readonly', - $ref: 'readonly', - $shallowRef: 'readonly', - $computed: 'readonly', - $customRef: 'readonly', - $toRef: 'readonly', + languageOptions: { + globals: { + $: 'readonly', + $$: 'readonly', + $ref: 'readonly', + $shallowRef: 'readonly', + $computed: 'readonly', + $customRef: 'readonly', + $toRef: 'readonly', + }, }, rules: { // [覆盖 essential] 允许 defineProps 解构