-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
50 lines (49 loc) · 1.1 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
const path = require('path');
module.exports = {
extends: ['airbnb', 'plugin:prettier/recommended'],
env: {
browser: true,
jest: true,
node: true,
},
globals: {
__DEVELOPMENT__: true,
__CLIENT__: true,
__SERVER__: true,
__DISABLE_SSR__: true,
__DEVTOOLS__: true,
socket: true,
},
ignorePatterns: ['build/'],
parser: '@babel/eslint-parser',
plugins: ['react', 'import'],
rules: {
'import/no-import-module-exports': [
'error',
{
exceptions: [
path.join(__dirname, 'src/client.jsx'),
path.join(__dirname, 'src/store/index.js'),
],
},
],
'import/no-unresolved': [2, { ignore: ['@Config'] }],
'no-console': 0,
'no-underscore-dangle': [
'error',
{ allow: ['__PRELOADED_STATE__', '__REDUX_DEVTOOLS_EXTENSION__'] },
],
'react/function-component-definition': [
2,
{
namedComponents: 'arrow-function',
unnamedComponents: 'arrow-function',
},
],
},
settings: {
'import/resolve': {
moduleDirectory: ['node_modules', 'src'],
},
},
};