forked from NervJS/taro-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
53 lines (53 loc) · 1.38 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
{
"extends": ["o2team", "taro"],
"parser": "babel-eslint",
"env": {
"jest": true
},
"rules": {
"class-methods-use-this": "off",
"prefer-rest-params": "off",
"arrow-body-style": "warn",
"taro/custom-component-children": "off",
"no-unused-vars": ["error", { "varsIgnorePattern": "Taro" }],
"no-console": ["error", { "allow": ["warn", "error"] }]
},
"overrides": [
{
"files": ["build/*.js"],
"rules": {
"import/no-commonjs": "off"
}
},
{
"files": ["src/components/**/*.test.js", "src/components/**/test.js"],
"rules": {
"taro/no-stateless-component": "off",
"react/react-in-jsx-scope": "off",
"react/no-find-dom-node": "off",
"no-unused-vars": ["error", { "varsIgnorePattern": "Nerv" }]
}
},
{
"files": ["**/*.ts","**/*.tsx"],
"parser": "typescript-eslint-parser",
"plugins": ["react", "typescript"],
"env": {
"jest": true
},
"rules": {
"no-undef": 0,
"no-unused-vars": 0,
"typescript/class-name-casing": 2,
"class-methods-use-this": "off",
"prefer-rest-params": "off",
"arrow-body-style": "warn",
"react/jsx-filename-extension": [
2,
{ "extensions": [".js", ".jsx", ".ts", ".tsx"] }
],
"taro/custom-component-children": "off"
}
}
]
}