1 | const lint = require('neutrino-middleware-eslint');
|
2 | const merge = require('deepmerge');
|
3 |
|
4 | module.exports = (neutrino, opts = {}) => {
|
5 | neutrino.use(lint, merge.all([
|
6 | {
|
7 | eslint: {
|
8 | baseConfig: {
|
9 | extends: ['airbnb-base']
|
10 | },
|
11 | rules: {
|
12 |
|
13 | 'new-cap': 'off',
|
14 |
|
15 | 'object-curly-spacing': 'off',
|
16 |
|
17 | 'babel/new-cap': ['error', { newIsCap: true }],
|
18 |
|
19 | 'babel/object-curly-spacing': ['error', 'always']
|
20 | }
|
21 | }
|
22 | },
|
23 | opts,
|
24 | !opts.include && !opts.exclude ? { include: [neutrino.options.source], exclude: [neutrino.options.static] } : {}
|
25 | ]));
|
26 | };
|