In-file sourceType configuration #8148
Labels
archived due to age
This issue has been archived; please open a new issue for any further discussion
core
Relates to ESLint's core APIs and features
enhancement
This change enhances an existing feature of ESLint
evaluating
The team will evaluate this issue to decide whether it meets the criteria for inclusion
Currently, the
sourceType
parser option can only be set in the configuration file for all files in a directory. If one has a mix of bothscript
andmodule
files in the same directory, there's currently no way discern which file is which type.The prime example of this issue should be ava which expects its tests to be written in module syntax, while other files can be plain scripts.
I think a new inline configuration option could elegantly solve the issue:
// eslint-source-type module
The text was updated successfully, but these errors were encountered: