Skip to content

Commit

Permalink
Don't destroy plugins.
Browse files Browse the repository at this point in the history
If the `esnext` option is `false`, we currently blow away existing
plugins, replacing it with only the `babel` plugin. This prepends it.

This does not come with a test, as option handling is currently pretty difficult.
We can add the appropriate test for this there.

Reference:
  xojs#58 (comment)
  • Loading branch information
jamestalmage committed Dec 15, 2015
1 parent 5ddc8f7 commit c79f37f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ function handleOpts(opts) {
// always use the Babel parser so it won't throw
// on esnext features in normal mode
opts._config.parser = 'babel-eslint';
opts._config.plugins = ['babel'];
opts._config.plugins = ['babel'].concat(opts._config.plugins);
opts._config.rules['generator-star-spacing'] = 0;
opts._config.rules['arrow-parens'] = 0;
opts._config.rules['object-curly-spacing'] = 0;
Expand Down

0 comments on commit c79f37f

Please sign in to comment.