Skip to content

Commit d37e174

Browse files
authored
fix: bump eslint-webpack-plugin and fix lintOnError regressions (#6787)
1 parent 3f1346e commit d37e174

File tree

3 files changed

+38
-35
lines changed

3 files changed

+38
-35
lines changed

packages/@vue/cli-plugin-eslint/index.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ module.exports = (api, options) => {
2525

2626
api.chainWebpack(webpackConfig => {
2727
const { lintOnSave } = options
28-
const allWarnings = lintOnSave === true || lintOnSave === 'warning'
29-
const allErrors = lintOnSave === 'error'
28+
const treatAllAsWarnings = lintOnSave === true || lintOnSave === 'warning'
29+
const treatAllAsErrors = lintOnSave === 'error'
30+
31+
const failOnWarning = treatAllAsErrors
32+
const failOnError = !treatAllAsWarnings
3033

3134
/** @type {import('eslint-webpack-plugin').Options & import('eslint').ESLint.Options} */
3235
const eslintWebpackPluginOptions = {
@@ -44,10 +47,10 @@ module.exports = (api, options) => {
4447
}),
4548
// plugin options
4649
context: cwd,
47-
// https://github.com/webpack-contrib/eslint-webpack-plugin/issues/56
48-
threads: false,
49-
emitWarning: allWarnings,
50-
emitError: allErrors,
50+
51+
failOnWarning,
52+
failOnError,
53+
5154
eslintPath: path.dirname(
5255
resolveModule('eslint/package.json', cwd) ||
5356
resolveModule('eslint/package.json', __dirname)

packages/@vue/cli-plugin-eslint/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"dependencies": {
2626
"@vue/cli-shared-utils": "^5.0.0-beta.7",
27-
"eslint-webpack-plugin": "2.4.3",
27+
"eslint-webpack-plugin": "^3.1.0",
2828
"globby": "^11.0.2",
2929
"inquirer": "^8.0.0",
3030
"webpack": "^5.22.0",

yarn.lock

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3238,14 +3238,22 @@
32383238
"@types/eslint" "*"
32393239
"@types/estree" "*"
32403240

3241-
"@types/eslint@*", "@types/eslint@^7.2.4":
3241+
"@types/eslint@*":
32423242
version "7.28.1"
32433243
resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.28.1.tgz#50b07747f1f84c2ba8cd394cf0fe0ba07afce320"
32443244
integrity sha512-XhZKznR3i/W5dXqUhgU9fFdJekufbeBd5DALmkuXoeFcjbQcPk+2cL+WLHf6Q81HWAnM2vrslIHpGVyCAviRwg==
32453245
dependencies:
32463246
"@types/estree" "*"
32473247
"@types/json-schema" "*"
32483248

3249+
"@types/eslint@^7.28.2":
3250+
version "7.28.2"
3251+
resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.28.2.tgz#0ff2947cdd305897c52d5372294e8c76f351db68"
3252+
integrity sha512-KubbADPkfoU75KgKeKLsFHXnU4ipH7wYg0TRT33NK3N3yiu7jlFAAoygIWBV+KbuHx/G+AvuGX6DllnK35gfJA==
3253+
dependencies:
3254+
"@types/estree" "*"
3255+
"@types/json-schema" "*"
3256+
32493257
"@types/estree@*", "@types/estree@^0.0.50":
32503258
version "0.0.50"
32513259
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.50.tgz#1e0caa9364d3fccd2931c3ed96fdbeaa5d4cca83"
@@ -9787,16 +9795,16 @@ eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0:
97879795
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303"
97889796
integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==
97899797

9790-
eslint-webpack-plugin@2.4.3:
9791-
version "2.4.3"
9792-
resolved "https://registry.yarnpkg.com/eslint-webpack-plugin/-/eslint-webpack-plugin-2.4.3.tgz#59afc76ab747e47fcc3ccd05375b58cbc5a034d5"
9793-
integrity sha512-+15ifHFkGn0gB7lQBe+xgyKcjelxv9xlTutGHEPYBUUj+1Rjrjq3+1REJLJpyAHgpQTatpqkRY1z8gQuyn3Aww==
9798+
eslint-webpack-plugin@^3.1.0:
9799+
version "3.1.0"
9800+
resolved "https://registry.yarnpkg.com/eslint-webpack-plugin/-/eslint-webpack-plugin-3.1.0.tgz#86ee426f076e2d82f9d9eaab12db1de4311c35b2"
9801+
integrity sha512-1UTDzwN5br3z3E2bzhuNtjbSsW2EJiIEGdxH8uWRbOsTEEY0zw8QYGHLeQQrClMWO0gD9QuB5uDh6uQ8tbbv5A==
97949802
dependencies:
9795-
"@types/eslint" "^7.2.4"
9796-
arrify "^2.0.1"
9797-
jest-worker "^26.6.2"
9798-
micromatch "^4.0.2"
9799-
schema-utils "^3.0.0"
9803+
"@types/eslint" "^7.28.2"
9804+
jest-worker "^27.3.1"
9805+
micromatch "^4.0.4"
9806+
normalize-path "^3.0.0"
9807+
schema-utils "^3.1.1"
98009808

98019809
eslint@^7.32.0:
98029810
version "7.32.0"
@@ -10447,14 +10455,6 @@ file-loader@^3.0.1:
1044710455
loader-utils "^1.0.2"
1044810456
schema-utils "^1.0.0"
1044910457

10450-
file-loader@^6.1.1:
10451-
version "6.2.0"
10452-
resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-6.2.0.tgz#baef7cf8e1840df325e4390b4484879480eebe4d"
10453-
integrity sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==
10454-
dependencies:
10455-
loader-utils "^2.0.0"
10456-
schema-utils "^3.0.0"
10457-
1045810458
file-type@^3.8.0:
1045910459
version "3.9.0"
1046010460
resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9"
@@ -13680,7 +13680,7 @@ jest-watcher@^27.0.0, jest-watcher@^27.2.5:
1368013680
jest-util "^27.2.5"
1368113681
string-length "^4.0.1"
1368213682

13683-
jest-worker@^26.2.1, jest-worker@^26.6.2:
13683+
jest-worker@^26.2.1:
1368413684
version "26.6.2"
1368513685
resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-26.6.2.tgz#7f72cbc4d643c365e27b9fd775f9d0eaa9c7a8ed"
1368613686
integrity sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==
@@ -13698,6 +13698,15 @@ jest-worker@^27.0.2, jest-worker@^27.0.6, jest-worker@^27.2.5:
1369813698
merge-stream "^2.0.0"
1369913699
supports-color "^8.0.0"
1370013700

13701+
jest-worker@^27.3.1:
13702+
version "27.3.1"
13703+
resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.3.1.tgz#0def7feae5b8042be38479799aeb7b5facac24b2"
13704+
integrity sha512-ks3WCzsiZaOPJl/oMsDjaf0TRiSv7ctNgs0FqRr2nARsovz6AWWy4oLElwcquGSz692DzgZQrCLScPNs5YlC4g==
13705+
dependencies:
13706+
"@types/node" "*"
13707+
merge-stream "^2.0.0"
13708+
supports-color "^8.0.0"
13709+
1370113710
jest@^27.0.6, jest@^27.1.0:
1370213711
version "27.2.5"
1370313712
resolved "https://registry.yarnpkg.com/jest/-/jest-27.2.5.tgz#7d8a5c8781a160f693beeb7c68e46c16ef948148"
@@ -21716,15 +21725,6 @@ url-loader@^1.0.1:
2171621725
mime "^2.0.3"
2171721726
schema-utils "^1.0.0"
2171821727

21719-
url-loader@^4.1.1:
21720-
version "4.1.1"
21721-
resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-4.1.1.tgz#28505e905cae158cf07c92ca622d7f237e70a4e2"
21722-
integrity sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==
21723-
dependencies:
21724-
loader-utils "^2.0.0"
21725-
mime-types "^2.1.27"
21726-
schema-utils "^3.0.0"
21727-
2172821728
url-parse-lax@^1.0.0:
2172921729
version "1.0.0"
2173021730
resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73"

0 commit comments

Comments
 (0)