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: README.md
+15-15
Original file line number
Diff line number
Diff line change
@@ -99,22 +99,22 @@
99
99
100
100
```jsx
101
101
// bad
102
-
<Foo superLongParam="bar"
103
-
anotherSuperLongParam="baz" />
102
+
<Foo superLongParam='bar'
103
+
anotherSuperLongParam='baz' />
104
104
105
105
// good
106
106
<Foo
107
-
superLongParam="bar"
108
-
anotherSuperLongParam="baz"
107
+
superLongParam='bar'
108
+
anotherSuperLongParam='baz'
109
109
/>
110
110
111
111
// if props fit in one line then keep it on the same line
112
-
<Foo bar="bar" />
112
+
<Foo bar='bar' />
113
113
114
114
// children get indented normally
115
115
<Foo
116
-
superLongParam="bar"
117
-
anotherSuperLongParam="baz"
116
+
superLongParam='bar
117
+
anotherSuperLongParam='baz'
118
118
>
119
119
<Quux />
120
120
</Foo>
@@ -228,15 +228,15 @@
228
228
```
229
229
// bad
230
230
render() {
231
-
return <Food foo="bar">
231
+
return <Food foo='bar'>
232
232
<Burger />
233
233
</Food>;
234
234
}
235
235
236
236
// good
237
237
render() {
238
238
return (
239
-
<Food foo="bar">
239
+
<Food foo='bar'>
240
240
<Burger />
241
241
</Food>
242
242
);
@@ -246,22 +246,22 @@
246
246
- Always self-close tags that have no children: [`react/self-closing-comp`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/self-closing-comp.md)
247
247
```
248
248
// bad
249
-
<Foo variant="stuff"></Foo>
249
+
<Foo variant='stuff'></Foo>
250
250
251
251
// good
252
-
<Foo variant="stuff" />
252
+
<Foo variant='stuff' />
253
253
```
254
254
- If your component has multi-line properties, close its tag on a new line. [`react/jsx-closing-bracket-location`](https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-closing-bracket-location.md)
0 commit comments