-
-
Notifications
You must be signed in to change notification settings - Fork 220
Description
For flat config, we have introduced the concept of sourceType: commonjs to make it easier to deal with CommonJS files.
In order to make this work, ESLint will have to switch sourceType to script and then enable ecmaFeatures.globalReturn. This is an exception case, as sourceType is passed as-is to every parser except for Espree.
To remove this exception case, I'd like to implement sourceType: commonjs in Espree, which would effectively be another way of specifying ecmaFeatures.globalReturn with one exception: the sourceType property of Program nodes would be set to commonjs instead of script.
This would not be a breaking change because everything else behaves the same as it does right now. The only difference in behavior would be when sourceType:commonjs is passed.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status