Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Laravel Elixir ESLint Extension

Notifications You must be signed in to change notification settings

ponko2/laravel-elixir-eslint

Repository files navigation

laravel-elixir-eslint

Greenkeeper badge 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

About

Laravel Elixir ESLint Extension

Resources

Stars

Watchers

Forks

Packages

No packages published