-
Notifications
You must be signed in to change notification settings - Fork 119
/
Copy path.eslintrc.js
87 lines (81 loc) · 1.99 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
84
85
86
87
module.exports = {
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
ecmaFeatures: {
jsx: true,
},
},
plugins: [
'react',
'import',
'mocha',
'xod-fp',
'prettier',
],
extends: [
'eslint:recommended',
'plugin:import/errors',
'plugin:import/warnings',
'plugin:import/react',
'plugin:react/recommended',
'airbnb',
'prettier',
'prettier/flowtype',
'prettier/react',
],
globals: {
fetch: true,
window: true,
confirm: true,
document: true,
describe: true,
it: true,
specify: true,
before: true,
beforeEach: true,
after: true,
afterEach: true,
URLSearchParams: true,
},
settings: {
// Ignore “No named exports found in module” when re-exporting
// ReasonML generated code
'import/ignore': ['_Js']
},
rules: {
'prettier/prettier': 'error',
'xod-fp/max-composition-depth': ['error', {
max: 11, // TODO: it should be lowered to 6
ignoreCurry: true,
ignoreMocha: true,
}],
'no-underscore-dangle': ['error', {
allow: ["__"], /* Ramda’s R.__ */
allowAfterThis: true,
allowAfterSuper: true
}],
'new-cap': ['error', {
'capIsNewExceptions': ['Maybe', 'Either', 'Tuple', 'StrMap'],
'capIsNewExceptionPattern': '^(Maybe|Either)\..'
}],
'import/no-extraneous-dependencies': ['error', {
devDependencies: [
'**/*.spec.js',
'**/xod-client-electron/**/*.js',
'**/xod-client-electron/**/*.jsx',
'**/xod-client/stories/*.jsx',
'**/xod-client-browser/tools/*.js',
'**/xod-tabtest/tools/*.js',
'**/xod-client-browser/test-func/*.js',
'**/xod-client-browser/benchmark/*.js'
]
}],
'mocha/no-skipped-tests': 'error',
'mocha/no-exclusive-tests': 'error',
'no-unused-vars': ['error', {
argsIgnorePattern: '^_'
}],
'react/forbid-prop-types' : 'off' // TODO: enable and make custom propTypes
},
};