Skip to content

Commit

Permalink
eslint/vue: add 2nd parameter to Encore#enableEslintLoader
Browse files Browse the repository at this point in the history
  • Loading branch information
Kocal committed May 3, 2019
1 parent 41aface commit 29c40a3
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1058,13 +1058,26 @@ class Encore {
* options.extends = 'airbnb';
* options.emitWarning = false;
* });
*
* // configure Encore-specific options
* Encore.enableEslintLoader(() => {}, {
* // set optional Encore-specific options, for instance:
*
* // lint `.vue` files
* lintVue: true
* });
* ```
*
* Supported options:
* * {boolean} lintVue (default=false)
* Configure the loader to lint `.vue` files
*
* @param {string|object|function} eslintLoaderOptionsOrCallback
* @param {object} encoreOptions
* @returns {Encore}
*/
enableEslintLoader(eslintLoaderOptionsOrCallback = () => {}) {
webpackConfig.enableEslintLoader(eslintLoaderOptionsOrCallback);
enableEslintLoader(eslintLoaderOptionsOrCallback = () => {}, encoreOptions = {}) {
webpackConfig.enableEslintLoader(eslintLoaderOptionsOrCallback, encoreOptions);

return this;
}
Expand Down

0 comments on commit 29c40a3

Please sign in to comment.