refactor: 移除 defineProps 等specifying-globals
Former-commit-id: 40eddea6994868acc0f3872a5086ecec1651010b
This commit is contained in:
18
.eslintrc.js
18
.eslintrc.js
@@ -1,17 +1,12 @@
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
env: {
|
env: {
|
||||||
browser: true,
|
browser: true,
|
||||||
es2021: true,
|
es2021: true,
|
||||||
node: true
|
node: true,
|
||||||
},
|
|
||||||
globals: {
|
|
||||||
defineProps: 'readonly',
|
|
||||||
defineEmits: 'readonly',
|
|
||||||
defineExpose: 'readonly',
|
|
||||||
DialogType: "readonly",
|
|
||||||
OptionType: "readonly",
|
|
||||||
},
|
},
|
||||||
parser: 'vue-eslint-parser',
|
parser: 'vue-eslint-parser',
|
||||||
|
// https://eslint.vuejs.org/user-guide/#bundle-configurations
|
||||||
extends: [
|
extends: [
|
||||||
'eslint:recommended',
|
'eslint:recommended',
|
||||||
'plugin:vue/vue3-essential',
|
'plugin:vue/vue3-essential',
|
||||||
@@ -20,8 +15,8 @@ module.exports = {
|
|||||||
],
|
],
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
ecmaVersion: 'latest',
|
ecmaVersion: 'latest',
|
||||||
|
sourceType: 'module',
|
||||||
parser: '@typescript-eslint/parser',
|
parser: '@typescript-eslint/parser',
|
||||||
sourceType: 'module'
|
|
||||||
},
|
},
|
||||||
plugins: ['vue', '@typescript-eslint'],
|
plugins: ['vue', '@typescript-eslint'],
|
||||||
rules: {
|
rules: {
|
||||||
@@ -29,5 +24,10 @@ module.exports = {
|
|||||||
'@typescript-eslint/no-empty-function': 'off', // 关闭空方法检查
|
'@typescript-eslint/no-empty-function': 'off', // 关闭空方法检查
|
||||||
'@typescript-eslint/no-explicit-any': 'off', // 关闭any类型的警告
|
'@typescript-eslint/no-explicit-any': 'off', // 关闭any类型的警告
|
||||||
'vue/no-v-model-argument': 'off'
|
'vue/no-v-model-argument': 'off'
|
||||||
|
},
|
||||||
|
// https://eslint.org/docs/latest/use/configure/language-options#specifying-globals
|
||||||
|
globals: {
|
||||||
|
DialogOption: 'readonly',
|
||||||
|
OptionType:'readonly'
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user