laravel-elixir-eslint
v4.0.0
Published
Laravel Elixir ESLint Extension
Downloads
236
Readme
laravel-elixir-eslint
Install
$ npm install laravel-elixir-eslint --save-dev
$ touch .eslintrc
Usage
Example Gulpfile
// gulpfile.js
var elixir = require('laravel-elixir');
require('laravel-elixir-eslint');
elixir(function(mix) {
mix.eslint();
});
Advanced example
var elixir = require('laravel-elixir');
var config = elixir.config;
require('laravel-elixir-eslint');
elixir(function(mix) {
mix.browserify('main.js')
.version(['js/main.js'])
.eslint([
config.get('assets.js.folder') + '/**/*.js',
'!' + config.get('public.js.outputFolder') + '/main.js'
]);
});
Options
Sources
Type: String
or Array
Glob or array of globs to read. Using this will overwrite all defaults.
Default:
mix.eslint([
'public/js/**/*.js',
'resources/assets/js/**/*.js'
]);
The prefix !
is for excluding files.
ESLint options
Type: Object
Options for ESLint.
See eslint.org/docs/user-guide/configuring
Credits
- gulp-eslint
- laravel-elixir
- All contributors to this project.