-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Enhancement: support ESLint's new defineConfig
string config references
#10934
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
Comments
Unfortunately the new string references ignore where we have provided flat configs for users - via Instead it tries to access the configs via the plugin - I.e. Via We will continue to work this way for the foreseeable future. We cannot and will not change the plugin to break legacy config users. For now please use our existing supported and documented method to access our flat configs. https://typescript-eslint.io/users/configs Once eslint advances the backwards compatibility story here we can revisit this. See this eslint core issue for that: eslint/eslint#18095 |
Alright, yeah that makes sense. Thanks for the quick response :) |
Reopening this in light of eslint/eslint#19513 being resolved 🚀. As I understand it, the action item on our side for now would be to export our flat configs on the plugin object with the Not sure if it's critical but we probably want to do this in a way that ensures that |
defineConfig
string config references
Uh oh!
There was an error while loading. Please reload this page.
Before You File a Proposal Please Confirm You Have Done The Following...
Relevant Package
typescript-eslint
My proposal is suitable for this project
Description
With ESLint v9.22 they added their own
defineConfig
config helper (similar toconfig
), which does again supportextends
. I of course immediately tried to rewrite my ESLint config to use the new helper:Running
npx eslint
fails with the following error:My understandig is that when given
ts/strict
ESLint tries to accessts.plugin.configs.strict
, which is not the same asts.configs.strict
and not compatible with flat configs.Additional Info
I marked this as enhancement and not as bug because the "fix" is to simply use
ts.configs.strict
instead of"ts/strict"
(and use the full rule namespace instead of just"ts"
), but I expect the current behavior to be confusing for new users (ESLint shows both options in their docs, but if one of them does not work, it will be confusing).The text was updated successfully, but these errors were encountered: