Skip to content

Commit 7ff495d

Browse files
authored
chore: add comment for making .vue files lint working
1 parent 6c35a2d commit 7ff495d

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

index.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,7 @@ class Encore {
10631063
* Encore.enableEslintLoader(() => {}, {
10641064
* // set optional Encore-specific options, for instance:
10651065
*
1066-
* // lint `.vue` files
1066+
* // lint `.vue` files, see below for more informatin about linting Vue files
10671067
* lintVue: true
10681068
* });
10691069
* ```
@@ -1072,6 +1072,18 @@ class Encore {
10721072
* * {boolean} lintVue (default=false)
10731073
* Configure the loader to lint `.vue` files
10741074
*
1075+
* // Linting Vue files
1076+
* Encore.enableEslintLoader((options) => {
1077+
* // Deleting the hard-coded `parser` option prevent the error "Use the latest vue-eslint-parser", see:
1078+
* // - https://eslint.vuejs.org/user-guide/#what-is-the-use-the-latest-vue-eslint-parser-error
1079+
* // - https://github.com/symfony/webpack-encore/pull/574
1080+
* // Note that it will not be mandatory anymore is some times.
1081+
* delete options.parser;
1082+
* }, {
1083+
* lintVue: true
1084+
* });
1085+
* ```
1086+
*
10751087
* @param {string|object|function} eslintLoaderOptionsOrCallback
10761088
* @param {object} encoreOptions
10771089
* @returns {Encore}

0 commit comments

Comments
 (0)