Skip to content

Commit 2f1e85b

Browse files
committed
chore: add comment for making .vue files lint working
1 parent 12b3f77 commit 2f1e85b

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
@@ -1111,7 +1111,7 @@ class Encore {
11111111
* Encore.enableEslintLoader(() => {}, {
11121112
* // set optional Encore-specific options, for instance:
11131113
*
1114-
* // lint `.vue` files
1114+
* // lint `.vue` files, see below for more informatin about linting Vue files
11151115
* lintVue: true
11161116
* });
11171117
* ```
@@ -1120,6 +1120,18 @@ class Encore {
11201120
* * {boolean} lintVue (default=false)
11211121
* Configure the loader to lint `.vue` files
11221122
*
1123+
* // Linting Vue files
1124+
* Encore.enableEslintLoader((options) => {
1125+
* // Deleting the hard-coded `parser` option prevent the error "Use the latest vue-eslint-parser", see:
1126+
* // - https://eslint.vuejs.org/user-guide/#what-is-the-use-the-latest-vue-eslint-parser-error
1127+
* // - https://github.com/symfony/webpack-encore/pull/574
1128+
* // Note that it will not be mandatory anymore is some times.
1129+
* delete options.parser;
1130+
* }, {
1131+
* lintVue: true
1132+
* });
1133+
* ```
1134+
*
11231135
* @param {string|object|function} eslintLoaderOptionsOrCallback
11241136
* @param {object} encoreOptions
11251137
* @returns {Encore}

0 commit comments

Comments
 (0)