-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
49 lines (45 loc) · 1013 Bytes
/
index.js
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
'use strict';
var rules = {
'prop-types': require('./lib/rules/prop-types'),
'kind-name': require('./lib/rules/kind-name'),
'display-name': require('./lib/rules/display-name'),
'no-module-exports-import': require('./lib/rules/no-module-exports-import')
};
var ruleNames = Object.keys(rules);
var allRules = {};
for (var i = 0; i < ruleNames.length; i++) {
allRules['enact/' + ruleNames[i]] = 2;
}
var exportedRules = {};
for (var key in rules) {
if (!rules.hasOwnProperty(key)) {
continue;
}
exportedRules[key] = rules[key];
}
module.exports = {
rules: exportedRules,
configs: {
recommended: {
parserOptions: {
ecmaFeatures: {
jsx: true
}
},
rules: {
'enact/prop-types': 2,
'enact/kind-name': 2,
'enact/display-name': 2,
'enact/no-module-exports-import': 1
},
},
all: {
parserOptions: {
ecmaFeatures: {
jsx: true
}
},
rules: allRules
}
}
};