Quotes
Always use double quotes (
"
) for JSX attributes, but single quotes ('
) for all other JS. eslint:jsx-quotes
Why? Regular HTML attributes also typically use double quotes instead of single, so JSX attributes mirror this convention.
// bad
<Foo bar='bar' />
// good
<Foo bar="bar" />
// bad
<Foo style={{ left: "20px" }} />
// good
<Foo style={{ left: '20px' }} />