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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support "Flat Config" (ESLint 9) #80

Open
Tracked by #18093
JoshuaKGoldberg opened this issue Feb 13, 2024 · 1 comment
Open
Tracked by #18093

Support "Flat Config" (ESLint 9) #80

JoshuaKGoldberg opened this issue Feb 13, 2024 · 1 comment

Comments

@JoshuaKGoldberg
Copy link

JoshuaKGoldberg commented Feb 13, 2024

馃憢 Coming over from eslint/eslint#18093: ESLint is migrating to a new "flat config" format that will be the default in ESLint v9.

It doesn't look like eslint-config-canonical has support yet. Just for fun, I tried it out in a repository with the new eslint.config.js:

// eslint.config.js

import eslint from "@eslint/js";
import canonical from "eslint-config-canonical";

export default [eslint.configs.recommended, canonical];

...and got an error from @rushstack/eslint-patch (microsoft/rushstack#4372):

$ npx eslint .
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> (/Users/josh/repos/repros/node_modules/@rushstack/eslint-patch/lib/_patch-base.js:166:19)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)
    at Module.load (node:internal/modules/cjs/loader:1207:32)
    at Module._load (node:internal/modules/cjs/loader:1023:12)
    at Module.require (node:internal/modules/cjs/loader:1235:19)
    at require (node:internal/modules/helpers:176:18)
    at Object.<anonymous> (/Users/josh/repos/repros/node_modules/@rushstack/eslint-patch/lib/modern-module-resolution.js:11:23)
    at Module._compile (node:internal/modules/cjs/loader:1376:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1435:10)

Does that mean eslint-config-canonical is blocked on microsoft/rushstack#4372 for supporting flat config?

I'm posting this issue here as a reference & cross-linking it to the table in eslint/eslint#18093. If there's anything blocking the extension from supporting flat configs, please let us know - we'd be happy to try to help! 馃挏

Additional resources:

@gajus
Copy link
Owner

gajus commented Feb 14, 2024

Pretty sure @rushstack/eslint-patch will need to be removed in order to support flat config.

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

2 participants