Rel1cx / eslint-react

A series of composable ESLint rules for libraries and frameworks that use React as a UI runtime.
https://eslint-react.xyz
MIT License
144 stars 5 forks source link

[feat] Unmet peer dependencies issue with ESLint v9 #563

Open latin-1 opened 1 month ago

latin-1 commented 1 month ago

Describe the problem

Follow-up #554.

Currently, typescript-eslint v7 -> ESLint v8 and typescript-eslint v8 -> ESLint v9. Combining typescript-eslint v7 and ESlint v9 is not officially supported (although it mostly works). Package managers will complain about unmet peer dependencies if we install eslint@9 and @eslint-react/react-plugin@1 together (either with or without @typescript-eslint/parser@rc-v8).

Until we solve the problem, we should leave an open issue for tracking.

Describe the solution you'd like

.

Alternatives considered

No response

Additional context

Package tmp@workspace:. is requested to provide eslint by its descendants

tmp@workspace:.
└─ @eslint-react/eslint-plugin@npm:1.5.14 [90168] (via ^8.57.0 || ^9.0.0)
   ├─ @typescript-eslint/parser@npm:7.12.0 [81f9e] (via ^8.56.0)
   ├─ @typescript-eslint/type-utils@npm:7.12.0 [81f9e] (via ^8.56.0)
   │  └─ @typescript-eslint/utils@npm:7.12.0 [81f9e] (via ^8.56.0)
   │     └─ @eslint-community/eslint-utils@npm:4.4.0 [fe5b0] (via ^6.0.0 || ^7.0.0 || >=8.0.0)
   ├─ @typescript-eslint/utils@npm:7.12.0 [81f9e] (via ^8.56.0)
   │  └─ ...
   ├─ eslint-plugin-react-core@npm:1.5.14 [81f9e] (via ^8.57.0 || ^9.0.0)
   │  ├─ @typescript-eslint/type-utils@npm:7.12.0 [81f9e] (via ^8.56.0)
   │  │  └─ ...
   │  └─ @typescript-eslint/utils@npm:7.12.0 [81f9e] (via ^8.56.0)
   │     └─ ...
   ├─ eslint-plugin-react-dom@npm:1.5.14 [81f9e] (via ^8.57.0 || ^9.0.0)
   │  └─ @typescript-eslint/utils@npm:7.12.0 [81f9e] (via ^8.56.0)
   │     └─ ...
   ├─ eslint-plugin-react-hooks-extra@npm:1.5.14 [81f9e] (via ^8.57.0 || ^9.0.0)
   │  ├─ @typescript-eslint/type-utils@npm:7.12.0 [81f9e] (via ^8.56.0)
   │  │  └─ ...
   │  └─ @typescript-eslint/utils@npm:7.12.0 [81f9e] (via ^8.56.0)
   │     └─ ...
   └─ eslint-plugin-react-naming-convention@npm:1.5.14 [81f9e] (via ^8.57.0 || ^9.0.0)
      ├─ @typescript-eslint/type-utils@npm:7.12.0 [81f9e] (via ^8.56.0)
      │  └─ ...
      └─ @typescript-eslint/utils@npm:7.12.0 [81f9e] (via ^8.56.0)
         └─ ...

✘ Package tmp@workspace:. provides eslint with version 9.4.0, which does not satisfy all requests.
  The combined requested range is ^8.57.0
Rel1cx commented 4 days ago

Reopening this issue for now, typescript-eslint v8 is not stable enough to run in production.

latin-1 commented 3 days ago

@Rel1cx Would you mind sharing the stability issue with typescript-eslint v8, or will it be reported to the upstream? Thanks

Rel1cx commented 3 days ago

@Rel1cx Would you mind sharing the stability issue with typescript-eslint v8, or will it be reported to the upstream? Thanks

Of course, rules that require type-checking (no-leaked-conditional-rendering and prefer-read-only-props) sometimes fail on CI, but always pass on local machines (macOS M2 Pro and Win11). https://github.com/Rel1cx/eslint-react/actions/runs/9811055284/job/27092520365?pr=615#step:6:38

 Test Files  65 passed (65)
      Tests  2072 passed (2072)
   Start at  00:17:49
   Duration  8.96s (transform 2.96s, setup 5ms, collect 54.99s, tests 11.74s, environment 8ms, prepare 4.13s)

eslint-react [ tseslint-v8][$+][ v20.15.0][⏱ 9s]
❯ fastfetch
                     ..'          Eva@Mac
                 ,xNMM.           -------
               .OMMMMo            OS: macOS Sonoma 14.6 arm64
               lMM"               Host: Mac mini (M2, 2023, Four Thunderbolt 4 ports)
     .;loddo:.  .olloddol;.       Kernel: Darwin 23.6.0

I am trying to find the root of the cause.