cli.js
function run(opts, cb){
  opts.extensions = opts.extensions ? opts.extensions + ',.jsx' : '.jsx';

  // glob-all fixes windows glob issues and provides array support
  // i.e. jsxhint ['jsx/**/*','!scripts/**/*','scripts/outlier.jsx']
  runGlob(opts.args, {nodir: true}, function(err, globbed) {
    if (err) return cb(err);

    // Reassign the globbed files back to opts.args, so it looks like we just
    // fed jshint a big list of files.
    opts.args = globbed;
    var files = jshintcli.gather(opts);

    if (opts.useStdin) {
      jsxhint.transformStream(process.stdin, jsxhintOptions, opts, cb);
    } else {
      jsxhint.transformFiles(files, jsxhintOptions, opts, cb);
    }
  });
}
function run(opts, cb){
  opts.extensions = opts.extensions ? opts.extensions + ',.jsx' : '.jsx';

  // glob-all fixes windows glob issues and provides array support
  // i.e. jsxhint ['jsx/**/*','!scripts/**/*','scripts/outlier.jsx']
  runGlob(opts.args, {nodir: true}, function(err, globbed) {
    if (err) return cb(err);

    // Reassign the globbed files back to opts.args, so it looks like we just
    // fed jshint a big list of files.
    opts.args = globbed;
    var files = jshintcli.gather(opts);

    if (opts.useStdin) {
      jsxhint.transformStream(process.stdin, jsxhintOptions, opts, cb);
    } else {
      jsxhint.transformFiles(files, jsxhintOptions, opts, cb);
    }
  });
}
function run ( opts , cb ) { opts . extensions = opts . extensions ? opts . extensions + ',.jsx' : '.jsx' ; // glob-all fixes windows glob issues and provides array support // i.e. jsxhint ['jsx/**/*','!scripts/**/*','scripts/outlier.jsx'] runGlob ( opts . args , { nodir : true } , function ( err , globbed ) { if ( err ) return cb ( err ) ; // Reassign the globbed files back to opts.args, so it looks like we just // fed jshint a big list of files. opts . args = globbed ; var files = jshintcli . gather ( opts ) ; if ( opts . useStdin ) { jsxhint . transformStream ( process . stdin , jsxhintOptions , opts , cb ) ; } else { jsxhint . transformFiles ( files , jsxhintOptions , opts , cb ) ; } } ) ; }
Proxy run function. Reaches out to jsxhint to transform
incoming stream or read files & transform.
@param  {Object}   opts Opts as created by JSHint.
@param  {Function} cb   Callback.
Proxy run function . Reaches out to jsxhint to transform incoming stream or read files & transform .