eslint-config-ray 2.0.7 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/airbnb-conf.js +17 -17
- package/lib/base.js +182 -182
- package/lib/globals-opts.js +5 -5
- package/lib/index.js +20 -20
- package/lib/ray.2.0.js +10 -10
- package/lib/react.js +56 -56
- package/lib/recommended-conf.js +17 -17
- package/lib/rules.js +34 -34
- package/package.json +5 -1
package/lib/airbnb-conf.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
4
|
+
extends: [ "airbnb" ],
|
|
5
|
+
env: {
|
|
6
|
+
browser: !0,
|
|
7
|
+
node: !0,
|
|
8
|
+
mocha: !0,
|
|
9
|
+
jest: !0,
|
|
10
|
+
es6: !0
|
|
11
|
+
},
|
|
12
|
+
parser: "babel-eslint",
|
|
13
|
+
parserOptions: {
|
|
14
|
+
ecmaVersion: 6,
|
|
15
|
+
ecmaFeatures: {
|
|
16
|
+
jsx: !0,
|
|
17
|
+
experimentalObjectRestSpread: !0
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
plugins: [ "react", "babel" ]
|
|
21
21
|
};
|
package/lib/base.js
CHANGED
|
@@ -1,186 +1,186 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
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
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
4
|
+
"max-len": [ 2, 160, 2 ],
|
|
5
|
+
"no-redeclare": 2,
|
|
6
|
+
"no-unreachable": 2,
|
|
7
|
+
"no-magic-numbers": [ 2, {
|
|
8
|
+
ignoreArrayIndexes: !0,
|
|
9
|
+
ignore: [ -2, -1, 0, 1, 2 ],
|
|
10
|
+
enforceConst: !0,
|
|
11
|
+
detectObjects: !1
|
|
12
|
+
} ],
|
|
13
|
+
"comma-style": [ 2, "last" ],
|
|
14
|
+
curly: [ 2, "all" ],
|
|
15
|
+
indent: [ 2, 2, {
|
|
16
|
+
SwitchCase: 1
|
|
17
|
+
} ],
|
|
18
|
+
semi: [ 2, "always" ],
|
|
19
|
+
"no-extra-semi": 2,
|
|
20
|
+
"comma-dangle": [ 2, "never" ],
|
|
21
|
+
"no-constant-condition": 2,
|
|
22
|
+
"dot-location": [ 2, "property" ],
|
|
23
|
+
"space-before-function-paren": [ 2, "never" ],
|
|
24
|
+
"space-unary-ops": [ 2, {
|
|
25
|
+
words: !0,
|
|
26
|
+
nonwords: !1
|
|
27
|
+
} ],
|
|
28
|
+
"spaced-comment": [ 2, "always", {
|
|
29
|
+
exceptions: [ "-", "+", "*", "=", "&", "!" ],
|
|
30
|
+
markers: [ "/", "!<", "global" ]
|
|
31
|
+
} ],
|
|
32
|
+
"space-infix-ops": 2,
|
|
33
|
+
"no-sparse-arrays": 2,
|
|
34
|
+
"array-bracket-spacing": [ 2, "never" ],
|
|
35
|
+
"object-curly-spacing": [ 2, "always" ],
|
|
36
|
+
"keyword-spacing": [ 2, {
|
|
37
|
+
overrides: {
|
|
38
|
+
if: {
|
|
39
|
+
after: !0
|
|
40
|
+
},
|
|
41
|
+
for: {
|
|
42
|
+
after: !0
|
|
43
|
+
},
|
|
44
|
+
while: {
|
|
45
|
+
after: !0
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
} ],
|
|
49
|
+
"template-curly-spacing": [ 2, "never" ],
|
|
50
|
+
"rest-spread-spacing": [ 2, "never" ],
|
|
51
|
+
quotes: [ 2, "single", {
|
|
52
|
+
allowTemplateLiterals: !0
|
|
53
|
+
} ],
|
|
54
|
+
camelcase: 2,
|
|
55
|
+
"no-extend-native": 2,
|
|
56
|
+
"no-debugger": 2,
|
|
57
|
+
"no-spaced-func": 2,
|
|
58
|
+
"no-undef": 2,
|
|
59
|
+
"no-undef-init": 2,
|
|
60
|
+
"key-spacing": [ 2, {
|
|
61
|
+
beforeColon: !1,
|
|
62
|
+
afterColon: !0
|
|
63
|
+
} ],
|
|
64
|
+
"valid-typeof": 2,
|
|
65
|
+
"object-shorthand": [ 2, "always", {
|
|
66
|
+
ignoreConstructors: !0,
|
|
67
|
+
avoidQuotes: !0
|
|
68
|
+
} ],
|
|
69
|
+
yoda: [ 2, "never", {
|
|
70
|
+
onlyEquality: !0
|
|
71
|
+
} ],
|
|
72
|
+
"wrap-iife": [ 2, "inside" ],
|
|
73
|
+
"no-unused-vars": [ 2, {
|
|
74
|
+
vars: "all",
|
|
75
|
+
args: "none",
|
|
76
|
+
ignoreRestSiblings: !1
|
|
77
|
+
} ],
|
|
78
|
+
"no-plusplus": [ 2, {
|
|
79
|
+
allowForLoopAfterthoughts: !0
|
|
80
|
+
} ],
|
|
81
|
+
"one-var": [ 2, {
|
|
82
|
+
var: "always",
|
|
83
|
+
let: "never",
|
|
84
|
+
const: "never"
|
|
85
|
+
} ],
|
|
86
|
+
"no-mixed-operators": [ 2, {
|
|
87
|
+
groups: [ [ "+", "-", "*", "/", "%", "**" ], [ "&", "|", "^", "~", "<<", ">>", ">>>" ], [ "==", "!=", "===", "!==", ">", ">=", "<", "<=" ], [ "&&", "||" ], [ "in", "instanceof" ] ],
|
|
88
|
+
allowSamePrecedence: !0
|
|
89
|
+
} ],
|
|
90
|
+
"no-extra-parens": [ 2, "all", {
|
|
91
|
+
nestedBinaryExpressions: !1,
|
|
92
|
+
ignoreJSX: "all"
|
|
93
|
+
} ],
|
|
94
|
+
"no-use-before-define": [ 2, {
|
|
95
|
+
functions: !1,
|
|
96
|
+
classes: !0,
|
|
97
|
+
variables: !1
|
|
98
|
+
} ],
|
|
99
|
+
eqeqeq: [ 2, "smart" ],
|
|
100
|
+
"new-cap": [ 2, {
|
|
101
|
+
newIsCap: !1,
|
|
102
|
+
capIsNew: !1,
|
|
103
|
+
properties: !1
|
|
104
|
+
} ],
|
|
105
|
+
"no-dupe-args": 2,
|
|
106
|
+
"no-dupe-class-members": 2,
|
|
107
|
+
"no-dupe-else-if": 2,
|
|
108
|
+
"no-dupe-keys": 2,
|
|
109
|
+
"no-duplicate-case": 2,
|
|
110
|
+
"no-duplicate-imports": 2,
|
|
111
|
+
"no-empty-pattern": 2,
|
|
112
|
+
"no-implied-eval": 2,
|
|
113
|
+
"no-import-assign": 2,
|
|
114
|
+
"no-multi-str": 2,
|
|
115
|
+
"no-new-object": 2,
|
|
116
|
+
"no-new-symbol": 2,
|
|
117
|
+
"no-shadow": 2,
|
|
118
|
+
"no-shadow-restricted-names": 2,
|
|
119
|
+
"no-this-before-super": 2,
|
|
120
|
+
"no-unsafe-negation": 2,
|
|
121
|
+
"no-useless-rename": 2,
|
|
122
|
+
"use-isnan": 2,
|
|
123
|
+
"constructor-super": 2,
|
|
124
|
+
"no-const-assign": 2,
|
|
125
|
+
"max-nested-callbacks": [ "error", 5 ],
|
|
126
|
+
"func-name-matching": [ 2, "always", {
|
|
127
|
+
includeCommonJSModuleExports: !1
|
|
128
|
+
} ],
|
|
129
|
+
"no-trailing-spaces": 1,
|
|
130
|
+
"no-multiple-empty-lines": [ 1, {
|
|
131
|
+
max: 2
|
|
132
|
+
} ],
|
|
133
|
+
"prefer-arrow-callback": 1,
|
|
134
|
+
"prefer-template": 1,
|
|
135
|
+
"no-undefined": 0,
|
|
136
|
+
"no-alert": 0,
|
|
137
|
+
"generator-star-spacing": 0,
|
|
138
|
+
"no-useless-constructor": 0,
|
|
139
|
+
"brace-style": 0,
|
|
140
|
+
"no-useless-escape": 0,
|
|
141
|
+
"no-confusing-arrow": 0,
|
|
142
|
+
"no-console": 0,
|
|
143
|
+
"func-names": 0,
|
|
144
|
+
"func-style": 0,
|
|
145
|
+
"arrow-body-style": 0,
|
|
146
|
+
"no-param-reassign": 0,
|
|
147
|
+
"no-return-assign": 0,
|
|
148
|
+
"consistent-return": 0,
|
|
149
|
+
"no-underscore-dangle": 0,
|
|
150
|
+
"no-loop-func": 0,
|
|
151
|
+
"arrow-parens": 0,
|
|
152
|
+
"no-unused-expressions": 0,
|
|
153
|
+
"no-sequences": 0,
|
|
154
|
+
"prefer-const": 0,
|
|
155
|
+
"no-else-return": 0,
|
|
156
|
+
"no-restricted-imports": 0,
|
|
157
|
+
"no-restricted-properties": 0,
|
|
158
|
+
"no-restricted-syntax": 0,
|
|
159
|
+
"quote-props": 0,
|
|
160
|
+
radix: 0,
|
|
161
|
+
"no-nested-ternary": 0,
|
|
162
|
+
"no-restricted-globals": 0,
|
|
163
|
+
"no-restricted-exports": 0,
|
|
164
|
+
"operator-assignment": 0,
|
|
165
|
+
"prefer-exponentiation-operator": 0,
|
|
166
|
+
"prefer-named-capture-group": 0,
|
|
167
|
+
"lines-between-class-members": 0,
|
|
168
|
+
"prefer-destructuring": 0,
|
|
169
|
+
"global-require": 0,
|
|
170
|
+
"class-methods-use-this": 0,
|
|
171
|
+
"no-lonely-if": 0,
|
|
172
|
+
"prefer-object-spread": 0,
|
|
173
|
+
"prefer-promise-reject-errors": 0,
|
|
174
|
+
"prefer-regex-literals": 0,
|
|
175
|
+
"prefer-spread": 0,
|
|
176
|
+
"default-case": 0,
|
|
177
|
+
"default-param-last": 0,
|
|
178
|
+
"no-unneeded-ternary": 0,
|
|
179
|
+
"no-multi-assign": 0,
|
|
180
|
+
"multiline-comment-style": 0,
|
|
181
|
+
"require-unicode-regexp": 0,
|
|
182
|
+
"no-bitwise": 0,
|
|
183
|
+
"vars-on-top": 0,
|
|
184
|
+
"linebreak-style": 0,
|
|
185
|
+
"max-classes-per-file": 0
|
|
186
186
|
};
|
package/lib/globals-opts.js
CHANGED
package/lib/index.js
CHANGED
|
@@ -3,25 +3,25 @@
|
|
|
3
3
|
var _rules = require("./rules"), _globals = require("./globals-opts");
|
|
4
4
|
|
|
5
5
|
module.exports = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
},
|
|
16
|
-
allowImportExportEverywhere: !1
|
|
6
|
+
parser: "babel-eslint",
|
|
7
|
+
extends: [ "airbnb", "prettier", "plugin:react/recommended", "prettier/react" ],
|
|
8
|
+
plugins: [ "react", "babel" ],
|
|
9
|
+
parserOptions: {
|
|
10
|
+
ecmaVersion: 6,
|
|
11
|
+
ecmaFeatures: {
|
|
12
|
+
globalReturn: !1,
|
|
13
|
+
jsx: !0,
|
|
14
|
+
experimentalObjectRestSpread: !0
|
|
17
15
|
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
allowImportExportEverywhere: !1
|
|
17
|
+
},
|
|
18
|
+
env: {
|
|
19
|
+
browser: !0,
|
|
20
|
+
node: !0,
|
|
21
|
+
commonjs: !0,
|
|
22
|
+
es6: !0
|
|
23
|
+
},
|
|
24
|
+
globals: _globals,
|
|
25
|
+
rules: _rules,
|
|
26
|
+
root: !0
|
|
27
27
|
};
|
package/lib/ray.2.0.js
CHANGED
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
var _rules = require("./rules"), _globals = require("./globals-opts");
|
|
4
4
|
|
|
5
5
|
module.exports = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
6
|
+
extends: [ "./recommended-conf", "./airbnb-conf" ].map(require.resolve),
|
|
7
|
+
parserOptions: {
|
|
8
|
+
ecmaVersion: 6,
|
|
9
|
+
ecmaFeatures: {
|
|
10
|
+
jsx: !0,
|
|
11
|
+
experimentalObjectRestSpread: !0
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
globals: _globals,
|
|
15
|
+
rules: _rules
|
|
16
16
|
};
|
package/lib/react.js
CHANGED
|
@@ -1,60 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
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
|
-
|
|
4
|
+
"react/sort-comp": 2,
|
|
5
|
+
"react/jsx-pascal-case": [ 2, {
|
|
6
|
+
allowAllCaps: !0
|
|
7
|
+
} ],
|
|
8
|
+
"react/jsx-boolean-value": 2,
|
|
9
|
+
"react/jsx-equals-spacing": 2,
|
|
10
|
+
"react/jsx-first-prop-new-line": 2,
|
|
11
|
+
"react/jsx-key": 2,
|
|
12
|
+
"react/jsx-no-duplicate-props": 2,
|
|
13
|
+
"react/style-prop-object": 2,
|
|
14
|
+
"react/no-direct-mutation-state": 2,
|
|
15
|
+
"react/no-children-prop": 2,
|
|
16
|
+
"react/no-array-index-key": 2,
|
|
17
|
+
"react/no-string-refs": 2,
|
|
18
|
+
"react/no-redundant-should-component-update": 2,
|
|
19
|
+
"react/no-render-return-value": 2,
|
|
20
|
+
"react/no-this-in-sfc": 2,
|
|
21
|
+
"react/no-typos": 2,
|
|
22
|
+
"react/no-unknown-property": 2,
|
|
23
|
+
"react/self-closing-comp": 2,
|
|
24
|
+
"react/void-dom-elements-no-children": 2,
|
|
25
|
+
"jsx-quotes": [ 2, "prefer-double" ],
|
|
26
|
+
"react/jsx-filename-extension": [ 2, {
|
|
27
|
+
extensions: [ ".js", ".jsx", ".md", ".ts", ".tsx" ]
|
|
28
|
+
} ],
|
|
29
|
+
"react/jsx-fragments": [ 2, "element" ],
|
|
30
|
+
"react/no-set-state": 0,
|
|
31
|
+
"react/prefer-stateless-function": 0,
|
|
32
|
+
"react/require-default-props": 0,
|
|
33
|
+
"react/forbid-prop-types": 0,
|
|
34
|
+
"react/prefer-es6-class": 0,
|
|
35
|
+
"react/no-find-dom-node": 0,
|
|
36
|
+
"react/no-unused-prop-types": 0,
|
|
37
|
+
"react/display-name": 0,
|
|
38
|
+
"react/static-property-placement": 0,
|
|
39
|
+
"react/destructuring-assignment": 0,
|
|
40
|
+
"react/jsx-props-no-spreading": 0,
|
|
41
|
+
"react/no-deprecated": 0,
|
|
42
|
+
"react/no-unused-state": 0,
|
|
43
|
+
"react/no-access-state-in-setstate": 0,
|
|
44
|
+
"react/jsx-sort-default-props": 0,
|
|
45
|
+
"react/jsx-sort-props": 0,
|
|
46
|
+
"react/jsx-no-target-blank": 0,
|
|
47
|
+
"react/default-props-match-prop-types": 0,
|
|
48
|
+
"react/button-has-type": 0,
|
|
49
|
+
"jsx-a11y/anchor-has-content": 0,
|
|
50
|
+
"jsx-a11y/no-static-element-interactions": 0,
|
|
51
|
+
"jsx-a11y/label-has-for": 0,
|
|
52
|
+
"jsx-a11y/role-has-required-aria-props": 0,
|
|
53
|
+
"jsx-a11y/no-noninteractive-element-interactions": 0,
|
|
54
|
+
"jsx-a11y/anchor-is-valid": 0,
|
|
55
|
+
"jsx-a11y/click-events-have-key-events": 0,
|
|
56
|
+
"jsx-a11y/mouse-events-have-key-events": 0,
|
|
57
|
+
"jsx-a11y/href-no-hash": 0,
|
|
58
|
+
"jsx-a11y/label-has-associated-control": 0,
|
|
59
|
+
"import/no-useless-path-segments": 0
|
|
60
60
|
};
|
package/lib/recommended-conf.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
module.exports = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
4
|
+
extends: [ "standard", "standard-react", "eslint:recommended", "plugin:react/recommended" ],
|
|
5
|
+
env: {
|
|
6
|
+
browser: !0,
|
|
7
|
+
node: !0,
|
|
8
|
+
mocha: !0,
|
|
9
|
+
jest: !0,
|
|
10
|
+
es6: !0
|
|
11
|
+
},
|
|
12
|
+
parser: "babel-eslint",
|
|
13
|
+
parserOptions: {
|
|
14
|
+
ecmaVersion: 6,
|
|
15
|
+
ecmaFeatures: {
|
|
16
|
+
jsx: !0,
|
|
17
|
+
experimentalObjectRestSpread: !0
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
plugins: [ "react", "babel" ]
|
|
21
21
|
};
|
package/lib/rules.js
CHANGED
|
@@ -3,48 +3,48 @@
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"), _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
4
4
|
|
|
5
5
|
function ownKeys(e, r) {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
6
|
+
var t = Object.keys(e);
|
|
7
|
+
if (Object.getOwnPropertySymbols) {
|
|
8
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
9
|
+
r && (o = o.filter(function(r) {
|
|
10
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
11
|
+
})), t.push.apply(t, o);
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
function _objectSpread(e) {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
17
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
18
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
19
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
|
|
20
|
+
(0, _defineProperty2.default)(e, r, t[r]);
|
|
21
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
|
|
22
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return e;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
var base = require("./base"), react = require("./react"), other = {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
} ],
|
|
34
|
-
patterns: [ "rc-*", "lodash", "lodash/*", "antd/*" ]
|
|
29
|
+
"no-restricted-imports": [ 2, {
|
|
30
|
+
paths: [ {
|
|
31
|
+
name: "antd",
|
|
32
|
+
message: "It is forbidden to use antd, please use amos-antd or amos-framework!!!!"
|
|
35
33
|
} ],
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
34
|
+
patterns: [ "rc-*", "lodash", "lodash/*", "antd/*" ]
|
|
35
|
+
} ],
|
|
36
|
+
"no-restricted-modules": [ 2, {
|
|
37
|
+
paths: [ {
|
|
38
|
+
name: "antd",
|
|
39
|
+
message: "It is forbidden to use antd, please use amos-antd or amos-framework!!!!"
|
|
42
40
|
} ],
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
patterns: [ "rc-*", "lodash", "lodash/*", "antd/*" ]
|
|
42
|
+
} ],
|
|
43
|
+
"import/extensions": 0,
|
|
44
|
+
"import/no-unresolved": 0,
|
|
45
|
+
"import/no-extraneous-dependencies": 0,
|
|
46
|
+
"import/prefer-default-export": 0,
|
|
47
|
+
"standard/no-callback-literal": 0
|
|
48
48
|
}, rules = _objectSpread(_objectSpread(_objectSpread({}, base), react), other);
|
|
49
49
|
|
|
50
50
|
module.exports = rules;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "eslint-config-ray",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.8",
|
|
4
4
|
"description": "the common eslint config for ray team",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"babel-eslint": "^10.1.0",
|
|
19
|
+
"@babel/runtime": "^7.13.10",
|
|
19
20
|
"eslint": "^7.5.0",
|
|
20
21
|
"eslint-config-airbnb": "^18.2.0",
|
|
21
22
|
"eslint-config-prettier": "^6.11.0",
|
|
@@ -28,5 +29,8 @@
|
|
|
28
29
|
"prettier": "^2.0.5"
|
|
29
30
|
},
|
|
30
31
|
"devDependencies": {
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"registry": "https://registry.npmjs.org/"
|
|
31
35
|
}
|
|
32
36
|
}
|