You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-5Lines changed: 11 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -40,7 +40,8 @@ You can also specify some settings that will be shared across all the plugin rul
40
40
"createClass":"createReactClass", // Regex for Component Factory to use, default to "createReactClass"
41
41
"pragma":"React", // Pragma to use, default to "React"
42
42
"version":"15.0"// React version, default to the latest React stable release
43
-
}
43
+
},
44
+
"propWrapperFunctions": [ "forbidExtraProps" ] // The names of any functions used to wrap the propTypes object, such as `forbidExtraProps`. If this isn't set, any propTypes wrapped in a function will be skipped.
44
45
}
45
46
}
46
47
```
@@ -80,6 +81,8 @@ Finally, enable all of the rules that you would like to use. Use [our preset](#
80
81
81
82
# List of supported rules
82
83
84
+
*[react/boolean-prop-naming](docs/rules/boolean-prop-naming.md): Enforces consistent naming for boolean props
85
+
*[react/default-props-match-prop-types](docs/rules/default-props-match-prop-types.md): Prevent extraneous defaultProps on components
83
86
*[react/display-name](docs/rules/display-name.md): Prevent missing `displayName` in a React component definition
84
87
*[react/forbid-component-props](docs/rules/forbid-component-props.md): Forbid certain props on Components
85
88
*[react/forbid-elements](docs/rules/forbid-elements.md): Forbid certain elements
@@ -96,8 +99,10 @@ Finally, enable all of the rules that you would like to use. Use [our preset](#
96
99
*[react/no-find-dom-node](docs/rules/no-find-dom-node.md): Prevent usage of `findDOMNode`
97
100
*[react/no-is-mounted](docs/rules/no-is-mounted.md): Prevent usage of `isMounted`
98
101
*[react/no-multi-comp](docs/rules/no-multi-comp.md): Prevent multiple component definition per file
102
+
*[react/no-redundant-should-component-update](docs/rules/no-redundant-should-component-update.md): Prevent usage of `shouldComponentUpdate` when extending React.PureComponent
99
103
*[react/no-render-return-value](docs/rules/no-render-return-value.md): Prevent usage of the return value of `React.render`
100
104
*[react/no-set-state](docs/rules/no-set-state.md): Prevent usage of `setState`
105
+
*[react/no-typos](docs/rules/no-typos.md): Prevent common casing typos
101
106
*[react/no-string-refs](docs/rules/no-string-refs.md): Prevent using string references in `ref` attribute.
102
107
*[react/no-unescaped-entities](docs/rules/no-unescaped-entities.md): Prevent invalid characters from appearing in markup
103
108
*[react/no-unknown-property](docs/rules/no-unknown-property.md): Prevent usage of unknown DOM property (fixable)
@@ -108,7 +113,7 @@ Finally, enable all of the rules that you would like to use. Use [our preset](#
108
113
*[react/prop-types](docs/rules/prop-types.md): Prevent missing props validation in a React component definition
109
114
*[react/react-in-jsx-scope](docs/rules/react-in-jsx-scope.md): Prevent missing `React` when using JSX
110
115
*[react/require-default-props](docs/rules/require-default-props.md): Enforce a defaultProps definition for every prop that is not a required prop
111
-
*[react/require-optimization](docs/rules/require-optimization.md): Enforce React components to have a shouldComponentUpdate method
116
+
*[react/require-optimization](docs/rules/require-optimization.md): Enforce React components to have a `shouldComponentUpdate` method
112
117
*[react/require-render-return](docs/rules/require-render-return.md): Enforce ES5 or ES6 class for returning value in render function
113
118
*[react/self-closing-comp](docs/rules/self-closing-comp.md): Prevent extra closing tags for components without children (fixable)
114
119
*[react/sort-comp](docs/rules/sort-comp.md): Enforce component methods order
@@ -120,15 +125,16 @@ Finally, enable all of the rules that you would like to use. Use [our preset](#
120
125
121
126
*[react/jsx-boolean-value](docs/rules/jsx-boolean-value.md): Enforce boolean attributes notation in JSX (fixable)
122
127
*[react/jsx-closing-bracket-location](docs/rules/jsx-closing-bracket-location.md): Validate closing bracket location in JSX (fixable)
123
-
*[react/jsx-curly-spacing](docs/rules/jsx-curly-spacing.md): Enforce or disallow spaces inside of curly braces in JSX attributes (fixable)
128
+
*[react/jsx-closing-tag-location](docs/rules/jsx-closing-tag-location.md): Validate closing tag location in JSX (fixable)
129
+
*[react/jsx-curly-spacing](docs/rules/jsx-curly-spacing.md): Enforce or disallow spaces inside of curly braces in JSX attributes and expressions (fixable)
124
130
*[react/jsx-equals-spacing](docs/rules/jsx-equals-spacing.md): Enforce or disallow spaces around equal signs in JSX attributes (fixable)
125
131
*[react/jsx-filename-extension](docs/rules/jsx-filename-extension.md): Restrict file extensions that may contain JSX
126
132
*[react/jsx-first-prop-new-line](docs/rules/jsx-first-prop-new-line.md): Enforce position of the first prop in JSX (fixable)
127
133
*[react/jsx-handler-names](docs/rules/jsx-handler-names.md): Enforce event handler naming conventions in JSX
The RegExp pattern to use when validating the name of the prop. The default value for this option is set to: `"^(is|has)[A-Z]([A-Za-z0-9]?)+"` to enforce `is` and `has` prefixes.
0 commit comments