-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy path.eslintrc.cjs
80 lines (80 loc) · 1.87 KB
/
.eslintrc.cjs
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 = {
env: {
browser: true,
es2021: true,
node: true,
},
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:vue/vue3-essential",
"plugin:import/recommended",
"standard",
"prettier",
"plugin:prettier/recommended",
"./.eslintrc-auto-import.json",
],
overrides: [
{
env: {
node: true,
},
files: [".eslintrc.{js,cjs}"],
parserOptions: {
sourceType: "script",
},
},
],
parserOptions: {
ecmaVersion: "latest",
parser: "@typescript-eslint/parser",
sourceType: "module",
},
plugins: ["@typescript-eslint", "vue", "prettier", "import"],
rules: {
"no-control-regex": "off",
"prettier/prettier": "error",
"import/no-unresolved": "off",
"import/extensions": [
"error",
"ignorePackages",
{ js: "never", jsx: "never", ts: "never", tsx: "never" },
],
"import/prefer-default-export": ["off"],
"no-console": ["off"],
"import/no-extraneous-dependencies": "off",
"no-plusplus": "off",
"no-shadow": "off",
"vue/multi-word-component-names": "off",
"@typescript-eslint/no-explicit-any": "off",
"no-underscore-dangle": "off",
"no-use-before-define": "off",
"no-undef": "off",
"no-unused-vars": "off",
"no-param-reassign": "off",
"@typescript-eslint/no-unused-vars": "off",
"scss/load-no-partial-leading-underscore": "off",
"no-redeclare": "off",
"@typescript-eslint/no-redeclare": "error",
},
settings: {
"import/parsers": {
"@typescript-eslint/parser": [".ts", ".tsx"],
},
"import/resolver": {
typescript: {},
},
},
globals: {
$t: true,
uni: true,
UniApp: true,
wx: true,
WechatMiniprogram: true,
getCurrentPages: true,
UniHelper: true,
Page: true,
App: true,
NodeJS: true,
},
}