Disable specific rule sonar cloud (React, JS)

We have a FE react project.

Last week we noticed that sonarcloud was picking up over 5000 issues relating to JavaScript rule JS:S6774 which dictates that components should validate prop types however as we are using js and not ts we have no desire to do this in the application or the time to go back and do it 5000+ times. (Even the react docs just say use typescript instead…)

We would like to disable this rule for this project. Is there a way to do this?


Welcome to the community!

You can certainly remove this rule if you’re using a custom Quality Profile. If you’re using the Sonar way profile, you’ll need to make a copy of it, edit your copy, and either set it as your default or explicitly tie it to the project in question. The docs should help.


1 Like

Hello @Isaac,

please follow @ganncamp instructions if you are not interested in this rule. However just to clarify this rule is especially for js, as ts already provides type checking. So that’s why we recommend using prop-types when using js (not when using ts)


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.