Skip to content

Commit a8c82bd

Browse files
committed
docs: minor improvements
1 parent bfaaa19 commit a8c82bd

File tree

2 files changed

+46
-44
lines changed

2 files changed

+46
-44
lines changed

packages/plugins/eslint-plugin-react-x/README.md

Lines changed: 45 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -71,46 +71,48 @@ export default [
7171

7272
## Rules
7373

74-
| Rule | Description | 💼 | 💭 ||
75-
| :--------------------------------------- | :--------------------------------------------------------------------------------------------------- | :-: | :-: | :-: |
76-
| `avoid-shorthand-boolean` | Enforces the use of shorthand syntax for boolean attributes. | 🎨 | | |
77-
| `avoid-shorthand-fragment` | Enforces the use of shorthand syntax for fragments. | 🎨 | | |
78-
| `ensure-forward-ref-using-ref` | Requires that components wrapped with `forwardRef` must have a `ref` parameter. | ✔️ | | |
79-
| `no-access-state-in-setstate` | Prevents accessing `this.state` inside `setState` calls. | ✔️ | | |
80-
| `no-array-index-key` | Warns when an array `index` is used as a `key` prop. | 👀 | | |
81-
| `no-children-count` | Prevents usage of `Children.count`. || | |
82-
| `no-children-for-each` | Prevents usage of `Children.forEach`. || | |
83-
| `no-children-map` | Prevents usage of `Children.map`. || | |
84-
| `no-children-only` | Prevents usage of `Children.only`. || | |
85-
| `no-children-prop` | Prevents usage of `children` as a prop. || | |
86-
| `no-children-to-array` | Prevents usage of `Children.toArray`. || | |
87-
| `no-class-component` | Prevents usage of class component. || | |
88-
| `no-clone-element` | Prevents usage of `cloneElement`. || | |
89-
| `no-comment-textnodes` | Prevents comments from being inserted as text nodes. | 👀 | | |
90-
| `no-component-will-mount` | Prevents usage of `componentWillMount`. || | |
91-
| `no-component-will-receive-props` | Prevents usage of `componentWillReceiveProps`. || | |
92-
| `no-component-will-update` | Prevents usage of `componentWillUpdate`. || | |
93-
| `no-create-ref` | Prevents usage of `createRef`. || | |
94-
| `no-direct-mutation-state` | Prevents direct mutation of `this.state`. | ✔️ | | |
95-
| `no-duplicate-key` | Prevents duplicate `key` props on elements in the same array or a list of `children`. | ✔️ | | |
96-
| `no-leaked-conditional-rendering` | Prevents problematic leaked values from being rendered. | 👀 | 💭 | |
97-
| `no-missing-component-display-name` | Enforces that all components have a `displayName` which can be used in devtools. | 🐞 | | |
98-
| `no-missing-key` | Prevents missing `key` prop on items in list rendering. | ✔️ | | |
99-
| `no-nested-components` | Prevents nesting component definitions inside other components. | ✔️ | | |
100-
| `no-redundant-should-component-update` | Prevents usage of `shouldComponentUpdate` when extending `React.PureComponent`. | ✔️ | | |
101-
| `no-set-state-in-component-did-mount` | Disallows calling `this.setState` in `componentDidMount` outside of functions, such as callbacks. | 👀 | | |
102-
| `no-set-state-in-component-did-update` | Disallows calling `this.setState` in `componentDidUpdate` outside of functions, such as callbacks. | 👀 | | |
103-
| `no-set-state-in-component-will-update` | Disallows calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks. | 👀 | | |
104-
| `no-string-refs` | Disallows using deprecated string `refs`. || | |
105-
| `no-unsafe-component-will-mount` | Warns usage of `UNSAFE_componentWillMount` in class components. | 👀 | | |
106-
| `no-unsafe-component-will-receive-props` | Warns usage of `UNSAFE_componentWillReceiveProps` in class components. | 👀 | | |
107-
| `no-unsafe-component-will-update` | Warns usage of `UNSAFE_componentWillUpdate` in class components. | 👀 | | |
108-
| `no-unstable-context-value` | Prevents non-stable values (i.e. object literals) from being used as a value for `Context.Provider`. | 🚀 | | |
109-
| `no-unstable-default-props` | Prevents usage of referential-type values as default props in object destructuring. | 🚀 | | |
110-
| `no-unused-class-component-members` | Warns unused class component methods and properties. | ✔️ | | |
111-
| `no-unused-state` | Warns unused class component state. | ✔️ | | |
112-
| `no-useless-fragment` | Prevents the use of useless `fragment` components or `<>` syntax. | ✔️ | | |
113-
| `prefer-read-only-props` | Enforces that function components props are readonly. | ✔️ | 💭 | |
114-
| `prefer-destructuring-assignment` | Enforces the use of destructuring assignment over property assignment. | 🎨 | | |
115-
| `prefer-shorthand-boolean` | Enforces the use of shorthand syntax for boolean attributes. | 🎨 | | |
116-
| `prefer-shorthand-fragment` | Enforces the use of shorthand syntax for fragments. | 🎨 | | |
74+
| Rule | Description | 💼 | 💭 ||
75+
| :--------------------------------------- | :--------------------------------------------------------------------------------------------------- | :---: | :---: | :---: |
76+
| `avoid-shorthand-boolean` | Enforces the use of shorthand syntax for boolean attributes. | 🎨 | | |
77+
| `avoid-shorthand-fragment` | Enforces the use of shorthand syntax for fragments. | 🎨 | | |
78+
| `ensure-forward-ref-using-ref` | Requires that components wrapped with `forwardRef` must have a `ref` parameter. | ✔️ | | |
79+
| `no-access-state-in-setstate` | Prevents accessing `this.state` inside `setState` calls. | ✔️ | | |
80+
| `no-array-index-key` | Warns when an array `index` is used as a `key` prop. | 👀 | | |
81+
| `no-children-count` | Prevents usage of `Children.count`. || | |
82+
| `no-children-for-each` | Prevents usage of `Children.forEach`. || | |
83+
| `no-children-map` | Prevents usage of `Children.map`. || | |
84+
| `no-children-only` | Prevents usage of `Children.only`. || | |
85+
| `no-children-prop` | Prevents usage of `children` as a prop. || | |
86+
| `no-children-to-array` | Prevents usage of `Children.toArray`. || | |
87+
| `no-class-component` | Prevents usage of class component. || | |
88+
| `no-clone-element` | Prevents usage of `cloneElement`. || | |
89+
| `no-comment-textnodes` | Prevents comments from being inserted as text nodes. | 👀 | | |
90+
| `no-component-will-mount` | Prevents usage of `componentWillMount`. || | |
91+
| `no-component-will-receive-props` | Prevents usage of `componentWillReceiveProps`. || | |
92+
| `no-component-will-update` | Prevents usage of `componentWillUpdate`. || | |
93+
| `no-create-ref` | Prevents usage of `createRef`. || | |
94+
| `no-default-props` | Prevents usage of `defaultProps`. || | |
95+
| `no-direct-mutation-state` | Prevents direct mutation of `this.state`. | ✔️ | | |
96+
| `no-duplicate-key` | Prevents duplicate `key` props on elements in the same array or a list of `children`. | ✔️ | | |
97+
| `no-leaked-conditional-rendering` | Prevents problematic leaked values from being rendered. | 👀 | 💭 | |
98+
| `no-missing-component-display-name` | Enforces that all components have a `displayName` which can be used in devtools. | 🐞 | | |
99+
| `no-missing-key` | Prevents missing `key` prop on items in list rendering. | ✔️ | | |
100+
| `no-nested-components` | Prevents nesting component definitions inside other components. | ✔️ | | |
101+
| `no-prop-types` | Prevents usage of `propTypes`. || | |
102+
| `no-redundant-should-component-update` | Prevents usage of `shouldComponentUpdate` when extending `React.PureComponent`. | ✔️ | | |
103+
| `no-set-state-in-component-did-mount` | Disallows calling `this.setState` in `componentDidMount` outside of functions, such as callbacks. | 👀 | | |
104+
| `no-set-state-in-component-did-update` | Disallows calling `this.setState` in `componentDidUpdate` outside of functions, such as callbacks. | 👀 | | |
105+
| `no-set-state-in-component-will-update` | Disallows calling `this.setState` in `componentWillUpdate` outside of functions, such as callbacks. | 👀 | | |
106+
| `no-string-refs` | Disallows using deprecated string `refs`. || | |
107+
| `no-unsafe-component-will-mount` | Warns usage of `UNSAFE_componentWillMount` in class components. | 👀 | | |
108+
| `no-unsafe-component-will-receive-props` | Warns usage of `UNSAFE_componentWillReceiveProps` in class components. | 👀 | | |
109+
| `no-unsafe-component-will-update` | Warns usage of `UNSAFE_componentWillUpdate` in class components. | 👀 | | |
110+
| `no-unstable-context-value` | Prevents non-stable values (i.e. object literals) from being used as a value for `Context.Provider`. | 🚀 | | |
111+
| `no-unstable-default-props` | Prevents usage of referential-type values as default props in object destructuring. | 🚀 | | |
112+
| `no-unused-class-component-members` | Warns unused class component methods and properties. | ✔️ | | |
113+
| `no-unused-state` | Warns unused class component state. | ✔️ | | |
114+
| `no-useless-fragment` | Prevents the use of useless `fragment` components or `<>` syntax. | ✔️ | | |
115+
| `prefer-read-only-props` | Enforces that function components props are readonly. | ✔️ | 💭 | |
116+
| `prefer-destructuring-assignment` | Enforces the use of destructuring assignment over property assignment. | 🎨 | | |
117+
| `prefer-shorthand-boolean` | Enforces the use of shorthand syntax for boolean attributes. | 🎨 | | |
118+
| `prefer-shorthand-fragment` | Enforces the use of shorthand syntax for fragments. | 🎨 | | |

website/pages/docs/rules/no-default-props.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Restriction.
66

77
## What it does
88

9-
Disallows using `defaultProps` property in favor of ES6 default parameters or another solution.
9+
Disallows using `defaultProps` property in favor of ES6 default parameters.
1010

1111
## Why is this bad?
1212

0 commit comments

Comments
 (0)