Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • react/sort-comp
  • react/jsx-one-expression-per-line
  • react/jsx-closing-bracket-location
  • react/jsx-closing-tag-location

  • react/jsx-wrap-multilines

  • react/jsx-curly-spacingspacing 

  • no-array-constructor

key-spacing

currently: "key-spacing": "off"

...

Code Block
/* "react/jsx-curly-spacing": ["error", {"when": "never", "children": true}] */

<Hello name={firstname} />;
<Hello name={{ firstname: 'John', lastname: 'Doe' }} />;
<Hello name={
  firstname
} />;
<Hello>{firstname}</Hello>;
<Hello>{
  firstname
}</Hello>;

no-array-constructor

This rule partly covers SonarCloud rule

Examples of incorrect code for this rule:

Code Block
/*eslint no-array-constructor: "error"*/ 
Array(0, 1, 2)
new Array(0, 1, 2)

Examples of correct code for this rule:

Code Block
/*eslint no-array-constructor: "error"*/ 
Array(500)