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

@shopify/eslint-plugin: Add support for ESLint v9 and flat config #425

Open
1 of 8 tasks
EvgenyOrekhov opened this issue Jun 9, 2024 · 9 comments
Open
1 of 8 tasks

Comments

@EvgenyOrekhov
Copy link

Overview

ESLint v9 was released 2 months ago: https://eslint.org/blog/2024/04/eslint-v9.0.0-released/

Type

  • New feature
  • Changes to existing features

Motivation

What inspired this feature request? What problems were you facing,
or what else makes you think this should be included?

Impossible to use @shopify/eslint-plugin with ESLint v9

Labels

  • Add the Type: Feature Request label to this issue.

Area

  • Add any relevant Area: <area> labels to this issue

Scope

  • Is this issue related to a specific package?

    • Tag it with the Package: <package_name> label.
  • Is it related to a new package?

    • Tag it with the New package Label

Checklist

  • Please delete the labels section before submitting your issue
  • I have described this issue in a way that is actionable (if possible)
@andyw8
Copy link

andyw8 commented Jul 5, 2024

This is important to address, as there is the danger that updating to ESLint v9 can result in checks being silently skipped:

https://github.com/Shopify/vscode-shopify-metrics/pull/614

@andyw8
Copy link

andyw8 commented Jul 26, 2024

https://github.com/Shopify/web/pull/135110 should help move this forward.

@andyw8
Copy link

andyw8 commented Jul 31, 2024

This should be solved by the latest release:

https://github.com/Shopify/web-configs/releases/tag/%40shopify%2Feslint-plugin%4046.0.0

@BPScott
Copy link
Member

BPScott commented Jul 31, 2024

v46.0.0 migrates us to use flat config, however several of our dependencies do not yet support ESLint v9. We're blocked from going all in on eslint v9 till they update or we institute workarounds.

You can see this in action by trying to bump eslint to v9 within this repository and see that our tests that load and execute our eslint config fails.

It looks like we need to:

  • Update all our eslint-plugin dependencies
  • Migrate from eslint-plugin-node to eslint-plugin-n - as eslint-plugin-node has been dead for 4+ years and n is its maintained successor
  • Wait for @typescript-eslint/eslint-plugin to release a stable v8, (it is currently in beta).
  • Wait for the following packages to bump their eslint support to avoid peerDependency warnings:
warning "workspace-aggregator-42858178-9f3d-4034-bb05-5257dc9d3951 > @shopify/eslint-plugin > @typescript-eslint/[email protected]" has incorrect peer dependency "eslint@^8.56.0".
warning "workspace-aggregator-42858178-9f3d-4034-bb05-5257dc9d3951 > @shopify/eslint-plugin > @typescript-eslint/[email protected]" has incorrect peer dependency "eslint@^8.56.0".
warning "workspace-aggregator-42858178-9f3d-4034-bb05-5257dc9d3951 > @shopify/eslint-plugin > [email protected]" has incorrect peer dependency "eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8".
warning "workspace-aggregator-42858178-9f3d-4034-bb05-5257dc9d3951 > @shopify/eslint-plugin > [email protected]" has incorrect peer dependency "eslint@^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0".

@EvgenyOrekhov
Copy link
Author

TypeScript ESLint v8 has been released https://github.com/typescript-eslint/typescript-eslint/releases/tag/v8.0.0

gnarea added a commit to relaycorp/eslint-config that referenced this issue Sep 12, 2024
Because support for ESLint 9 doesn't seem to be coming any time soon: Shopify/web-configs#425
@ryb73
Copy link

ryb73 commented Oct 1, 2024

I'm curious what the status of this is or if there's any assistance that can be offered? I see that there's an open PR for the eslint-plugin-n migration (#388). Anywhere else could use help or is it just waiting for dependencies at this point?

@BPScott
Copy link
Member

BPScott commented Oct 1, 2024

eslint-plugin-import is still working on ESLint v9 support.

There's nothing to do here - we're still waiting for our dependencies. Things have moved further along compared to July, but they're not there yet.

@ryb73
Copy link

ryb73 commented Oct 1, 2024 via email

@adamxi
Copy link

adamxi commented Oct 11, 2024

Just heads up that the eslint-plugin-import now supports ESLint v9: https://github.com/import-js/eslint-plugin-import/releases/tag/v2.31.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants