2021-07-05 17:39:00 +08:00
|
|
|
module.exports = {
|
|
|
|
root: true,
|
|
|
|
env: {
|
|
|
|
node: true
|
|
|
|
},
|
2021-09-18 12:44:31 +08:00
|
|
|
globals: {
|
|
|
|
// Ref sugar (take 2)
|
|
|
|
$: "readonly",
|
|
|
|
$$: "readonly",
|
|
|
|
$ref: "readonly",
|
|
|
|
$shallowRef: "readonly",
|
|
|
|
$computed: "readonly",
|
|
|
|
|
2021-09-18 22:24:52 +08:00
|
|
|
// index.d.ts
|
|
|
|
// global.d.ts
|
|
|
|
Fn: "readonly",
|
|
|
|
PromiseFn: "readonly",
|
|
|
|
RefType: "readonly",
|
|
|
|
LabelValueOptions: "readonly",
|
|
|
|
EmitType: "readonly",
|
|
|
|
TargetContext: "readonly",
|
|
|
|
ComponentElRef: "readonly",
|
|
|
|
ComponentRef: "readonly",
|
|
|
|
ElRef: "readonly",
|
|
|
|
global: "readonly",
|
|
|
|
ForDataType: "readonly",
|
2021-09-19 01:12:46 +08:00
|
|
|
ComponentRoutes: "readonly",
|
2021-09-18 22:24:52 +08:00
|
|
|
|
2021-09-18 12:44:31 +08:00
|
|
|
// script setup
|
|
|
|
defineProps: "readonly",
|
|
|
|
defineEmits: "readonly",
|
|
|
|
defineExpose: "readonly",
|
|
|
|
withDefaults: "readonly"
|
|
|
|
},
|
2021-07-05 17:39:00 +08:00
|
|
|
extends: [
|
2021-07-06 01:01:42 +08:00
|
|
|
"plugin:vue/vue3-essential",
|
|
|
|
"eslint:recommended",
|
|
|
|
"@vue/typescript/recommended",
|
|
|
|
"@vue/prettier",
|
|
|
|
"@vue/prettier/@typescript-eslint"
|
2021-07-05 17:39:00 +08:00
|
|
|
],
|
2021-07-06 01:01:42 +08:00
|
|
|
parser: "vue-eslint-parser",
|
2021-07-05 17:39:00 +08:00
|
|
|
parserOptions: {
|
2021-07-06 01:01:42 +08:00
|
|
|
parser: "@typescript-eslint/parser",
|
|
|
|
ecmaVersion: 2020,
|
|
|
|
sourceType: "module",
|
|
|
|
jsxPragma: "React",
|
|
|
|
ecmaFeatures: {
|
|
|
|
jsx: true
|
|
|
|
}
|
|
|
|
},
|
|
|
|
rules: {
|
|
|
|
"@typescript-eslint/no-explicit-any": "off", // any
|
2021-08-27 00:45:40 +08:00
|
|
|
"no-debugger": "off",
|
2021-07-06 01:01:42 +08:00
|
|
|
"@typescript-eslint/explicit-module-boundary-types": "off", // setup()
|
|
|
|
"@typescript-eslint/ban-types": "off",
|
|
|
|
"@typescript-eslint/ban-ts-comment": "off",
|
|
|
|
"@typescript-eslint/no-empty-function": "off",
|
|
|
|
"@typescript-eslint/no-non-null-assertion": "off",
|
|
|
|
"@typescript-eslint/no-unused-vars": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
argsIgnorePattern: "^_",
|
|
|
|
varsIgnorePattern: "^_"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"no-unused-vars": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
argsIgnorePattern: "^_",
|
|
|
|
varsIgnorePattern: "^_"
|
|
|
|
}
|
|
|
|
]
|
2021-07-05 17:39:00 +08:00
|
|
|
}
|
2021-08-31 12:37:36 +08:00
|
|
|
};
|