-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc
105 lines (105 loc) · 2.54 KB
/
.eslintrc
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
{
"parser": "@typescript-eslint/parser",
"root": true,
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"overrides": [{
"files": ["*.js"],
"plugins": [
"prettier"
],
"parser": "babel-eslint"
},
{
"files": ["*.ts", "*.tsx"],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"eslint-plugin-promise",
"eslint-plugin-prettier",
"eslint-plugin-import"
]
}
],
"parserOptions": {
"ecmaVersion": 2017,
"sourceType": "module",
"ecmaFeatures": {
"globalReturn": false,
"impliedStrict": true,
"jsx": false
}
},
"env": {
"es6": true,
"node": true,
"commonjs": true,
"mocha": true
},
"globals": {
"App": true,
"Page": true,
"Component": true,
"wx": true,
"WechatMiniprogram": true,
"getApp": true,
"getCurrentPages": true
},
"rules": {
"camelcase": "off",
"curly": "off",
"no-cond-assign": "error",
"guard-for-in": "warn",
"block-scoped-var": "warn",
"class-methods-use-this": "warn",
"default-case": "warn",
"no-alert": "error",
"no-empty-function": "error",
"no-extend-native": "error",
"semi": ["error", "never"],
"indent": ["error", 2],
"no-console": "off",
"no-global-assign": "error",
"quotes": ["error", "single"],
"eqeqeq": "error",
"block-spacing": ["error", "always"],
"object-curly-spacing": ["error", "always", {
"objectsInObjects": false
}],
"space-unary-ops": ["error", {
"words": true,
"nonwords": false
}],
"sort-imports": "error",
"no-nested-ternary": "off",
"no-multi-spaces": "error",
"no-undef": "error",
"space-before-function-paren": "off",
"import/no-unresolved": "off",
"no-plusplus": "off",
"no-shadow": "off",
"no-restricted-syntax": "off",
"no-return-await": "off",
"@typescript-eslint/member-delimiter-style": [2, {
"multiline": {
"delimiter": "none",
"requireLast": false
},
"singleline": {
"delimiter": "comma",
"requireLast": false
}
}],
"@typescript-eslint/no-this-alias": [2, {
"allowDestructuring": true,
"allowedNames": ["self"]
}],
"@typescript-eslint/triple-slash-reference": 0,
"import/no-extraneous-dependencies": 0,
"@typescript-eslint/camelcase": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/explicit-module-boundary-types": "off"
}
}