-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
83 lines (79 loc) · 2.64 KB
/
.eslintrc.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
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
const reactPackages = [
'./packages/codistica-demo/src/**/*.js',
'./packages/codistica-react/src/**/*.js',
'./packages/codistica-react-icons/src/**/*.js',
'./packages/codistica-react-mui/src/**/*.js'
];
const browserPackages = [
...reactPackages,
'./packages/codistica-browser/src/**/*.js'
];
const nodePackages = [
'./packages/codistica-dev-tools/src/**/*.js',
'./packages/codistica-node/src/**/*.js',
'./packages/codistica-scriptfiber/src/**/*.js'
];
const jsdocPackages = [
'./packages/codistica-browser/src/**/*.js',
'./packages/codistica-core/src/**/*.js',
'./packages/codistica-dev-tools/src/**/*.js',
'./packages/codistica-node/src/**/*.js',
'./packages/codistica-scriptfiber/src/**/*.js',
'./packages/codistica-types/src/**/*.js'
];
module.exports = {
extends: ['@codistica/eslint-config-default/base-preset'],
overrides: [
// FILES OUTSIDE SRC
{
files: ['!**/src/**/*.js'],
excludedFiles: [
'./packages/*/scripts/**/*.js',
'./packages/*/stories/**/*.js',
'./packages/*/.storybook/**/*.js'
],
extends: ['@codistica/eslint-config-default/node-script']
},
// NODE PACKAGES
{
files: [...nodePackages, './packages/*/scripts/**/*.js'],
extends: ['@codistica/eslint-config-default/node-module']
},
// BROWSER PACKAGES
{
files: browserPackages,
extends: ['@codistica/eslint-config-default/browser']
},
// REACT PACKAGES
{
files: [...reactPackages, './packages/*/stories/**/*.js'],
extends: ['@codistica/eslint-config-default/react-preset']
},
// STORYBOOK
{
files: [
'./packages/*/stories/**/*.js',
'./packages/*/.storybook/**/*.js'
],
extends: ['@codistica/eslint-config-default/storybook']
},
// JSDOC
{
files: jsdocPackages,
extends: ['@codistica/eslint-config-default/jsdoc']
},
// PUBLIC REACT PACKAGES INDEX FILES (EXCEPTION)
/** @todo FOLLOW https://github.com/facebook/flow/issues/8354. */
/** @todo FOLLOW https://youtrack.jetbrains.com/issue/WEB-45239. */
{
files: [
'./packages/codistica-react/src/index.js',
'./packages/codistica-react-icons/src/index.js',
'./packages/codistica-react-mui/src/index.js'
],
rules: {
'import/extensions': ['warn', 'never']
}
}
]
};