-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.js
56 lines (46 loc) · 1.28 KB
/
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
50
51
52
53
54
55
56
const path = require('path')
const rulesPath = path.join(__dirname, 'rules')
const configPaths = [
'eslint.js',
'import.js',
// Комментим пока адаптируем пакет к новым правилам
// "jest.js",
// Комментим пока адаптируем пакет к новым правилам
// 'jsx-a11y.js',
'react.js',
'@typescript-eslint.js',
'prettier.js',
].map((name) => path.join(rulesPath, name))
const configs = configPaths.map(require)
const configRules = configs.map((config) => config.rules)
const configSettings = configs.map((config) => config.settings)
const settings = Object.assign({}, ...configSettings)
const rules = Object.assign({}, ...configRules)
const [
eslintPath,
importPath,
// Комментим пока адаптируем пакет к новым правилам
// jestPath,
// jsxPath,
reactPath,
typescriptPath,
prettierPath,
] = configPaths
module.exports = {
extends: [
eslintPath,
importPath,
// Комментим пока адаптируем пакет к новым правилам
// jestPath,
// jsxPath,
reactPath,
'airbnb',
typescriptPath,
prettierPath,
],
rules,
globals: {
__DEV__: true, // DEV environment
},
settings,
}