diff --git a/.changeset/pretty-ducks-try.md b/.changeset/pretty-ducks-try.md new file mode 100644 index 000000000000..af44fb6ed1c1 --- /dev/null +++ b/.changeset/pretty-ducks-try.md @@ -0,0 +1,5 @@ +--- +'@modern-js/plugin-lint': patch +--- + +feat(plugin-lint): mark eslint as optional peer dep diff --git a/packages/cli/plugin-lint/package.json b/packages/cli/plugin-lint/package.json index 925f32240d45..91eb85837be6 100644 --- a/packages/cli/plugin-lint/package.json +++ b/packages/cli/plugin-lint/package.json @@ -43,7 +43,6 @@ "@modern-js/tsconfig": "workspace:*", "@modern-js/utils": "workspace:*", "cross-spawn": "^7.0.3", - "eslint": "^8.28.0", "husky": "^8.0.0", "@swc/helpers": "0.5.3" }, @@ -57,6 +56,14 @@ "jest": "^29", "typescript": "^5" }, + "peerDependencies": { + "eslint": "^8.28.0" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + }, "sideEffects": false, "publishConfig": { "registry": "https://registry.npmjs.org/", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 695bc8d340dc..bf6ced40bd30 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9821,8 +9821,8 @@ packages: '@commitlint/types': 17.4.4 '@types/node': 18.11.17 chalk: 4.1.2 - cosmiconfig: 8.3.6(typescript@5.3.3) - cosmiconfig-typescript-loader: 4.3.0(@types/node@18.11.17)(cosmiconfig@8.3.6)(ts-node@10.9.2)(typescript@5.3.3) + cosmiconfig: 8.1.3 + cosmiconfig-typescript-loader: 4.3.0(@types/node@18.11.17)(cosmiconfig@8.1.3)(ts-node@10.9.2)(typescript@5.3.3) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -11646,7 +11646,7 @@ packages: resolution: {integrity: sha512-w9qsxogSrvUBHmBPKjr7vqV9b6HkzcSd7Ps0KhBaB+iAfv2fNumVELA/zWqtRyJdlXvMB0Y3ilYB9+XM17NmNw==} dependencies: '@swc/helpers': 0.5.1 - caniuse-lite: 1.0.30001584 + caniuse-lite: 1.0.30001566 lodash: 4.17.21 rslog: 1.1.0 dev: true @@ -11655,7 +11655,7 @@ packages: resolution: {integrity: sha512-51Uv2oueWru4BvoE7VHai03wT0VZ1VFNPrDXR3Rd3DanRdM5BDBs28mB6+pz68SFQPjK7/f2ZgqRr0FjGWhUvg==} dependencies: '@swc/helpers': 0.5.1 - caniuse-lite: 1.0.30001584 + caniuse-lite: 1.0.30001566 lodash: 4.17.21 rslog: 1.1.0 @@ -13516,7 +13516,7 @@ packages: '@rsbuild/core': 0.4.3 '@rsbuild/shared': 0.4.3(@swc/helpers@0.5.3) acorn: 8.11.2 - caniuse-lite: 1.0.30001584 + caniuse-lite: 1.0.30001588 htmlparser2: 9.1.0 source-map: 0.7.4 transitivePeerDependencies: @@ -13752,7 +13752,7 @@ packages: resolution: {integrity: sha512-TlElZikaX7GhnP1VtnjPuwpgOHmi+06dNk7mZLfPIEB0ksrKewCSedTFxktEa43rGrrGUz6oBAjuxWO8j/ytCA==} dependencies: '@rspack/core': 0.5.3(@swc/helpers@0.5.3) - caniuse-lite: 1.0.30001584 + caniuse-lite: 1.0.30001588 postcss: 8.4.33 transitivePeerDependencies: - '@swc/helpers' @@ -13762,7 +13762,7 @@ packages: resolution: {integrity: sha512-0BbYBexpyYUXucA2ML+NCtueMtyMTtU0lmVEBQS/Nagwc1j5mGVAg9H6WvBTADftDjBBQEFUrC4AsLY+s/slEQ==} dependencies: '@rspack/core': 0.5.4(@swc/helpers@0.5.3) - caniuse-lite: 1.0.30001584 + caniuse-lite: 1.0.30001588 postcss: 8.4.33 transitivePeerDependencies: - '@swc/helpers' @@ -17891,7 +17891,7 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001584 + caniuse-lite: 1.0.30001566 electron-to-chromium: 1.4.605 node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.22.2) @@ -18046,7 +18046,7 @@ packages: resolution: {integrity: sha512-bsTwuIg/BZZK/vreVTYYbSWoe2F+71P7K5QGEX+pT250DZbfU1MQ5prOKpPR+LL6uWKK3KMwMCAS74QB3Um1uw==} dependencies: browserslist: 4.20.2 - caniuse-lite: 1.0.30001584 + caniuse-lite: 1.0.30001566 lodash.memoize: 4.1.2 lodash.uniq: 4.5.0 dev: false @@ -18054,8 +18054,8 @@ packages: /caniuse-lite@1.0.30001566: resolution: {integrity: sha512-ggIhCsTxmITBAMmK8yZjEhCO5/47jKXPu6Dha/wuCS4JePVL+3uiDEBuhu2aIoT+bqTOR8L76Ip1ARL9xYsEJA==} - /caniuse-lite@1.0.30001584: - resolution: {integrity: sha512-LOz7CCQ9M1G7OjJOF9/mzmqmj3jE/7VOmrfw6Mgs0E8cjOsbRXQJHsPBfmBOXDskXKrHLyyW3n7kpDW/4BsfpQ==} + /caniuse-lite@1.0.30001588: + resolution: {integrity: sha512-+hVY9jE44uKLkH0SrUTqxjxqNTOWHsbnQDIKjwkZ3lNTzUUVdBLBGXtj/q5Mp5u98r3droaZAewQuEDzjQdZlQ==} /ccount@1.1.0: resolution: {integrity: sha512-vlNK021QdI7PNeiUh/lKkC/mNHHfV0m/Ad5JoI0TYtlBnJAslM/JIkm/tGC88bkLIwO6OQ5uV6ztS6kVAtCDlg==} @@ -18741,7 +18741,7 @@ packages: /core-util-is@1.0.3: resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} - /cosmiconfig-typescript-loader@4.3.0(@types/node@18.11.17)(cosmiconfig@8.3.6)(ts-node@10.9.2)(typescript@5.3.3): + /cosmiconfig-typescript-loader@4.3.0(@types/node@18.11.17)(cosmiconfig@8.1.3)(ts-node@10.9.2)(typescript@5.3.3): resolution: {integrity: sha512-NTxV1MFfZDLPiBMjxbHRwSh5LaLcPMwNdCutmnHJCKoVnlvldPWlllonKwrsRJ5pYZBIBGRWWU2tfvzxgeSW5Q==} engines: {node: '>=12', npm: '>=6'} peerDependencies: @@ -18751,7 +18751,7 @@ packages: typescript: '>=3' dependencies: '@types/node': 18.11.17 - cosmiconfig: 8.3.6(typescript@5.3.3) + cosmiconfig: 8.1.3 ts-node: 10.9.2(@types/node@18.11.17)(typescript@5.3.3) typescript: 5.3.3 dev: true