Skip to content

Commit 12b3f77

Browse files
committed
eslint/vue: add 2nd parameter to Encore#enableEslintLoader
1 parent eb85b24 commit 12b3f77

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

index.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,13 +1106,26 @@ class Encore {
11061106
* options.extends = 'airbnb';
11071107
* options.emitWarning = false;
11081108
* });
1109+
*
1110+
* // configure Encore-specific options
1111+
* Encore.enableEslintLoader(() => {}, {
1112+
* // set optional Encore-specific options, for instance:
1113+
*
1114+
* // lint `.vue` files
1115+
* lintVue: true
1116+
* });
11091117
* ```
11101118
*
1119+
* Supported options:
1120+
* * {boolean} lintVue (default=false)
1121+
* Configure the loader to lint `.vue` files
1122+
*
11111123
* @param {string|object|function} eslintLoaderOptionsOrCallback
1124+
* @param {object} encoreOptions
11121125
* @returns {Encore}
11131126
*/
1114-
enableEslintLoader(eslintLoaderOptionsOrCallback = () => {}) {
1115-
webpackConfig.enableEslintLoader(eslintLoaderOptionsOrCallback);
1127+
enableEslintLoader(eslintLoaderOptionsOrCallback = () => {}, encoreOptions = {}) {
1128+
webpackConfig.enableEslintLoader(eslintLoaderOptionsOrCallback, encoreOptions);
11161129

11171130
return this;
11181131
}

0 commit comments

Comments
 (0)