eslint / generator-eslint

A Yeoman generator to help with ESLint development
Other
227 stars 51 forks source link

feat: update templates for eslint v9 #179

Closed aladdin-add closed 3 months ago

aladdin-add commented 4 months ago
  1. use flat config
  2. add .npmrc (package-lock=false), just same as eslint repo
  3. update required node.js & eslint

fixes #172

aladdin-add commented 4 months ago

@mdjermanovic can you push a new release of eslint-config-eslint, to update eslint-plugin-unicorn for eslint v9 support?

aladdin-add commented 4 months ago

friendly ping @mdjermanovic

mdjermanovic commented 4 months ago

@mdjermanovic can you push a new release of eslint-config-eslint, to update eslint-plugin-unicorn for eslint v9 support?

Sorry, I missed this.

I believe eslint-config-eslint is fully ready for a new release in terms of its flat config part. But it still exports an eslintrc config, which we haven't been updating for a while and is probably out-of-sync with the flat config. Since it's a public package, my thinking was to wait for https://github.com/eslint/eslint/pull/18011 (which drops the eslintrc export) before releasing new eslint-config-eslint, but I'm open to other ideas.

aladdin-add commented 4 months ago

The exported eslinrc was exclusively utilized within the eslint repo. Additionally, the progress of https://github.com/eslint/eslint/pull/18011 was blocked by vscode-eslint😅. I am in favor of pushing a release to unblock eslint repos upgrading to eslint v9.

mdjermanovic commented 4 months ago

The exported eslinrc was exclusively utilized within the eslint repo

That's true for our repos, but it's still a public package used by others as well, so the expectation would be that the flat config and eslintrc exports are equivalent, which most likely isn't the case anymore. I left an idea in https://github.com/eslint/eslint/pull/18011#issuecomment-2076870636.

aladdin-add commented 4 months ago

Actually eslintrc was not published to npm, so there should be no external users.

image
mdjermanovic commented 4 months ago

Actually eslintrc was not published to npm, so there should be no external users.

Yes, but there might be when we release it. And I think it's anyway best to release eslint-config-eslint v10 without eslintrc.

aladdin-add commented 4 months ago

Since Node.js 21 reaches end-of-life on June 1, 2024 I suggest to replace it with Node.js 22, which was released already on April 24, 2024. (Also in .github/workflows/ci.yml)

yes, but node v21 is still supported - dropping it is a breaking change. I just added v22.

MikeMcC399 commented 4 months ago

@aladdin-add

You are right about the breaking change. Sorry I didn't notice that!

MikeMcC399 commented 4 months ago

npm reports peer dependency issues due to eslint-doc-generator after using yo eslint:plugin.

https://github.com/eslint/generator-eslint/blob/e0af2aa8f79f125df17b7e69df74d0037215c591/plugin/templates/_package.json#L26