-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
119 lines (119 loc) · 2.98 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
{
"parser": "babel-eslint",
"extends": ["airbnb", "eslint:recommended", "plugin:prettier/recommended", "plugin:jest/recommended"],
"globals": {
"APP_ID": false,
"APP_SECRET": false
},
"env": {
"browser": false,
"node": true,
"jest": true,
"es6": true
},
"plugins": ["import", "prettier", "jest"],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"rules": {
// eslint
"arrow-body-style": ["error", "as-needed"],
"arrow-parens": ["error", "always"],
"arrow-spacing": "error",
"camelcase": ["off"],
"comma-dangle": ["error", "always-multiline"],
"curly": "error",
"default-case": "error",
"dot-notation": "warn",
"eqeqeq": "error",
"max-len": [
"warn",
{
"code": 180,
"ignoreUrls": true,
"ignoreRegExpLiterals": true
}
],
"newline-per-chained-call": "off",
"no-alert": "warn",
"no-confusing-arrow": "off",
"no-duplicate-imports": [
"error",
{
"includeExports": true
}
],
"no-else-return": "error",
"no-eq-null": "error",
"no-extra-bind": "error",
"no-lone-blocks": "error",
"no-multiple-empty-lines": "error",
"no-nested-ternary": ["error"],
"no-param-reassign": "error",
"no-return-assign": "error",
"no-return-await": "error",
"no-self-compare": "error",
"no-template-curly-in-string": "error",
"no-underscore-dangle": [
"warn",
{
"allowAfterSuper": true,
"enforceInMethodNames": true
}
],
"no-useless-concat": "error",
"no-useless-constructor": "error",
"no-useless-escape": "error",
"no-var": "error",
"prefer-const": "error",
"prefer-promise-reject-errors": "off",
"prefer-template": "error",
"prettier/prettier": [
"error",
{
"printWidth": 120,
"tabWidth": 2,
"singleQuote": true,
"trailingComma": "all",
"arrowParens": "always"
}
],
"require-await": "error",
"spaced-comment": "error",
"symbol-description": "error",
"object-curly-spacing": ["error", "always"],
"no-use-before-define": 0,
"allowForLoopAfterthoughts": true,
// import
"import/extensions": "off",
"import/newline-after-import": [
"error",
{
"count": 1
}
],
"import/no-dynamic-require": "off",
"import/no-extraneous-dependencies": "off",
"import/no-named-as-default": "off",
"import/no-unresolved": "off",
"import/order": "off",
"import/prefer-default-export": "off",
"import/imports-first": 0,
// jest
"jest/no-focused-tests": 2,
"jest/no-identical-title": 2,
"jest/consistent-test-it": [
"error",
{
"fn": "it"
}
],
"jest/lowercase-name": "error",
"jest/no-test-prefixes": "error",
"jest/prefer-to-be-null": "error",
"jest/prefer-to-be-undefined": "error",
"jest/valid-describe": "error",
"jest/valid-expect-in-promise": "error"
}
}