Change Request: Default languageOptions for languages #18985
Labels
accepted
There is consensus among the team that this change meets the criteria for inclusion
core
Relates to ESLint's core APIs and features
enhancement
This change enhances an existing feature of ESLint
ESLint version
HEAD
What problem do you want to solve?
Right now, we have some default languageOptions for JavaScript that are specified in the core. This ensures that
context.languageOptions.parser
is always an object even if it's never overwritten.Once we pull the JS functionality out of the core, we'll need to remove this default configuration too, but it has nowhere to go.
Similarly, other language plugins have no way to specify default
languageOptions
that should be applied whenever the language is used.What do you think is the correct solution?
I think we need to let language objects provide a
defaultLanguageOptions
property that the core will read and merge into any config that is using the given language.Another option that doesn't require core changes is for each plugin to export a
base
config (or something like that) that users will then have to manually add to their config array. This doesn't seem like a good option due to the chances of forgetting.Participation
Additional comments
No response
The text was updated successfully, but these errors were encountered: