-
Notifications
You must be signed in to change notification settings - Fork 12
/
.eslintrc.js
80 lines (80 loc) · 2.17 KB
/
.eslintrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
module.exports = {
root: true,
env: {
browser: true,
node: true,
es2021: true
},
parser: "vue-eslint-parser",
parserOptions: {
parser: "@typescript-eslint/parser",
ecmaVersion: "latest",
sourceType: "module",
project: true,
tsconfigRootDir: __dirname,
extraFileExtensions: [".vue", ".json"]
},
globals: {
uni: "readonly",
UniNamespace: "readonly",
uniCloud: true,
wx: true,
getCurrentPages: "readonly"
},
extends: [
"eslint:recommended",
"plugin:import/recommended",
"plugin:import/typescript",
"plugin:vue/vue3-recommended",
"plugin:@typescript-eslint/strict-type-checked",
"plugin:prettier/recommended"
],
rules: {
"vue/multi-word-component-names": "off",
"vue/valid-v-on": "error",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/prefer-nullish-coalescing": "off",
"no-unused-vars": "off",
"no-duplicate-imports": "error",
"no-undef": "error",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-declaration-merging": "off",
"@typescript-eslint/no-unsafe-enum-comparison": "off",
"@typescript-eslint/no-unsafe-member-access": "off",
"@typescript-eslint/no-unsafe-return": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-floating-promises": "off",
"@typescript-eslint/no-unsafe-argument": "off",
"@typescript-eslint/no-unnecessary-condition": "off",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-misused-promises": [
"error",
{
checksVoidReturn: false
}
],
"vue/html-self-closing": [
"error",
{
html: {
void: "any"
}
}
],
"vue/prefer-import-from-vue": "error",
"import/no-empty-named-blocks": "error"
},
settings: {
"import/resolver": {
typescript: true,
node: true,
alias: {
map: [["@", "./src"]],
extensions: [".ts", ".js", ".jsx", ".tsx"]
}
},
"import/extensions": [".vue", ".ts", ".js", ".jsx", ".tsx"],
"import/ignore": [".vue"]
}
};