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

[@wordpress/scripts] eslint has some deprecated modules. #62496

Open
stein2nd opened this issue Jun 12, 2024 · 2 comments · May be fixed by #65648
Open

[@wordpress/scripts] eslint has some deprecated modules. #62496

stein2nd opened this issue Jun 12, 2024 · 2 comments · May be fixed by #65648
Labels
[Status] In Progress Tracking issues with work in progress [Tool] WP Scripts /packages/scripts [Type] Bug An existing feature does not function as intended

Comments

@stein2nd
Copy link

Description

After running 'ncu', 'ncu -u' and 'npm install --force', a deprecated warning was displayed for the internal module 'eslint'.

Step-by-step reproduction instructions

  1. Go to the ‘@wordpress/scripts’ installation folder.
  2. temporarily modernised package.json by running 'ncu' and 'ncu -u'.
  3. run 'npm install --force'.

Screenshots, screen recording, code snippet

npm warn deprecated @humanwhocodes/[email protected]:
Use @eslint/config-array instead
image

npm warn deprecated @humanwhocodes/[email protected]:
Use @eslint/object-schema instead
image

Environment info

System:

  • OS: macOS 14.5
  • CPU: (12) x64 Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz
  • Memory: 97.93 MB / 32.00 GB
  • Shell: 3.2.57 - /bin/bash

Binaries:

  • Node: 22.3.0 - ~/.nodebrew/current/bin/node
  • Yarn: 1.22.22 - /usr/local/bin/yarn
  • npm: 10.8.1 - ~/.nodebrew/current/bin/npm

npmPackages:

  • @babel/core: ^7.24.7 => 7.24.7
  • @babel/preset-env: ^7.24.7 => 7.24.7
  • @pmmmwh/react-refresh-webpack-plugin: ^0.5.15 => 0.5.15
  • @svgr/webpack: ^8.1.0 => 8.1.0
  • @typescript-eslint/eslint-plugin: ^7.13.0 => 7.13.0
  • @typescript-eslint/parser: ^7.13.0 => 7.13.0
  • @webpack-cli/generators: ^3.0.7 => 3.0.7
  • @wordpress/babel-preset-default: ^8.0.0 => 8.0.0
  • @wordpress/browserslist-config: ^6.0.0 => 6.0.0
  • @wordpress/dependency-extraction-webpack-plugin: ^6.0.0 => 6.0.0
  • @wordpress/eslint-plugin: ^19.0.0 => 19.0.0
  • @wordpress/postcss-plugins-preset: ^5.0.0 => 5.0.0
  • @wordpress/scripts: ^28.0.0 => 28.0.0
  • @wordpress/stylelint-config: ^22.0.0 => 22.0.0
  • autoprefixer: ^10.4.19 => 10.4.19
  • babel-loader: ^9.1.3 => 9.1.3
  • browserslist: ^4.23.1 => 4.23.1
  • clean-webpack-plugin: ^4.0.0 => 4.0.0
  • copy-webpack-plugin: ^12.0.2 => 12.0.2
  • core-js: ^3.37.1 => 3.37.1
  • create-prettier: ^1.0.9 => 1.0.9
  • create-stylelint: ^0.4.0 => 0.4.0
  • css-loader: ^7.1.2 => 7.1.2
  • css-minimizer-webpack-plugin: ^7.0.0 => 7.0.0
  • cssnano: ^7.0.2 => 7.0.2
  • dir-archiver: ^2.1.0 => 2.1.0
  • eslint: ^9.4.0 => 9.4.0
  • eslint-config-love: ^52.0.0 => 52.0.0
  • eslint-config-prettier: ^9.1.0 => 9.1.0
  • eslint-config-standard-with-typescript: ^43.0.1 => 43.0.1
  • eslint-plugin-import: ^2.29.1 => 2.29.1
  • eslint-plugin-jest: ^28.6.0 => 28.6.0
  • eslint-plugin-n: ^17.8.1 => 17.8.1
  • eslint-plugin-promise: ^6.2.0 => 6.2.0
  • eslint-webpack-plugin: ^4.2.0 => 4.2.0
  • lodash-es: ^4.17.21 => 4.17.21
  • mini-css-extract-plugin: ^2.9.0 => 2.9.0
  • postcss: ^8.4.38 => 8.4.38
  • postcss-loader: ^8.1.1 => 8.1.1
  • prettier: ^3.3.2 => 3.3.2
  • react-refresh: ^0.14.2 => 0.14.2
  • rtlcss: ^4.1.1 => 4.1.1
  • sass: ^1.77.5 => 1.77.5
  • sass-loader: ^14.2.1 => 14.2.1
  • source-map-loader: ^5.0.0 => 5.0.0
  • style-loader: ^4.0.0 => 4.0.0
  • stylelint: ^16.6.1 => 16.6.1
  • stylelint-config-prettier: ^9.0.5 => 9.0.5
  • stylelint-config-standard: ^36.0.0 => 36.0.0
  • stylelint-config-standard-scss: ^13.1.0 => 13.1.0
  • stylelint-webpack-plugin: ^5.0.1 => 5.0.1
  • svgo: ^3.3.2 => 3.3.2
  • terser-webpack-plugin: ^5.3.10 => 5.3.10
  • ts-loader: ^9.5.1 => 9.5.1
  • typescript: ^5.4.5 => 5.4.5
  • webpack: ^5.92.0 => 5.92.0
  • webpack-bundle-analyzer: ^4.10.2 => 4.10.2
  • webpack-cli: ^5.1.4 => 5.1.4

Please confirm that you have searched existing issues in the repo.

No

Please confirm that you have tested with all plugins deactivated except Gutenberg.

No

@stein2nd stein2nd added the [Type] Bug An existing feature does not function as intended label Jun 12, 2024
@t-hamano t-hamano added the [Tool] WP Scripts /packages/scripts label Jun 12, 2024
@ghostintranslation
Copy link

ghostintranslation commented Jun 18, 2024

The css-loader package upgrade is especially important as it would bring in the new getJson function which would allow a plugin's webpack to be configured so that in the case of using SCSS modules it could export a JSON file containing the mapping of the original css class names with the hashed names.

From the Javascript side it's not a problem as we can import the module and use the classes, but this is required for dynamic blocks as there is no other way from PHP to know and use css classes when they are hashed.

Reference to the getJson function:
https://webpack.js.org/loaders/css-loader/#getjson

@gziolo
Copy link
Member

gziolo commented Dec 20, 2024

I tested it today with the latest @wordpress/scripts version, and it's still an issue:

Image

Now also, eslint is deprecated. @shvlv is working on upgrading to ESlint v9:

@gziolo gziolo linked a pull request Dec 20, 2024 that will close this issue
@gziolo gziolo added the [Status] In Progress Tracking issues with work in progress label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Status] In Progress Tracking issues with work in progress [Tool] WP Scripts /packages/scripts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants