eslint plugin for bit-loader to lint your JavaScript assets.
$ npm install --save @bit/loader-eslint
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"
}]);
Flag to exit as soon as eslint reports an error. Defaults to false.
eslintPlugin({
exitOnError: true
});
You can specify an eslint formatter:
Other formatters are available here
eslintPlugin({
formatter: "compact"
});
You can also provide eslint specific options.
List of eslint options.
eslintPlugin({
options: {
useEslintrc: false
}
})
Licensed under MIT