This repository has been archived by the owner on Dec 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
.eslintrc.json
111 lines (111 loc) · 3.25 KB
/
.eslintrc.json
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
{
"root": true,
"overrides": [
{
"files": ["src/**/*.ts", "src/**/*.wxts"],
"parserOptions": {
"parser": "@typescript-eslint/parser",
"project": "tsconfig.json"
},
"rules": {
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": [
"error",
{
"typesToIgnore": []
}
]
}
},
{
"files": ["src/**/*.wxts"],
"parserOptions": {
"parser": "@typescript-eslint/parser",
"createDefaultProgram ": true,
"project": "src/wxs/tsconfig.json",
"extraFileExtensions": [".wxts"]
},
"env": {
"es6": false,
"commonjs": true
},
"globals": {
"module": "readonly",
"getRegExp": "readonly",
"getDate": "readonly",
"console": "readonly"
}
}
],
"plugins": ["@typescript-eslint", "prettier"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:prettier/recommended",
"prettier",
"prettier/standard",
"prettier/@typescript-eslint"
],
"rules": {
"prettier/prettier": "warn",
"no-cond-assign": ["warn", "always"],
"no-dupe-class-members": "off",
"no-console": "warn",
"require-atomic-updates": "warn",
"sort-vars": [
"warn",
{
"ignoreCase": true
}
],
"require-jsdoc": [
"error",
{
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true
}
}
],
"prefer-const": "error",
"prefer-rest-params": "warn",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/member-ordering": "warn",
"@typescript-eslint/no-empty-function": "warn",
"@typescript-eslint/no-extraneous-class": ["error", {}],
"@typescript-eslint/no-this-alias": [
"warn",
{
"allowedNames": []
}
],
"@typescript-eslint/no-for-in-array": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/explicit-function-return-type": [
"error",
{
"allowExpressions": true
}
]
},
"env": {
"es6": true
},
"globals": {
"module": "readonly",
"App": "readonly",
"Page": "readonly",
"Component": "readonly",
"Behavior": "readonly",
"wx": "readonly",
"getApp": "readonly",
"getCurrentPages": "readonly",
"console": "readonly",
"setTimeout": "readonly",
"clearTimeout": "readonly",
"setInterval": "readonly",
"clearInterval": "readonly",
"requirePlugin": "readonly"
}
}