generator-eslint icon indicating copy to clipboard operation
generator-eslint copied to clipboard

EBADENGINE for `yo eslint:plugin` under Node.js 18

Open MikeMcC399 opened this issue 2 months ago • 2 comments

Current behavior

When yo eslint:plugin is used to generate a new plugin, using the lowest Node.js version 18.18.0 listed under README > Installation, npm EBADENGINE warnings are output for

npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=20' },
npm WARN EBADENGINE   current: { node: 'v18.18.0', npm: '9.8.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=20' },
npm WARN EBADENGINE   current: { node: 'v18.18.0', npm: '9.8.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '20 || >=22' },
npm WARN EBADENGINE   current: { node: 'v18.18.0', npm: '9.8.1' }
npm WARN EBADENGINE }

This is caused by a regression in [email protected], released on Jun 19, 2025. This npm module dropped support for Node.js 18 without bumping its major version.

Expected behavior

When yo eslint:plugin is used to generate a new plugin, the README > Installation documentation and the engines key in package.json should specify version ranges of Node.js that do not cause EBADENGINE warnings.

Versions

Component Version
Ubuntu 24.04.3 LTS
Node.js v18.18.0 EOL
npm 9.8.1
yo 5.1.0
generator-eslint 5.2.2

Steps to reproduce

npm install yo@latest -g
npm install generator-eslint@latest -g
cd $(mktemp -d)
yo eslint:plugin

and accept defaults:

$ yo eslint:plugin
? What is your name? Tester
? What is the plugin ID? template-test
? Type a short description of this plugin: Template test
? Does this plugin contain custom ESLint rules? Yes
? Does this plugin contain one or more processors? No
   create package.json
   create eslint.config.mjs
   create lib/index.js
   create README.md

Logs

Running npm install for you to install the required dependencies.
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=20' },
npm WARN EBADENGINE   current: { node: 'v18.18.0', npm: '9.8.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '>=20' },
npm WARN EBADENGINE   current: { node: 'v18.18.0', npm: '9.8.1' }
npm WARN EBADENGINE }
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE   package: '[email protected]',
npm WARN EBADENGINE   required: { node: '20 || >=22' },
npm WARN EBADENGINE   current: { node: 'v18.18.0', npm: '9.8.1' }
npm WARN EBADENGINE }

added 242 packages, and audited 243 packages in 5s

71 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

Other

  • Related issue https://github.com/bmish/eslint-doc-generator/issues/807

  • Node.js 18 reached end-of-life on Apr 30, 2025

  • Since [email protected] introduced support for flat configurations, pinning to an earlier version in order to support Node.js 18 would not be desirable.

  • This repo (generator-eslint) should consider now dropping support for Node.js 18, 21 and 23, and then releasing a new major version. Node.js 25 is also close to being released (planned date Oct 15, 2025) and could be added to the CI workflow.

MikeMcC399 avatar Oct 07 '25 13:10 MikeMcC399

Thanks for the report and analysis. In the short-term, are you able to use a more recent Node.js version?

We can update the Node.js version requirements along with the release of v10, so we keep everything consistent.

nzakas avatar Oct 08 '25 14:10 nzakas

@nzakas

Thanks for the report and analysis. In the short-term, are you able to use a more recent Node.js version?

We can update the Node.js version requirements along with the release of v10, so we keep everything consistent.

It's not causing me an issue as such and I don't personally rely on Node.js 18 anymore since it is end-of-life.

I just reported it when I noticed the issue testing out the fix for https://github.com/eslint/generator-eslint/pull/228 as the question of Node.js 18 compatibility was raised in the review discussions.

MikeMcC399 avatar Oct 08 '25 15:10 MikeMcC399