JSPM

laravel-mix-eslint

0.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3864
  • Score
    100M100P100Q132036F
  • License MIT

A Laravel Mix extension for Eslint loader support.

Package Exports

  • laravel-mix-eslint

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (laravel-mix-eslint) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

NPM NPM NPM

Laravel Mix Eslint

This extension provides instant Eslint support to your Mix (v2.1 and up) builds.

Usage

First, install the extension.

npm install laravel-mix-eslint --save-dev

Then, require it within your webpack.mix.js file, like so:

let mix = require('laravel-mix')

require('laravel-mix-eslint')

mix
  .js('resources/assets/js/app.js', 'public/js')
  .eslint({
    fix: true,
    extensions: ['js']
    //...
  })
  .less('resources/assets/less/app.less', 'public/css')

You can pass an object with options for the eslint-webpack-plugin to the mix.eslint() function.

And you're done! Compile everything down with npm run dev.