Search code examples
reactjssonarlintsonarlint-intellij

How to force SonarLint to scan jsx files?


I am using Webstorm 2017.1.3. I have SonarLint plugin with sonar configuration downloaded from our sonar server.

The linting works flawlessly on javascript files with extension .js. However, no linting is performed on .jsx or .scss files.

Since we have quality profiles for almost every kind of source file, I need to see the problems immediately, not after I push the data to repository.

Currently, when I need to lint a JSX file, I have to first rename it to .js, run the linter and then rename it back.

Is there any way to force SonarLint to run on all files instead of the preset file extensions?


Solution

  • It seems that this can be achieved by using the property:

    sonar.javascript.file.suffixes: .js, .jsx