laravel-elixir-eslint

4.0.0 • Public • Published

laravel-elixir-eslint

npm version Build Status

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

Package Sidebar

Install

npm i laravel-elixir-eslint

Weekly Downloads

49

Version

4.0.0

License

MIT

Last publish

Collaborators

  • ponko2