@@ -27,7 +27,9 @@ module.exports = {
27
27
28
28
'react/display-name' : 1 , // Prevent missing displayName in a React component definition
29
29
'react/forbid-component-props' : 0 , // Forbid certain props on Components
30
+ 'forbid-elements' : 0 , // Forbid certain elements
30
31
'react/forbid-prop-types' : 0 , // Forbid certain propTypes
32
+ 'forbid-foreign-prop-types' : 0 , // Forbid foreign propTypes
31
33
'react/no-array-index-key' : 1 , // Prevent using Array index in `key` props
32
34
'react/no-children-prop' : 1 , // Prevent passing children as props
33
35
'react/no-danger' : 1 , // Prevent usage of dangerous JSX properties
@@ -45,17 +47,18 @@ module.exports = {
45
47
'react/no-unescaped-entities' : 0 , // Prevent invalid characters from appearing in markup
46
48
'react/no-unknown-property' : 1 , // Prevent usage of unknown DOM property (fixable)
47
49
'react/no-unused-prop-types' : 1 , // Prevent definitions of unused prop types
48
- 'react/prefer-es6-class' : 0 , // Enforce ES5 or ES6 class for React Components
50
+ 'react/prefer-es6-class' : 1 , // Enforce ES5 or ES6 class for React Components
49
51
'react/prefer-stateless-function' : 1 , // Enforce stateless React Components to be written as a pure function
50
- 'react/prop-types' : 1 , // Prevent missing props validation in a React component definition
52
+ 'react/prop-types' : 0 , // Prevent missing props validation in a React component definition
51
53
'react/react-in-jsx-scope' : 1 , // Prevent missing React when using JSX,
52
- 'react/require-default-props' : 1 , // Enforce a defaultProps definition for every prop that is not a required prop
54
+ 'react/require-default-props' : 0 , // Enforce a defaultProps definition for every prop that is not a required prop
53
55
'react/require-optimization' : 0 , // Enforce React components to have a shouldComponentUpdate method
54
56
'react/require-render-return' : 1 , // Enforce ES5 or ES6 class for returning value in render function
55
57
'react/self-closing-comp' : 1 , // Prevent extra closing tags for components without children (fixable)
56
58
'react/sort-comp' : 0 , // Enforce component methods order
57
59
'react/sort-prop-types' : 0 , // Enforce propTypes declarations alphabetical sorting
58
60
'react/style-prop-object' : 1 , // Enforce style prop value being an object
61
+ 'void-dom-elements-no-children' : 1 , // Prevent void DOM elements (e.g. `<img />`, `<br />`) from receiving children
59
62
60
63
// JSX-specific rules
61
64
0 commit comments