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: docs/rules/function-component-definition.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ This option enforces a specific function type for function components.
8
8
9
9
This rule is aimed to enforce consistent function types for function components. By default it prefers function declarations for named components and function expressions for unnamed components.
10
10
11
-
The following patterns are considered warnings:
11
+
Examples of **incorrect** code for this rule:
12
12
13
13
```jsx
14
14
// function expression for named component
@@ -42,7 +42,7 @@ This rule takes an options object as a second parameter where the preferred func
42
42
...
43
43
```
44
44
45
-
The following patterns are considered warnings:
45
+
Examples of **incorrect** code for this rule:
46
46
47
47
```jsx
48
48
// only function declarations for named components
Copy file name to clipboardexpand all lines: docs/rules/jsx-boolean-value.md
+5-5
Original file line number
Diff line number
Diff line change
@@ -10,30 +10,30 @@ This rule takes two arguments. If the first argument is `"always"` then it warns
10
10
11
11
The second argument is optional: if provided, it must be an object with a `"never"` property (if the first argument is `"always"`), or an `"always"` property (if the first argument is `"never"`). This property’s value must be an array of strings representing prop names.
12
12
13
-
The following patterns are considered warnings when configured `"never"`, or with `"always", { "never": ["personal"] }`:
13
+
Examples of **incorrect** code for this rule, when configured with`"never"`, or with `"always", { "never": ["personal"] }`:
14
14
15
15
```jsx
16
16
var Hello =<Hello personal={true} />;
17
17
```
18
18
19
-
The following patterns are **not**considered warnings when configured `"never"`, or with `"always", { "never": ["personal"] }`:
19
+
Examples of **correct**code for this rule, when configured with`"never"`, or with `"always", { "never": ["personal"] }`:
20
20
21
21
```jsx
22
22
var Hello =<Hello personal />;
23
23
```
24
24
25
-
The following patterns are considered warnings when configured `"always"`, or with `"never", { "always": ["personal"] }`:
25
+
Examples of **incorrect** code for this rule, when configured with`"always"`, or with `"never", { "always": ["personal"] }`:
26
26
27
27
```jsx
28
28
var Hello =<Hello personal />;
29
29
```
30
30
31
-
The following patterns are **not**considered warnings when configured `"always"`, or with `"never", { "always": ["personal"] }`:
31
+
Examples of **correct**code for this rule, when configured with`"always"`, or with `"never", { "always": ["personal"] }`:
32
32
33
33
```jsx
34
34
var Hello =<Hello personal={true} />;
35
35
```
36
36
37
37
## When Not To Use It
38
38
39
-
If you do not want to enforce any style for boolean attributes, then you can disable this rule.
39
+
If you do not want to enforce any style for boolean attributes, then you can disable this rule.
Copy file name to clipboardexpand all lines: docs/rules/jsx-closing-bracket-location.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Enforce the closing bracket location for JSX multiline elements.
8
8
9
9
This rule checks all JSX multiline elements and verifies the location of the closing bracket. By default this one must be aligned with the opening tag.
10
10
11
-
The following patterns are considered warnings:
11
+
Examples of **incorrect** code for this rule:
12
12
13
13
```jsx
14
14
<Hello
@@ -21,7 +21,7 @@ The following patterns are considered warnings:
21
21
/>;
22
22
```
23
23
24
-
The following patterns are **not**considered warnings:
24
+
Examples of **correct**code for this rule:
25
25
26
26
```jsx
27
27
<Hello firstName="John" lastName="Smith"/>;
@@ -65,7 +65,7 @@ Defaults to `tag-aligned`.
65
65
66
66
For backward compatibility, you may pass an object `{ "location": <location> }` that is equivalent to the first string shortcut form.
67
67
68
-
The following patterns are considered warnings:
68
+
Examples of **incorrect** code for this rule:
69
69
70
70
```jsx
71
71
// 'jsx-closing-bracket-location': 1
@@ -138,7 +138,7 @@ var x = function() {
138
138
</Say>;
139
139
```
140
140
141
-
The following patterns are **not**considered warnings:
Copy file name to clipboardexpand all lines: docs/rules/jsx-closing-tag-location.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ Enforce the closing tag location for multiline JSX elements.
8
8
9
9
This rule checks all JSX multiline elements with children (non-self-closing) and verifies the location of the closing tag. The expectation is that the closing tag is aligned with the opening tag on its own line.
10
10
11
-
The following patterns are considered warnings:
11
+
Examples of **incorrect** code for this rule:
12
12
13
13
```jsx
14
14
<Hello>
@@ -21,7 +21,7 @@ The following patterns are considered warnings:
21
21
marklar</Hello>
22
22
```
23
23
24
-
The following are **not**considered warnings:
24
+
Examples of **correct**code for this rule:
25
25
26
26
```jsx
27
27
<Hello>
@@ -35,4 +35,4 @@ The following are **not** considered warnings:
35
35
36
36
## When not to use
37
37
38
-
If you do not care about closing tag JSX alignment then you can disable this rule.
38
+
If you do not care about closing tag JSX alignment then you can disable this rule.
0 commit comments