Skip to content

Commit 29c40a3

Browse files
committed
eslint/vue: add 2nd parameter to Encore#enableEslintLoader
1 parent 41aface commit 29c40a3

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
@@ -1058,13 +1058,26 @@ class Encore {
10581058
* options.extends = 'airbnb';
10591059
* options.emitWarning = false;
10601060
* });
1061+
*
1062+
* // configure Encore-specific options
1063+
* Encore.enableEslintLoader(() => {}, {
1064+
* // set optional Encore-specific options, for instance:
1065+
*
1066+
* // lint `.vue` files
1067+
* lintVue: true
1068+
* });
10611069
* ```
10621070
*
1071+
* Supported options:
1072+
* * {boolean} lintVue (default=false)
1073+
* Configure the loader to lint `.vue` files
1074+
*
10631075
* @param {string|object|function} eslintLoaderOptionsOrCallback
1076+
* @param {object} encoreOptions
10641077
* @returns {Encore}
10651078
*/
1066-
enableEslintLoader(eslintLoaderOptionsOrCallback = () => {}) {
1067-
webpackConfig.enableEslintLoader(eslintLoaderOptionsOrCallback);
1079+
enableEslintLoader(eslintLoaderOptionsOrCallback = () => {}, encoreOptions = {}) {
1080+
webpackConfig.enableEslintLoader(eslintLoaderOptionsOrCallback, encoreOptions);
10681081

10691082
return this;
10701083
}

0 commit comments

Comments
 (0)