-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
32 lines (31 loc) · 863 Bytes
/
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
const lint = require('neutrino-middleware-eslint')
const merge = require('deepmerge')
module.exports = (neutrino, opts = {}) => {
neutrino.use(lint, merge.all([
{
eslint: {
baseConfig: {
extends: ['xo', 'xo-react'],
env: {
browser: true,
commonjs: true,
es6: true,
jest: true,
node: true
}
},
rules: {
semi: ['error', 'never'],
indent: ['error', 2, { SwitchCase: 2 }],
'object-curly-spacing': ['error', 'always'],
'react/jsx-indent': ['error', 2],
'react/prop-types': ['error', {
ignore: ['children']
}]
}
}
},
opts,
!opts.include && !opts.exclude ? { include: [neutrino.options.source], exclude: [neutrino.options.static] } : {}
]))
}