Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Commit

Permalink
Preserve ESLint default include when just exclude set (#344)
Browse files Browse the repository at this point in the history
Previously if `exclude` was set manually, it would prevent the default
value for `include` being used. Now consumers of the middleware can
pass just `exclude` and not have to pass both. See:
#315 (comment)

The default include in neutrino-preset-airbnb-base has also been
removed, since it just duplicated that in neutrino-middleware-eslint.
  • Loading branch information
edmorley authored and eliperelman committed Oct 6, 2017
1 parent dec7201 commit bb190c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/neutrino-middleware-eslint/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ module.exports = (neutrino, opts = {}) => {
const failBuild = process.env.NODE_ENV !== 'development' || neutrino.options.command !== 'start';
const options = merge.all([
opts,
!opts.include && !opts.exclude ? { include: [neutrino.options.source] } : {}
!opts.include ? { include: [neutrino.options.source] } : {}
]);

neutrino.config
Expand Down
3 changes: 1 addition & 2 deletions packages/neutrino-preset-airbnb-base/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ module.exports = (neutrino, opts = {}) => {
}
}
},
opts,
!opts.include && !opts.exclude ? { include: [neutrino.options.source] } : {}
opts
]));
};

0 comments on commit bb190c4

Please sign in to comment.