Open Bug 1592910 Opened 5 years ago Updated 2 years ago

`isJSMURI` should check for extension `.jsm.js` too

Categories

(DevTools :: General, defect, P3)

defect

Tracking

(Not tracked)

People

(Reporter: julienw, Unassigned)

References

(Blocks 1 open bug)

Details

See [1].

We started having some files .jsm.js as part of the typescript experiment, because typescript doesn't check other files than .js (JS language) or .ts (typescript language).

I recently noticed this small miss when we started doing that. That's not a problem right now because nothing uses require with such a file for now, but this could be in the future.

It could be worth changing isJS too, to rule out files ending with .jsm.js.

The alternative is to patch (and upstream the patch to) Typescript to allow defining .jsm files to be checked as javascript files.

[1] https://searchfox.org/mozilla-central/rev/1fe0cf575841dbf3b7e159e88ba03260cd1354c0/devtools/shared/base-loader.js#47-49

Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.