PSA: When landing new ES modules into the tree please use the `.mjs` file extension. For system ES modules, please continue using the `.sys.mjs` extension.

Using `.mjs` will automatically signal to ESLint and other tools that they are ES modules, rather than regular JavaScript files. Hence this will avoid you needing to manually tell ESLint via .eslintrc.js files.

This also turns on some other rules for the module files which are useful to have, for example, checking for no-unused-vars on the global scope.

If you have a specific case where for some reason `.mjs` can't be used, please have a chat in #lint:mozilla.org (Lint and Formatting) on Matrix and we can figure out an appropriate alternative.

There are some pre-existing cases of ES module files in the tree that still use `.js`, which we are working towards changing <https://bugzilla.mozilla.org/show_bug.cgi?id=1773467>.

Mark.

--
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/8484e22c-defc-1a57-f018-c637ddf19619%40mozilla.com.

Reply via email to