Add support for mjs files #14828
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
triage
An ESLint team member will look at this issue soon
Projects
The version of ESLint you are using.
ESLint: 7.31.0
The problem you want to solve.
.mjs
files are becoming commonplace and no longer an experimental feature, so I would expect that they would be linted by ESLint (or at least easy to tell ESLint to look at them), this could either be done by setting ESLint to look at.mjs
files by default or by adding support to the configuration files to add extensions.Your take on the correct solution to problem.
I think there are two potential solutions to this problem:
.mjs
files in the glob pattern for default lintingextensions
support to the top level of the config file to allow adding the custom extensions easily to ESLintCurrently, the only way to get ESLint to run on
.mjs
files is to pass--ext js,mjs
in the command line. Adding this option to the configuration file would help with consistency between the command line API and the package runner.Are you willing to submit a pull request to implement this change?
Yes - I just couldn't find the correct files (so if someone could point me in the right direction I can attempt to make a PR)
The text was updated successfully, but these errors were encountered: