forked from LN-Zap/zap-desktop
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
40 lines (38 loc) · 989 Bytes
/
.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
const path = require('path')
const downgraded = [
'class-methods-use-this',
'max-classes-per-file',
'no-async-promise-executor',
'no-await-in-loop',
'no-shadow',
'no-underscore-dangle',
'no-use-before-define',
]
module.exports = {
extends: ['@ln-zap', 'plugin:testcafe/recommended'],
rules: downgraded.reduce(
(acc, next) => {
acc[next] = 'warn'
return acc
},
{
'no-unused-expressions': ['error', { allowShortCircuit: true, allowTernary: true }],
'no-plusplus': ['error', { allowForLoopAfterthoughts: true }],
'no-restricted-syntax': 'off',
'jest/no-mocks-import': 'off',
'shopify/jsx-no-hardcoded-content': 'error',
}
),
plugins: ['shopify', 'testcafe'],
settings: {
'import/resolver': {
'babel-module': {},
},
node: {
moduleDirectory: ['renderer', 'node_modules'],
},
webpack: {
config: path.resolve(__dirname, 'webpack', 'webpack.config.eslint.js'),
},
},
}