Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Options aren't getting passed to eslintify when using watchify #17

Open
culshaw opened this issue May 5, 2017 · 1 comment
Open

Options aren't getting passed to eslintify when using watchify #17

culshaw opened this issue May 5, 2017 · 1 comment

Comments

@culshaw
Copy link

culshaw commented May 5, 2017

It's worth noting it works fine with Browserify (non watchify).

Trying to pass options to the plugin with v3.1.0 requiring the plugins as so.

var eslintify = require('eslintify');
var babelify = require('babelify');

Transforming the stream like so

        b.transform(eslintify, {formatter: 'json'}); 
        b.transform(eslintify, {passthrough: ['warnings']});
        b.transform(babelify, {presets: ['es2015', 'react'], plugins: ["transform-object-rest-spread"]});

results in no formatter change, nor any options being passed to eslintify.

I added a console.log into the mix to see what is being passed as the "options" parameter and did the same with babelify as a litmus.

eslintify

{ '0': '/js/core.components.js',
  '1': 
   { _flags: 
      { cache: {},
        packageCache: [Object],
        entries: [Object],
        external: [Object],
        insertGlobals: true,
        insertGlobalVars: [Object],
        poll: true,
        dedupe: true } } }

(object at index 1 are passed from watchify/browserify args)

babelify

{ '0': '/js/core.components.js',
  '1': 
   { presets: [ 'es2015', 'react' ],
     plugins: [ 'transform-object-rest-spread' ],
     sourceMaps: 'inline' } }
@quantizor
Copy link
Owner

quantizor commented May 5, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants