React
Recipes
- Disallow extra closing tags for components without children
- Disallow missing parentheses around multiline JSX
- Disallow multiple spaces between inline JSX props
- Disallow problematic leaked values from being rendered
- Disallow target="_blank" attribute without rel="noreferrer"
- Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes
- Disallow unnecessary fragments
- Disallow usage of unknown DOM property
- Enforce JSX indentation
- Enforce a specific function type for function components
- Enforce boolean attributes notation in JSX
- Enforce closing bracket location in JSX
- Enforce closing tag location for multiline JSX
- Enforce consistent linebreaks in curly braces in JSX attributes and expressions
- Enforce consistent usage of destructuring assignment of props, state, and context
- Enforce maximum of props on a single line in JSX
- Enforce or disallow spaces around equal signs in JSX attributes
- Enforce or disallow spaces inside of curly braces in JSX attributes and expressions
- Enforce propTypes declarations alphabetical sorting
- Enforce proper position of the first property in JSX
- Enforce props alphabetical sorting
- Enforce props indentation in JSX
- Enforce shorthand or standard form for React fragments
- Enforce spacing before closing bracket in JSX
- Enforce that props are read-only
- Enforce whitespace in and around the JSX opening and closing brackets
- Lifecycle methods should be methods on the prototype, not class fields
- Require one JSX element per line
- Require or prevent a new line after jsx elements and expressions