You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This will mostly be a result of an unexpected ESLint config, but will represent an additional hurdle for anyone using your great CLI utility who's migrating to the flat config and learning the ropes.
For .js/.cjs/.mjs files eslint --print-config seems to always have a default configuration where rules exists, even when ESLint config is empty, but in case ESLint has not been successfully configured for TypeScript eslint --print-config index.ts will return undefined, so not even an empty object, which causes the CLI utility to fail.
This is not related to the flat config, it was also a thing that could happen before as well, but I only ran into it while migrating to the flat config because of a breaking change in glob matching.
Proposed solution
Initially I thought that the right thing to do is to tell the user that the config is a-ok and that it doesn't conflict with Prettier, but on second thought people shouldn't be checking files that have no ESLint configuration, so I still think that the error message is a good idea, but the one that describes what's actually wrong. This file has no ESLint configuration, or something like that.
What do you think?
The text was updated successfully, but these errors were encountered:
This will mostly be a result of an unexpected ESLint config, but will represent an additional hurdle for anyone using your great CLI utility who's migrating to the flat config and learning the ropes.
For
.js
/.cjs
/.mjs
fileseslint --print-config
seems to always have a default configuration whererules
exists, even when ESLint config is empty, but in case ESLint has not been successfully configured for TypeScripteslint --print-config index.ts
will returnundefined
, so not even an empty object, which causes the CLI utility to fail.This is not related to the flat config, it was also a thing that could happen before as well, but I only ran into it while migrating to the flat config because of a breaking change in glob matching.
Proposed solution
Initially I thought that the right thing to do is to tell the user that the config is a-ok and that it doesn't conflict with Prettier, but on second thought people shouldn't be checking files that have no ESLint configuration, so I still think that the error message is a good idea, but the one that describes what's actually wrong.
This file has no ESLint configuration
, or something like that.What do you think?
The text was updated successfully, but these errors were encountered: