Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for mjs files #14828

Closed
ramykl opened this issue Jul 23, 2021 · 1 comment
Closed

Add support for mjs files #14828

ramykl opened this issue Jul 23, 2021 · 1 comment
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

Comments

@ramykl
Copy link

ramykl commented Jul 23, 2021

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:

  1. include .mjs files in the glob pattern for default linting
  2. add extensions support to the top level of the config file to allow adding the custom extensions easily to ESLint

Currently, 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)

@ramykl ramykl added 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 labels Jul 23, 2021
@eslint-github-bot eslint-github-bot bot added this to Needs Triage in Triage Jul 23, 2021
@nzakas
Copy link
Member

nzakas commented Jul 24, 2021

Already covered by #14588

@nzakas nzakas closed this as completed Jul 24, 2021
Triage automation moved this from Needs Triage to Complete Jul 24, 2021
@eslint-github-bot eslint-github-bot bot locked and limited conversation to collaborators Jan 21, 2022
@eslint-github-bot eslint-github-bot bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label Jan 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Archived in project
Triage
Complete
Development

No branches or pull requests

2 participants