$ npm install laravel-elixir-eslint --save-dev
$ touch .eslintrc
// gulpfile.js
var elixir = require('laravel-elixir');
require('laravel-elixir-eslint');
elixir(function(mix) {
mix.eslint();
});
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'
]);
});
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.
Type: Object
Options for ESLint.
See eslint.org/docs/user-guide/configuring
- gulp-eslint
- laravel-elixir
- All contributors to this project.