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",
|
2022-02-07 15:59:04 +08:00
|
|
|
"@vue/eslint-config-typescript"
|
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: {
|
2022-02-07 15:59:04 +08:00
|
|
|
"vue/no-v-html": "off",
|
|
|
|
"vue/require-default-prop": "off",
|
|
|
|
"vue/require-explicit-emits": "off",
|
|
|
|
"vue/multi-word-component-names": "off",
|
2021-07-06 01:01:42 +08:00
|
|
|
"@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",
|
2022-03-21 15:40:29 +08:00
|
|
|
"vue/html-self-closing": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
html: {
|
|
|
|
void: "always",
|
|
|
|
normal: "always",
|
|
|
|
component: "always"
|
|
|
|
},
|
|
|
|
svg: "always",
|
|
|
|
math: "always"
|
|
|
|
}
|
|
|
|
],
|
2021-07-06 01:01:42 +08:00
|
|
|
"@typescript-eslint/no-unused-vars": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
argsIgnorePattern: "^_",
|
|
|
|
varsIgnorePattern: "^_"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"no-unused-vars": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
argsIgnorePattern: "^_",
|
|
|
|
varsIgnorePattern: "^_"
|
|
|
|
}
|
2021-12-06 08:31:34 +08:00
|
|
|
],
|
|
|
|
"prettier/prettier": [
|
|
|
|
"error",
|
|
|
|
{
|
|
|
|
endOfLine: "auto"
|
|
|
|
}
|
2021-07-06 01:01:42 +08:00
|
|
|
]
|
2021-07-05 17:39:00 +08:00
|
|
|
}
|
2021-08-31 12:37:36 +08:00
|
|
|
};
|