From c40b0f8b3175c64206da629772bbaadac8113df8 Mon Sep 17 00:00:00 2001 From: Kelly Mears Date: Sun, 30 Jun 2024 04:58:54 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=A6=20deps(patch):=20upgrade=20eslint-?= =?UTF-8?q?webpack-plugin=20(#2620)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Transitioning to eslint@9 is not going to be simple, but this gets us started: - Update: eslint-webpack-plugin to v4.2.0 - Examples: add examples/eslint-9.0.0 ## Type of change **PATCH: backwards compatible change** --- examples/eslint-9.x.x/eslint.config.js | 6 + examples/eslint-9.x.x/package.json | 15 +++ examples/eslint-9.x.x/src/index.js | 1 + examples/eslint-9.x.x/tsconfig.json | 13 ++ sources/@roots/bud-eslint/package.json | 2 +- yarn.lock | 166 +++++++++++++++++++++++-- 6 files changed, 193 insertions(+), 10 deletions(-) create mode 100644 examples/eslint-9.x.x/eslint.config.js create mode 100644 examples/eslint-9.x.x/package.json create mode 100644 examples/eslint-9.x.x/src/index.js create mode 100644 examples/eslint-9.x.x/tsconfig.json diff --git a/examples/eslint-9.x.x/eslint.config.js b/examples/eslint-9.x.x/eslint.config.js new file mode 100644 index 0000000000..c47f301366 --- /dev/null +++ b/examples/eslint-9.x.x/eslint.config.js @@ -0,0 +1,6 @@ +export default { + rules: { + semi: 'error', + 'prefer-const': 'error', + }, +} diff --git a/examples/eslint-9.x.x/package.json b/examples/eslint-9.x.x/package.json new file mode 100644 index 0000000000..3b40f69013 --- /dev/null +++ b/examples/eslint-9.x.x/package.json @@ -0,0 +1,15 @@ +{ + "name": "@examples/eslint-9.x.x", + "$schema": "https://bud.js.org/bud.package.json", + "private": true, + "type": "module", + "browserslist": [ + "extends @roots/browserslist-config" + ], + "devDependencies": { + "@roots/bud": "workspace:*", + "@roots/bud-eslint": "workspace:*", + "@roots/eslint-config": "workspace:*", + "eslint": "9.6.0" + } +} diff --git a/examples/eslint-9.x.x/src/index.js b/examples/eslint-9.x.x/src/index.js new file mode 100644 index 0000000000..1aefe25f39 --- /dev/null +++ b/examples/eslint-9.x.x/src/index.js @@ -0,0 +1 @@ +console.log('eslint should error') diff --git a/examples/eslint-9.x.x/tsconfig.json b/examples/eslint-9.x.x/tsconfig.json new file mode 100644 index 0000000000..27afbacb39 --- /dev/null +++ b/examples/eslint-9.x.x/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "@roots/bud/config/tsconfig.json", + "compilerOptions": { + "allowJs": true, + "paths": { + "@src/*": ["./src/*"] + }, + "types": ["@roots/bud", "@roots/bud-eslint"] + }, + "files": ["./bud.config.ts"], + "include": ["./src"], + "exclude": ["./dist"] +} diff --git a/sources/@roots/bud-eslint/package.json b/sources/@roots/bud-eslint/package.json index ab02d3ec60..cfceefc693 100644 --- a/sources/@roots/bud-eslint/package.json +++ b/sources/@roots/bud-eslint/package.json @@ -90,7 +90,7 @@ "@roots/bud-framework": "workspace:*", "@roots/bud-support": "workspace:*", "eslint": "8.57.0", - "eslint-webpack-plugin": "4.1.0", + "eslint-webpack-plugin": "4.2.0", "tslib": "2.6.2", "webpack": "5.91.0" }, diff --git a/yarn.lock b/yarn.lock index e5a045e20e..a233c2c581 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8315,6 +8315,17 @@ __metadata: languageName: node linkType: hard +"@eslint/config-array@npm:^0.17.0": + version: 0.17.0 + resolution: "@eslint/config-array@npm:0.17.0" + dependencies: + "@eslint/object-schema": "npm:^2.1.4" + debug: "npm:^4.3.1" + minimatch: "npm:^3.1.2" + checksum: 97eb23ef0948dbc5f24884a3b75c537ca37ee2b1f27a864cd0d9189c089bc1a724dc6e1a4d9b7dd304d9f732ca02aa7916243a7715d6f1f17159d8a8c83f0c9e + languageName: node + linkType: hard + "@eslint/eslintrc@npm:^2.1.4": version: 2.1.4 resolution: "@eslint/eslintrc@npm:2.1.4" @@ -8332,6 +8343,23 @@ __metadata: languageName: node linkType: hard +"@eslint/eslintrc@npm:^3.1.0": + version: 3.1.0 + resolution: "@eslint/eslintrc@npm:3.1.0" + dependencies: + ajv: "npm:^6.12.4" + debug: "npm:^4.3.2" + espree: "npm:^10.0.1" + globals: "npm:^14.0.0" + ignore: "npm:^5.2.0" + import-fresh: "npm:^3.2.1" + js-yaml: "npm:^4.1.0" + minimatch: "npm:^3.1.2" + strip-json-comments: "npm:^3.1.1" + checksum: 5b7332ed781edcfc98caa8dedbbb843abfb9bda2e86538529c843473f580e40c69eb894410eddc6702f487e9ee8f8cfa8df83213d43a8fdb549f23ce06699167 + languageName: node + linkType: hard + "@eslint/js@npm:8.57.0": version: 8.57.0 resolution: "@eslint/js@npm:8.57.0" @@ -8339,6 +8367,20 @@ __metadata: languageName: node linkType: hard +"@eslint/js@npm:9.6.0": + version: 9.6.0 + resolution: "@eslint/js@npm:9.6.0" + checksum: 83967a7e59f2e958c9bbb3acd0929cad00d59d927ad786ed8e0d30b07f983c6bea3af6f4ad32da32145db40b7a741a816ba339bdd8960fc7fc8231716d943b7f + languageName: node + linkType: hard + +"@eslint/object-schema@npm:^2.1.4": + version: 2.1.4 + resolution: "@eslint/object-schema@npm:2.1.4" + checksum: e9885532ea70e483fb007bf1275968b05bb15ebaa506d98560c41a41220d33d342e19023d5f2939fed6eb59676c1bda5c847c284b4b55fce521d282004da4dda + languageName: node + linkType: hard + "@examples/babel-advanced@workspace:examples/babel-advanced": version: 0.0.0-use.local resolution: "@examples/babel-advanced@workspace:examples/babel-advanced" @@ -8458,6 +8500,17 @@ __metadata: languageName: unknown linkType: soft +"@examples/eslint-9.x.x@workspace:examples/eslint-9.x.x": + version: 0.0.0-use.local + resolution: "@examples/eslint-9.x.x@workspace:examples/eslint-9.x.x" + dependencies: + "@roots/bud": "workspace:*" + "@roots/bud-eslint": "workspace:*" + "@roots/eslint-config": "workspace:*" + eslint: "npm:9.6.0" + languageName: unknown + linkType: soft + "@examples/eslint-bud-config@workspace:examples/eslint-bud-config": version: 0.0.0-use.local resolution: "@examples/eslint-bud-config@workspace:examples/eslint-bud-config" @@ -9037,6 +9090,13 @@ __metadata: languageName: node linkType: hard +"@humanwhocodes/retry@npm:^0.3.0": + version: 0.3.0 + resolution: "@humanwhocodes/retry@npm:0.3.0" + checksum: 7111ec4e098b1a428459b4e3be5a5d2a13b02905f805a2468f4fa628d072f0de2da26a27d04f65ea2846f73ba51f4204661709f05bfccff645e3cedef8781bb6 + languageName: node + linkType: hard + "@iarna/toml@npm:^2.2.5": version: 2.2.5 resolution: "@iarna/toml@npm:2.2.5" @@ -11613,7 +11673,7 @@ __metadata: "@types/eslint": "npm:8.56.10" "@types/node": "npm:20.12.8" eslint: "npm:8.57.0" - eslint-webpack-plugin: "npm:4.1.0" + eslint-webpack-plugin: "npm:4.2.0" tslib: "npm:2.6.2" webpack: "npm:5.91.0" languageName: unknown @@ -13964,7 +14024,7 @@ __metadata: languageName: node linkType: hard -"@types/eslint@npm:8.56.10, @types/eslint@npm:^8.56.5": +"@types/eslint@npm:8.56.10, @types/eslint@npm:^8.56.10": version: 8.56.10 resolution: "@types/eslint@npm:8.56.10" dependencies: @@ -18096,6 +18156,15 @@ __metadata: languageName: node linkType: hard +"acorn@npm:^8.12.0": + version: 8.12.0 + resolution: "acorn@npm:8.12.0" + bin: + acorn: bin/acorn + checksum: a19f9dead009d3b430fa3c253710b47778cdaace15b316de6de93a68c355507bc1072a9956372b6c990cbeeb167d4a929249d0faeb8ae4bb6911d68d53299549 + languageName: node + linkType: hard + "acorn@npm:^8.9.0": version: 8.10.0 resolution: "acorn@npm:8.10.0" @@ -24548,6 +24617,16 @@ __metadata: languageName: node linkType: hard +"eslint-scope@npm:^8.0.1": + version: 8.0.1 + resolution: "eslint-scope@npm:8.0.1" + dependencies: + esrecurse: "npm:^4.3.0" + estraverse: "npm:^5.2.0" + checksum: 0ec40ab284e58ac7ef064ecd23c127e03d339fa57173c96852336c73afc70ce5631da21dc1c772415a37a421291845538dd69db83c68d611044c0fde1d1fa269 + languageName: node + linkType: hard + "eslint-visitor-keys@npm:^2.1.0": version: 2.1.0 resolution: "eslint-visitor-keys@npm:2.1.0" @@ -24569,19 +24648,26 @@ __metadata: languageName: node linkType: hard -"eslint-webpack-plugin@npm:4.1.0": - version: 4.1.0 - resolution: "eslint-webpack-plugin@npm:4.1.0" +"eslint-visitor-keys@npm:^4.0.0": + version: 4.0.0 + resolution: "eslint-visitor-keys@npm:4.0.0" + checksum: 76619f42cf162705a1515a6868e6fc7567e185c7063a05621a8ac4c3b850d022661262c21d9f1fc1d144ecf0d5d64d70a3f43c15c3fc969a61ace0fb25698cf5 + languageName: node + linkType: hard + +"eslint-webpack-plugin@npm:4.2.0": + version: 4.2.0 + resolution: "eslint-webpack-plugin@npm:4.2.0" dependencies: - "@types/eslint": "npm:^8.56.5" + "@types/eslint": "npm:^8.56.10" jest-worker: "npm:^29.7.0" micromatch: "npm:^4.0.5" normalize-path: "npm:^3.0.0" schema-utils: "npm:^4.2.0" peerDependencies: - eslint: ^8.0.0 + eslint: ^8.0.0 || ^9.0.0 webpack: ^5.0.0 - checksum: 29ccc75ac50d765a254336e073342f33bac0b230512753c763ac783c6d3f15e36a9266371a31547253c5cf0d630be290f54268f99f37c8acbebc88304f5678b9 + checksum: cf5c9b7afa3c025fffadb3e1451e7a55d914c3070614bb4d57f887774d164ca4298bb777f7c3afa16f47af9869174a19d6aebb4d1ca719bc2cc49f2eccd71a3b languageName: node linkType: hard @@ -24633,6 +24719,50 @@ __metadata: languageName: node linkType: hard +"eslint@npm:9.6.0": + version: 9.6.0 + resolution: "eslint@npm:9.6.0" + dependencies: + "@eslint-community/eslint-utils": "npm:^4.2.0" + "@eslint-community/regexpp": "npm:^4.6.1" + "@eslint/config-array": "npm:^0.17.0" + "@eslint/eslintrc": "npm:^3.1.0" + "@eslint/js": "npm:9.6.0" + "@humanwhocodes/module-importer": "npm:^1.0.1" + "@humanwhocodes/retry": "npm:^0.3.0" + "@nodelib/fs.walk": "npm:^1.2.8" + ajv: "npm:^6.12.4" + chalk: "npm:^4.0.0" + cross-spawn: "npm:^7.0.2" + debug: "npm:^4.3.2" + escape-string-regexp: "npm:^4.0.0" + eslint-scope: "npm:^8.0.1" + eslint-visitor-keys: "npm:^4.0.0" + espree: "npm:^10.1.0" + esquery: "npm:^1.5.0" + esutils: "npm:^2.0.2" + fast-deep-equal: "npm:^3.1.3" + file-entry-cache: "npm:^8.0.0" + find-up: "npm:^5.0.0" + glob-parent: "npm:^6.0.2" + ignore: "npm:^5.2.0" + imurmurhash: "npm:^0.1.4" + is-glob: "npm:^4.0.0" + is-path-inside: "npm:^3.0.3" + json-stable-stringify-without-jsonify: "npm:^1.0.1" + levn: "npm:^0.4.1" + lodash.merge: "npm:^4.6.2" + minimatch: "npm:^3.1.2" + natural-compare: "npm:^1.4.0" + optionator: "npm:^0.9.3" + strip-ansi: "npm:^6.0.1" + text-table: "npm:^0.2.0" + bin: + eslint: bin/eslint.js + checksum: 82ea5ad3f28aaef89e2a98f4e6df0eae9d4e16ccd6d667c69977042e0b103fa5df98bf16d3df72d1ae77edd8c1dccfdf4afa2a55309aa8081a1bc54af6229826 + languageName: node + linkType: hard + "esniff@npm:^2.0.1": version: 2.0.1 resolution: "esniff@npm:2.0.1" @@ -24645,6 +24775,17 @@ __metadata: languageName: node linkType: hard +"espree@npm:^10.0.1, espree@npm:^10.1.0": + version: 10.1.0 + resolution: "espree@npm:10.1.0" + dependencies: + acorn: "npm:^8.12.0" + acorn-jsx: "npm:^5.3.2" + eslint-visitor-keys: "npm:^4.0.0" + checksum: 52e6feaa77a31a6038f0c0e3fce93010a4625701925b0715cd54a2ae190b3275053a0717db698697b32653788ac04845e489d6773b508d6c2e8752f3c57470a0 + languageName: node + linkType: hard + "espree@npm:^9.6.0, espree@npm:^9.6.1": version: 9.6.1 resolution: "espree@npm:9.6.1" @@ -24666,7 +24807,7 @@ __metadata: languageName: node linkType: hard -"esquery@npm:^1.4.2": +"esquery@npm:^1.4.2, esquery@npm:^1.5.0": version: 1.5.0 resolution: "esquery@npm:1.5.0" dependencies: @@ -26861,6 +27002,13 @@ __metadata: languageName: node linkType: hard +"globals@npm:^14.0.0": + version: 14.0.0 + resolution: "globals@npm:14.0.0" + checksum: b96ff42620c9231ad468d4c58ff42afee7777ee1c963013ff8aabe095a451d0ceeb8dcd8ef4cbd64d2538cef45f787a78ba3a9574f4a634438963e334471302d + languageName: node + linkType: hard + "globals@npm:^15.0.0": version: 15.1.0 resolution: "globals@npm:15.1.0"