m-a-r-c-e-l-i-n-o
m-a-r-c-e-l-i-n-o

Reputation: 2672

ES Modules (.mjs) support in SonarQube

I can't seem to find this answer anywhere.
Does SonarQube currently support ES modules (.mjs) files?
This is a Node.js (v9.11.1) project.
As of now, I'm not sure if it's a configuration issue on my end, or if it's just lack of support, but it only recognizes and analyzes .js files.

Upvotes: 2

Views: 330

Answers (1)

Stas Vilchik
Stas Vilchik

Reputation: 439

You just need to add .mjs to the list of file extensions. You can do that in the project (or global) settings:

enter image description here

You can also set this configuration via the "sonar.javascript.file.suffixes" key on the "sonar-project.properties" file. For example: sonar.javascript.file.suffixes=.js,.jsx,.vue,.mjs

Upvotes: 2

Related Questions