From 4217c80e8a78a21bb6c35f159e61906f4ca5726e Mon Sep 17 00:00:00 2001 From: haoxr <1490493387@qq.com> Date: Sat, 11 Mar 2023 20:44:42 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=20=E7=A7=BB=E9=99=A4=20`defineProp?= =?UTF-8?q?s`=20=E7=AD=89specifying-globals?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 40eddea6994868acc0f3872a5086ecec1651010b --- .eslintrc.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 8f903ffd..722c3e09 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,17 +1,12 @@ + module.exports = { env: { browser: true, es2021: true, - node: true - }, - globals: { - defineProps: 'readonly', - defineEmits: 'readonly', - defineExpose: 'readonly', - DialogType: "readonly", - OptionType: "readonly", + node: true, }, parser: 'vue-eslint-parser', + // https://eslint.vuejs.org/user-guide/#bundle-configurations extends: [ 'eslint:recommended', 'plugin:vue/vue3-essential', @@ -20,8 +15,8 @@ module.exports = { ], parserOptions: { ecmaVersion: 'latest', + sourceType: 'module', parser: '@typescript-eslint/parser', - sourceType: 'module' }, plugins: ['vue', '@typescript-eslint'], rules: { @@ -29,5 +24,10 @@ module.exports = { '@typescript-eslint/no-empty-function': 'off', // 关闭空方法检查 '@typescript-eslint/no-explicit-any': 'off', // 关闭any类型的警告 'vue/no-v-model-argument': 'off' + }, + // https://eslint.org/docs/latest/use/configure/language-options#specifying-globals + globals: { + DialogOption: 'readonly', + OptionType:'readonly' } };