Skip to content

Latest commit

 

History

History
487 lines (177 loc) · 8.69 KB

react.md

File metadata and controls

487 lines (177 loc) · 8.69 KB

React

Prevent missing displayName in a React component definition

✖ Disabled


Forbid certain propTypes (any, array, object)

✖ Disabled


Enforce boolean attributes notation in JSX

✓ Enabled (error)


Validate closing bracket location in JSX

✓ Enabled (error)


Enforce or disallow spaces inside of curly braces in JSX attributes

✓ Enabled (error)


enforce spacing around jsx equals signs

✓ Enabled (error)


Require that the first prop in a JSX element be on a new line when the element is multiline

✓ Enabled (error)


Enforce event handler naming conventions in JSX

✖ Disabled


Validate props indentation in JSX

✓ Enabled (error)


enforce JSX indentation

✓ Enabled (error)


Validate JSX has key prop when in array or iterator

✖ Disabled


Limit maximum of props on a single line in JSX

✖ Disabled


Prevent usage of .bind() in JSX props

✓ Enabled (error)


Prevent duplicate props in JSX

✖ Disabled


Prevent usage of unwrapped JSX strings

✖ Disabled


disallow target="_blank" on links

✖ Disabled


Disallow undeclared variables in JSX

✓ Enabled (error)


Enforce PascalCase for user-defined JSX components

✓ Enabled (error)


specify whether double or single quotes should be used in JSX attributes

✓ Enabled (error)


deprecated in favor of react/jsx-sort-props

✖ Disabled


Enforce props alphabetical sorting

✖ Disabled


Enforce spaces before the closing bracket of self-closing JSX elements

✓ Enabled (error)


Prevent React to be incorrectly marked as unused

✓ Enabled (error)


Prevent variables used in JSX to be incorrectly marked as unused

✓ Enabled (error)


Prevent usage of dangerous JSX properties

✖ Disabled


Prevent usage of deprecated methods

✓ Enabled (warning)


Prevent usage of setState in componentDidMount

✓ Enabled (error)


Prevent usage of setState in componentDidUpdate

✓ Enabled (error)


Prevent direct mutation of this.state

✖ Disabled


Prevent usage of isMounted

✓ Enabled (error)


Prevent multiple component definition per file

✓ Enabled (error)


Prevent usage of setState

✖ Disabled


Prevent using string references

✖ Disabled


Prevent usage of unknown DOM property

✓ Enabled (error)


Require ES6 class declarations over React.createClass

✓ Enabled (error)


Require stateless functions when not using lifecycle methods, setState or ref

✓ Enabled (error)


Prevent missing props validation in a React component definition

✓ Enabled (error)


Prevent missing React when using JSX

✓ Enabled (error)


Restrict file extensions that may be required

✖ Disabled


Require render() methods to return something

✓ Enabled (error)


Prevent extra closing tags for components without children

✓ Enabled (error)


Enforce component methods order

✓ Enabled (error)


Enforce propTypes declarations alphabetical sorting

✖ Disabled


Prevent missing parentheses around multilines JSX

✓ Enabled (error)