Skip to content

Latest commit

 

History

History
27 lines (18 loc) · 688 Bytes

no-unnecessary-curly-parens.md

File metadata and controls

27 lines (18 loc) · 688 Bytes

no-unnecessary-curly-parens

🔧 The --fix option on the command line can automatically fix some of the problems reported by this rule.

Parentheses are used to wrap helpers within mustache expressions. The only situation where it is required to wrap the entire mustache expression is when invoking a helper without providing any arguments.

Examples

This rule forbids the following:

{{(concat "a" "b")}}
{{(helper a="b")}}

This rule allows the following:

{{foo}}
{{(foo)}}
{{concat "a" "b"}}
{{concat (capitalize "foo") "-bar"}}

References