Skip to content

Commit

Permalink
Add .mjs and .jsx to the list of extensions for JavaScript files
Browse files Browse the repository at this point in the history
Fixes #1656
  • Loading branch information
marco-c committed Nov 25, 2022
1 parent 87908e4 commit 54befc0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions addon/assets/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
"hxx",
"js",
"jsm",
"mjs",
"jsx",
"xul",
"xml",
"html",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export function filterLanguages(files) {
"inc"
];
const js = isEnabled("js");
const jsExtensions = ["js", "jsm", "xml", "xul", "xhtml", "html"];
const jsExtensions = ["js", "jsm", "mjs", "jsx", "xml", "xul", "xhtml", "html"];
const java = isEnabled("java");
const javaExtensions = ["java"];
const rust = isEnabled("rust");
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ async function showFile(source, file, revision, selectedLine) {
language = "cpp";
} else if (file.path.endsWith("c")) {
language = "c";
} else if (file.path.endsWith("js") || file.path.endsWith("jsm")) {
} else if (file.path.endsWith("js") || file.path.endsWith("jsm") || file.path.endsWith("mjs") || file.path.endsWith("jsx")) {
language = "javascript";
} else if (file.path.endsWith("css")) {
language = "css";
Expand Down
2 changes: 2 additions & 0 deletions tools/code_coverage_tools/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
# JavaScript
"js",
"jsm",
"mjs",
"jsx",
"xul",
"xml",
"html",
Expand Down

0 comments on commit 54befc0

Please sign in to comment.