Skip to content

Commit 873c5e1

Browse files
committed
docs: replace ❌ Incorrect and ✅ Correct with Fail and Pass
1 parent 6af3b7e commit 873c5e1

File tree

54 files changed

+99
-99
lines changed

Some content is hidden

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

54 files changed

+99
-99
lines changed

packages/eslint-plugin-jsx/src/rules/no-array-index-key.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ The order of items in a list rendering can change over time if an item is insert
1414

1515
## Examples
1616

17-
### ❌ Incorrect
17+
### Fail
1818

1919
```tsx
2020
const TodoList = ({ todos }) => (
@@ -24,7 +24,7 @@ const TodoList = ({ todos }) => (
2424
);
2525
```
2626

27-
### ✅ Correct
27+
### Pass
2828

2929
```tsx
3030
const TodoList = ({ todos }) => (

packages/eslint-plugin-jsx/src/rules/no-comment-textnodes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ This could be a mistake during code editing or it could be a misunderstanding of
1414

1515
## Examples
1616

17-
### ❌ Incorrect
17+
### Fail
1818

1919
```tsx
2020
function Component() {
@@ -30,7 +30,7 @@ function Component() {
3030
}
3131
```
3232

33-
### ✅ Correct
33+
### Pass
3434

3535
```tsx
3636
function Component() {

packages/eslint-plugin-jsx/src/rules/no-complicated-conditional-rendering.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ Complicated conditional rendering is hard to read and understand.
1414

1515
## Examples
1616

17-
### ❌ Incorrect
17+
### Fail
1818

1919
```tsx
2020
function Component({ hideShapes, debugSvg }) {
2121
return <div>{hideShapes ? null : debugSvg ? <ShapesWithSVGs /> : <ShapesToDisplay />}</div>;
2222
}
2323
```
2424

25-
### ✅ Correct
25+
### Pass
2626

2727
```tsx
2828
function Component({ hideShapes, debugSvg }) {

packages/eslint-plugin-jsx/src/rules/no-duplicate-key.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ React uses keys to identify elements in an array. If two elements have the same
1414

1515
## Examples
1616

17-
### ❌ Incorrect
17+
### Fail
1818

1919
```tsx
2020
const TodoList = ({ todos }) => (
@@ -24,7 +24,7 @@ const TodoList = ({ todos }) => (
2424
);
2525
```
2626

27-
### ✅ Correct
27+
### Pass
2828

2929
```tsx
3030
const TodoList = ({ todos }) => (

packages/eslint-plugin-jsx/src/rules/no-leaked-conditional-rendering.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ This can be avoided by:
4343
- coercing the conditional to a boolean: {!!someValue && \<Something />}
4444
- transforming the binary expression into a ternary expression which returns null for falsy values: {someValue ? \<Something /> : null}
4545

46-
### ❌ Incorrect
46+
### Fail
4747

4848
```tsx
4949
function Component({ count, title }) {
@@ -93,7 +93,7 @@ function Component({ someBool }) {
9393
}
9494
```
9595

96-
### ✅ Correct
96+
### Pass
9797

9898
```tsx
9999
function Component({ elements }) {

packages/eslint-plugin-jsx/src/rules/no-missing-key.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Prevents missing `key` prop on items in list rendering.
1010

1111
## Examples
1212

13-
### ❌ Incorrect
13+
### Fail
1414

1515
```tsx
1616
const TodoList = ({ todos }) => (
@@ -20,7 +20,7 @@ const TodoList = ({ todos }) => (
2020
);
2121
```
2222

23-
### ✅ Correct
23+
### Pass
2424

2525
```tsx
2626
const TodoList = ({ todos }) => (

packages/eslint-plugin-jsx/src/rules/no-spreading-key.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ And it's also be proposed to be deprecated is this RFC: [Deprecate spreading key
1818

1919
This rule aims to prevent spreading key from objects.
2020

21-
### ❌ Incorrect
21+
### Fail
2222

2323
```tsx
2424
function List({ items }) {
@@ -30,7 +30,7 @@ function List({ items }) {
3030
}
3131
```
3232

33-
### ✅ Correct
33+
### Pass
3434

3535
```tsx
3636
function List({ items }) {

packages/eslint-plugin-jsx/src/rules/no-useless-fragment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ And, it adds unnecessary visual noise to the code.
1616

1717
## Examples
1818

19-
### ❌ Incorrect
19+
### Fail
2020

2121
```tsx
2222
<>{foo}</>
@@ -41,7 +41,7 @@ And, it adds unnecessary visual noise to the code.
4141
{showFullName ? <>{fullName}</> : <>{firstName}</>}
4242
```
4343

44-
### ✅ Correct
44+
### Pass
4545

4646
```tsx
4747
{foo}

packages/eslint-plugin-jsx/src/rules/prefer-shorthand-boolean.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ The shorthand syntax is shorter and easier to read. And it adds consistency and
1616

1717
This rule enforces the use of shorthand syntax for boolean attributes.
1818

19-
### ❌ Incorrect
19+
### Fail
2020

2121
```tsx
2222
<Component hidden={true} disabled={false} />;
2323
```
2424

25-
### ✅ Correct
25+
### Pass
2626

2727
```tsx
2828
<Component hidden disabled />;

packages/eslint-plugin-jsx/src/rules/prefer-shorthand-fragment.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Enforces the usage of `<></>` over `<React.Fragment></React.Fragment>`.
1414

1515
## Examples
1616

17-
### ❌ Incorrect
17+
### Fail
1818

1919
```tsx
2020
<React.Fragment>
@@ -29,7 +29,7 @@ Enforces the usage of `<></>` over `<React.Fragment></React.Fragment>`.
2929
</React.Fragment>;
3030
```
3131

32-
### ✅ Correct
32+
### Pass
3333

3434
```tsx
3535
<>

0 commit comments

Comments
 (0)