Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bump eslint-webpack-plugin and fix lintOnError regressions #6787

Merged
merged 1 commit into from Oct 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 9 additions & 6 deletions packages/@vue/cli-plugin-eslint/index.js
Expand Up @@ -25,8 +25,11 @@ module.exports = (api, options) => {

api.chainWebpack(webpackConfig => {
const { lintOnSave } = options
const allWarnings = lintOnSave === true || lintOnSave === 'warning'
const allErrors = lintOnSave === 'error'
const treatAllAsWarnings = lintOnSave === true || lintOnSave === 'warning'
const treatAllAsErrors = lintOnSave === 'error'

const failOnWarning = treatAllAsErrors
const failOnError = !treatAllAsWarnings

/** @type {import('eslint-webpack-plugin').Options & import('eslint').ESLint.Options} */
const eslintWebpackPluginOptions = {
Expand All @@ -44,10 +47,10 @@ module.exports = (api, options) => {
}),
// plugin options
context: cwd,
// https://github.com/webpack-contrib/eslint-webpack-plugin/issues/56
threads: false,
emitWarning: allWarnings,
emitError: allErrors,

failOnWarning,
failOnError,

eslintPath: path.dirname(
resolveModule('eslint/package.json', cwd) ||
resolveModule('eslint/package.json', __dirname)
Expand Down
2 changes: 1 addition & 1 deletion packages/@vue/cli-plugin-eslint/package.json
Expand Up @@ -24,7 +24,7 @@
},
"dependencies": {
"@vue/cli-shared-utils": "^5.0.0-beta.7",
"eslint-webpack-plugin": "2.4.3",
"eslint-webpack-plugin": "^3.1.0",
"globby": "^11.0.2",
"inquirer": "^8.0.0",
"webpack": "^5.22.0",
Expand Down
56 changes: 28 additions & 28 deletions yarn.lock
Expand Up @@ -3238,14 +3238,22 @@
"@types/eslint" "*"
"@types/estree" "*"

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

"@types/eslint@^7.28.2":
version "7.28.2"
resolved "https://registry.yarnpkg.com/@types/eslint/-/eslint-7.28.2.tgz#0ff2947cdd305897c52d5372294e8c76f351db68"
integrity sha512-KubbADPkfoU75KgKeKLsFHXnU4ipH7wYg0TRT33NK3N3yiu7jlFAAoygIWBV+KbuHx/G+AvuGX6DllnK35gfJA==
dependencies:
"@types/estree" "*"
"@types/json-schema" "*"

"@types/estree@*", "@types/estree@^0.0.50":
version "0.0.50"
resolved "https://registry.yarnpkg.com/@types/estree/-/estree-0.0.50.tgz#1e0caa9364d3fccd2931c3ed96fdbeaa5d4cca83"
Expand Down Expand Up @@ -9787,16 +9795,16 @@ eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303"
integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==

eslint-webpack-plugin@2.4.3:
version "2.4.3"
resolved "https://registry.yarnpkg.com/eslint-webpack-plugin/-/eslint-webpack-plugin-2.4.3.tgz#59afc76ab747e47fcc3ccd05375b58cbc5a034d5"
integrity sha512-+15ifHFkGn0gB7lQBe+xgyKcjelxv9xlTutGHEPYBUUj+1Rjrjq3+1REJLJpyAHgpQTatpqkRY1z8gQuyn3Aww==
eslint-webpack-plugin@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/eslint-webpack-plugin/-/eslint-webpack-plugin-3.1.0.tgz#86ee426f076e2d82f9d9eaab12db1de4311c35b2"
integrity sha512-1UTDzwN5br3z3E2bzhuNtjbSsW2EJiIEGdxH8uWRbOsTEEY0zw8QYGHLeQQrClMWO0gD9QuB5uDh6uQ8tbbv5A==
dependencies:
"@types/eslint" "^7.2.4"
arrify "^2.0.1"
jest-worker "^26.6.2"
micromatch "^4.0.2"
schema-utils "^3.0.0"
"@types/eslint" "^7.28.2"
jest-worker "^27.3.1"
micromatch "^4.0.4"
normalize-path "^3.0.0"
schema-utils "^3.1.1"

eslint@^7.32.0:
version "7.32.0"
Expand Down Expand Up @@ -10447,14 +10455,6 @@ file-loader@^3.0.1:
loader-utils "^1.0.2"
schema-utils "^1.0.0"

file-loader@^6.1.1:
version "6.2.0"
resolved "https://registry.yarnpkg.com/file-loader/-/file-loader-6.2.0.tgz#baef7cf8e1840df325e4390b4484879480eebe4d"
integrity sha512-qo3glqyTa61Ytg4u73GultjHGjdRyig3tG6lPtyX/jOEJvHif9uB0/OCI2Kif6ctF3caQTW2G5gym21oAsI4pw==
dependencies:
loader-utils "^2.0.0"
schema-utils "^3.0.0"

file-type@^3.8.0:
version "3.9.0"
resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9"
Expand Down Expand Up @@ -13680,7 +13680,7 @@ jest-watcher@^27.0.0, jest-watcher@^27.2.5:
jest-util "^27.2.5"
string-length "^4.0.1"

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

jest-worker@^27.3.1:
version "27.3.1"
resolved "https://registry.yarnpkg.com/jest-worker/-/jest-worker-27.3.1.tgz#0def7feae5b8042be38479799aeb7b5facac24b2"
integrity sha512-ks3WCzsiZaOPJl/oMsDjaf0TRiSv7ctNgs0FqRr2nARsovz6AWWy4oLElwcquGSz692DzgZQrCLScPNs5YlC4g==
dependencies:
"@types/node" "*"
merge-stream "^2.0.0"
supports-color "^8.0.0"

jest@^27.0.6, jest@^27.1.0:
version "27.2.5"
resolved "https://registry.yarnpkg.com/jest/-/jest-27.2.5.tgz#7d8a5c8781a160f693beeb7c68e46c16ef948148"
Expand Down Expand Up @@ -21716,15 +21725,6 @@ url-loader@^1.0.1:
mime "^2.0.3"
schema-utils "^1.0.0"

url-loader@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/url-loader/-/url-loader-4.1.1.tgz#28505e905cae158cf07c92ca622d7f237e70a4e2"
integrity sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==
dependencies:
loader-utils "^2.0.0"
mime-types "^2.1.27"
schema-utils "^3.0.0"

url-parse-lax@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73"
Expand Down