Skip to content

Commit 15c0f53

Browse files
committed
docs: automate docs with eslint-doc-generator
1 parent f17395e commit 15c0f53

File tree

108 files changed

+398
-524
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

108 files changed

+398
-524
lines changed

.github/workflows/readme.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

README.md

Lines changed: 112 additions & 115 deletions
Large diffs are not rendered by default.

docs/rules/boolean-prop-naming.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Enforces consistent naming for boolean props (react/boolean-prop-naming)
1+
# Enforces consistent naming for boolean props (`react/boolean-prop-naming`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/jsx-eslint/eslint-plugin-react#shareable-configurations): `all`.
3+
<!-- end rule header -->
44

55
Allows you to enforce a consistent naming pattern for props which expect a boolean value.
66

docs/rules/button-has-type.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Disallow usage of `button` elements without an explicit `type` attribute (react/button-has-type)
1+
# Disallow usage of `button` elements without an explicit `type` attribute (`react/button-has-type`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/jsx-eslint/eslint-plugin-react#shareable-configurations): `all`.
3+
<!-- end rule header -->
44

55
The default value of `type` attribute for `button` HTML element is `"submit"` which is often not the desired behavior and may lead to unexpected page reloads.
66
This rules enforces an explicit `type` attribute for all the `button` elements and checks that its value is valid per spec (i.e., is one of `"button"`, `"submit"`, and `"reset"`).

docs/rules/default-props-match-prop-types.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Enforce all defaultProps have a corresponding non-required PropType (react/default-props-match-prop-types)
1+
# Enforce all defaultProps have a corresponding non-required PropType (`react/default-props-match-prop-types`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/jsx-eslint/eslint-plugin-react#shareable-configurations): `all`.
3+
<!-- end rule header -->
44

55
This rule aims to ensure that any prop in `defaultProps` has a non-required type
66
definition.

docs/rules/destructuring-assignment.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Enforce consistent usage of destructuring assignment of props, state, and context (react/destructuring-assignment)
1+
# Enforce consistent usage of destructuring assignment of props, state, and context (`react/destructuring-assignment`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/jsx-eslint/eslint-plugin-react#shareable-configurations): `all`.
3+
🔧 This rule is automatically fixable by the [`--fix` CLI option](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix).
44

5-
🔧 This rule is automatically fixable using the `--fix` [flag](https://eslint.org/docs/latest/user-guide/command-line-interface#--fix) on the command line.
5+
<!-- end rule header -->
66

77
Rule can be set to either of `always` or `never`;
88

docs/rules/display-name.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
# Disallow missing displayName in a React component definition (react/display-name)
1+
# Disallow missing displayName in a React component definition (`react/display-name`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/jsx-eslint/eslint-plugin-react#shareable-configurations): `all`, `recommended`.
3+
✅ This rule is enabled in the `recommended` [config](https://github.com/jsx-eslint/eslint-plugin-react/blob/master/README.md#shareable-configs).
4+
5+
<!-- end rule header -->
46

57
DisplayName allows you to name your component. This name is used by React in debugging messages.
68

docs/rules/forbid-component-props.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Disallow certain props on components (react/forbid-component-props)
1+
# Disallow certain props on components (`react/forbid-component-props`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/jsx-eslint/eslint-plugin-react#shareable-configurations): `all`.
3+
<!-- end rule header -->
44

55
By default this rule prevents passing of [props that add lots of complexity](https://medium.com/brigade-engineering/don-t-pass-css-classes-between-components-e9f7ab192785) (`className`, `style`) to Components. This rule only applies to Components (e.g. `<Foo />`) and not DOM nodes (e.g. `<div />`). The list of forbidden props can be customized with the `forbid` option.
66

docs/rules/forbid-dom-props.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Disallow certain props on DOM Nodes (react/forbid-dom-props)
1+
# Disallow certain props on DOM Nodes (`react/forbid-dom-props`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/jsx-eslint/eslint-plugin-react#shareable-configurations): `all`.
3+
<!-- end rule header -->
44

55
This rule prevents passing of props to elements. This rule only applies to DOM Nodes (e.g. `<div />`) and not Components (e.g. `<Component />`).
66
The list of forbidden props can be customized with the `forbid` option.

docs/rules/forbid-elements.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Disallow certain elements (react/forbid-elements)
1+
# Disallow certain elements (`react/forbid-elements`)
22

3-
💼 This rule is enabled in the following [configs](https://github.com/jsx-eslint/eslint-plugin-react#shareable-configurations): `all`.
3+
<!-- end rule header -->
44

55
You may want to forbid usage of certain elements in favor of others, (e.g. forbid all `<div />` and use `<Box />` instead). This rule allows you to configure a list of forbidden elements and to specify their desired replacements.
66

0 commit comments

Comments
 (0)