Bump: Add --ext mjs to default file extensions #13301
Labels
archived due to age
This issue has been archived; please open a new issue for any further discussion
auto closed
The bot closed this issue
bug
ESLint is working incorrectly
triage
An ESLint team member will look at this issue soon
This is the same issue as #9592 that was closed due to old age (and that the TSC, at the time, decided against its consideration).
Now we have 2020, and Browser Modules have shipped in all stable Browser channels, see https://caniuse.com/#feat=es6-module
All Browsers (meaning Firefox, Chromium, Edgium, Safari 12+ and all downstream forks, including WebKitGTK / QTWebKit) accept the
.mjs
ESM module file extension by default and expressively check against theapplication/javascript
header for that specific file extension when being used as<script type="module">
and it can be assumed that this is the defacto standard file extension for ESM modules now.Node.js removed the
--experimental
flag in its stable release channel.The IETF is working on an RFC to include
mjs
as the official file extension in the following Draft: https://tools.ietf.org/html/draft-ietf-dispatch-javascript-mjs-05The Python language adapted
mjs
as the file extension for ESM modules: https://bugs.python.org/issue31715Golang adapted
mjs
as the file extension for ESM modules: net/http: add built-in mime type for *.mjs golang/go#30547Given the circumstances and the state that ESM modules are in, right now, and that
mjs
as a file extension was already pushed out on stable channels of above mentioned implementations - and considering the IETF effort that is put this into an RFC - I think it is safe to say thatmjs
will be the official file extension soon.I hope that the file extension
mjs
can now be reconsidered to be included in the default file extensions that are linted byeslint
.Paste the command you used to run ESLint:
What did you expect to happen?
Are you willing to submit a pull request to fix this bug?
Yes, of course.
The text was updated successfully, but these errors were encountered: