JavaScript Function Parens Rule


(Jeff Mathers) #1

SonarQube 7+
Rule Error/Deviation javascript:S3524 is inconsistent with ES2015
Hi All,

Hoping this is the right place for this question.

This rule is not exactly consistent with ES2015. The standard says that when a single parameter arrow function has a function with parens, then the parens around the argument should be included. The rule is missing that nuance and my developers are complaining. Basically I think this rule needs a couple of more true/false options so that it could be configured to be this rule.

The rule includes this option: { "requireForBlockBody": true }, but this is not in the SQ rule as far as I can tell.

What is the best way to proceed with seeing if this can be fixed/updated?


(Elena Vilchik) #3

Hello @Jeff_Mathers,

Thanks for this feedback. Are you referencing airbnb standard? (

I created ticket in SonarJS to fix your problem But I’m not sure it will be implemented soon.

One option for you will be to deactivate SonarJS rule and import ESLint issues as external (see docs).


(Jeff Mathers) #4

Yes - but I think the AirBNB standard is the same as ES2015 in this case. It is really only a minor issue so as long as it is corrected at some point that would be fantastic.