Skip to content

MiguelCastillo/bit-loader-eslint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bit-loader-eslint

Greenkeeper badge

eslint plugin for bit-loader to lint your JavaScript assets.

Install

$ npm install --save @bit/loader-eslint

bit-bundler

Sample configuration for bit-bundler

var Bitbundler = require("@bit/bundler");
var jsPlugin = require("@bit/loader-js");
var eslintPlugin = require("@bit/loader-eslint");

var bitbundler = new Bitbundler({
  loader: {
    plugins: [
      eslintPlugin({
        extensions: ["js", "jsx"]
      }),
      jsPlugin()
    ]
  }
});

bitbundler.bundle([{
  src: "browser.js",
  dest: "dist/<%= pkg.name %>.js"
}]);

Options

exitOnError

Flag to exit as soon as eslint reports an error. Defaults to false.

eslintPlugin({
  exitOnError: true
});

formatter

You can specify an eslint formatter:

Other formatters are available here

eslintPlugin({
  formatter: "compact"
});

options

You can also provide eslint specific options.

List of eslint options.

eslintPlugin({
  options: {
    useEslintrc: false
  }
})

License

Licensed under MIT