"jsx-single" enforces single quotes for JSX attributes.
"jsx-double" enforces double quotes for JSX attributes.
"avoid-template" forbids single-line untagged template strings that do not contain string interpolations.
Note that backticks may still be used if "avoid-escape" is enabled and both single and double quotes are
present in the string (the latter option takes precedence).
"avoid-escape" allows you to use the "other" quotemark in cases where escaping would normally be required.
For example, [true, "double", "avoid-escape"] would not report a failure on the string literal
'Hello "World"'.
In the code above, the author almost certainly meant for both foo++ and bar++
to be executed only if foo === bar. However, they forgot braces and bar++ will be executed
no matter what. This rule could prevent such a mistake.
Notes
Has Fix
Config
One of the following options may be provided:
"as-needed" forbids any unnecessary curly braces.
"ignore-same-line" skips checking braces for control-flow statements
that are on one line and start on the same line as their control-flow keyword