microsoft/rushstack

[eslint-patch] Upgrade to ESLint 9

Closed this issue ยท 4 comments

ESLint v9.0.0 is released ๐ŸŽ‰

It would be awesome to have official ESLint 9 support. ๐Ÿ™‚

I'm pretty sure there are a bunch of breaking changes in ESLint 9, so this may take some effort. If someone wants to take that on, we'd happily take it. For now, it'll be a lower priority for our team.

Even with recent fixup https://eslint.org/blog/2024/05/eslint-compatibility-utilities/ it fails:

Oops! Something went wrong! :(

ESLint: 9.2.0

Error: Failed to patch ESLint because the calling module was not recognized.
If you are using a newer ESLint version that may be unsupported, please create a GitHub issue:
https://github.com/microsoft/rushstack/issues
    at Object.<anonymous> (/xxx/node_modules/@rushstack/eslint-patch/lib/_patch-base.js:165:19)
    at Module._compile (node:internal/modules/cjs/loader:1375:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1434:10)
    at Module.load (node:internal/modules/cjs/loader:1206:32)
    at Module._load (node:internal/modules/cjs/loader:1022:12)
    at Module.require (node:internal/modules/cjs/loader:1234:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (/xxx/node_modules/@rushstack/eslint-patch/lib/modern-module-resolution.js:11:23)
    at Module._compile (node:internal/modules/cjs/loader:1375:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1434:10)

Just in case this helps...

The fixup works with configs (actual objects returned from config), and eslint-patch is usually called inside config. It might be useful to just disable some functionality if ESLint 9 is detected...

Thanks @nzakas for prompt response and fix. I assume we now have to wait for release and propagation to other packages like Next.js rules set?

D4N14L commented

@kirill-konshin yes. Publish is manually triggered. You can either choose to wait for the next publish, or you can request a publish from one of the senior maintainers.