Skip to content

Commit a766255

Browse files
committed
docs: test fixable/suggestion rule notice consistency
1 parent e7c6fdb commit a766255

31 files changed

+110
-44
lines changed

docs/rules/destructuring-assignment.md

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

3+
🔧 This rule is automatically fixable using the `--fix` flag on the command line.
4+
35
Rule can be set to either of `always` or `never`;
46
```js
57
"react/destructuring-assignment": [<enabled>, 'always']

docs/rules/function-component-definition.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Enforce a specific function type for function components (react/function-component-definition)
22

3-
This option enforces a specific function type for function components.
3+
🔧 This rule is automatically fixable using the `--fix` flag on the command line.
44

5-
**Fixable:** This rule is automatically fixable using the `--fix` flag on the command line.
5+
This option enforces a specific function type for function components.
66

77
## Rule Details
88

docs/rules/jsx-boolean-value.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Enforce boolean attributes notation in JSX (react/jsx-boolean-value)
22

3-
[When using a boolean attribute in JSX](https://facebook.github.io/react/docs/jsx-in-depth.html#boolean-attributes), you can set the attribute value to `true` or omit the value. This rule will enforce one or the other to keep consistency in your code.
3+
🔧 This rule is automatically fixable using the `--fix` flag on the command line.
44

5-
**Fixable:** This rule is automatically fixable using the `--fix` flag on the command line.
5+
[When using a boolean attribute in JSX](https://facebook.github.io/react/docs/jsx-in-depth.html#boolean-attributes), you can set the attribute value to `true` or omit the value. This rule will enforce one or the other to keep consistency in your code.
66

77
## Rule Details
88

docs/rules/jsx-closing-bracket-location.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Validate closing bracket location in JSX (react/jsx-closing-bracket-location)
22

3-
Enforce the closing bracket location for JSX multiline elements.
3+
🔧 This rule is automatically fixable using the `--fix` flag on the command line.
44

5-
**Fixable:** This rule is automatically fixable using the `--fix` flag on the command line.
5+
Enforce the closing bracket location for JSX multiline elements.
66

77
## Rule Details
88

docs/rules/jsx-closing-tag-location.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Validate closing tag location in JSX (react/jsx-closing-tag-location)
22

3-
Enforce the closing tag location for multiline JSX elements.
3+
🔧 This rule is automatically fixable using the `--fix` flag on the command line.
44

5-
**Fixable:** This rule is automatically fixable using the `--fix` flag on the command line.
5+
Enforce the closing tag location for multiline JSX elements.
66

77
## Rule Details
88

docs/rules/jsx-curly-brace-presence.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Enforce curly braces or disallow unnecessary curly braces in JSX props and/or children. (react/jsx-curly-brace-presence)
22

3+
🔧 This rule is automatically fixable using the `--fix` flag on the command line.
4+
35
This rule allows you to enforce curly braces or disallow unnecessary curly braces in JSX props and/or children.
46

57
For situations where JSX expressions are unnecessary, please refer to [the React doc](https://facebook.github.io/react/docs/jsx-in-depth.html) and [this page about JSX gotchas](https://github.com/facebook/react/blob/v15.4.0-rc.3/docs/docs/02.3-jsx-gotchas.md#html-entities).
@@ -175,7 +177,7 @@ Examples of **correct** code for this rule, even when configured with `"never"`:
175177
*/
176178
<App>{' '}</App>
177179
<App>{' '}</App>
178-
<App>{/* comment */ <Bpp />}</App> // the comment makes the container necessary
180+
<App>{/* comment */ <Bpp />}</App> // the comment makes the container necessary
179181
```
180182

181183
## When Not To Use It

docs/rules/jsx-curly-newline.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Enforce linebreaks in curly braces in JSX attributes and expressions. (react/jsx-curly-newline)
22

3-
Many style guides require or disallow newlines inside of jsx curly expressions.
3+
🔧 This rule is automatically fixable using the `--fix` flag on the command line.
44

5-
**Fixable:** This rule is automatically fixable using the `--fix` flag on the command line.
5+
Many style guides require or disallow newlines inside of jsx curly expressions.
66

77
## Rule Details
88

docs/rules/jsx-curly-spacing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Enforce or disallow spaces inside of curly braces in JSX attributes and expressions. (react/jsx-curly-spacing)
22

3-
While formatting preferences are very personal, a number of style guides require or disallow spaces between curly braces.
3+
🔧 This rule is automatically fixable using the `--fix` flag on the command line.
44

5-
**Fixable:** This rule is automatically fixable using the `--fix` flag on the command line.
5+
While formatting preferences are very personal, a number of style guides require or disallow spaces between curly braces.
66

77
## Rule Details
88

docs/rules/jsx-equals-spacing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Enforce or disallow spaces around equal signs in JSX attributes. (react/jsx-equals-spacing)
22

3-
Some style guides require or disallow spaces around equal signs.
3+
🔧 This rule is automatically fixable using the `--fix` flag on the command line.
44

5-
**Fixable:** This rule is automatically fixable using the `--fix` flag on the command line.
5+
Some style guides require or disallow spaces around equal signs.
66

77
## Rule Details
88

docs/rules/jsx-first-prop-new-line.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
# Configure the position of the first property (react/jsx-first-prop-new-line)
22

3+
🔧 This rule is automatically fixable using the `--fix` flag on the command line.
4+
35
Ensure correct position of the first property.
46

5-
**Fixable:** This rule is automatically fixable using the `--fix` flag on the command line. However, fix does not include indentation. Please rerun lint to correct those errors.
7+
Note: The autofixer does not include indentation. Please rerun lint to correct those errors.
68

79
## Rule Details
810

0 commit comments

Comments
 (0)