Skip to content

Commit d08cf03

Browse files
committed
fix example
1 parent 42b7743 commit d08cf03

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

README.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -99,22 +99,22 @@
9999
100100
```jsx
101101
// bad
102-
<Foo superLongParam="bar"
103-
anotherSuperLongParam="baz" />
102+
<Foo superLongParam='bar'
103+
anotherSuperLongParam='baz' />
104104
105105
// good
106106
<Foo
107-
superLongParam="bar"
108-
anotherSuperLongParam="baz"
107+
superLongParam='bar'
108+
anotherSuperLongParam='baz'
109109
/>
110110
111111
// if props fit in one line then keep it on the same line
112-
<Foo bar="bar" />
112+
<Foo bar='bar' />
113113
114114
// children get indented normally
115115
<Foo
116-
superLongParam="bar"
117-
anotherSuperLongParam="baz"
116+
superLongParam='bar
117+
anotherSuperLongParam='baz'
118118
>
119119
<Quux />
120120
</Foo>
@@ -228,15 +228,15 @@
228228
```
229229
// bad
230230
render() {
231-
return <Food foo="bar">
231+
return <Food foo='bar'>
232232
<Burger />
233233
</Food>;
234234
}
235235
236236
// good
237237
render() {
238238
return (
239-
<Food foo="bar">
239+
<Food foo='bar'>
240240
<Burger />
241241
</Food>
242242
);
@@ -246,22 +246,22 @@
246246
- 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)
247247
```
248248
// bad
249-
<Foo variant="stuff"></Foo>
249+
<Foo variant='stuff'></Foo>
250250
251251
// good
252-
<Foo variant="stuff" />
252+
<Foo variant='stuff' />
253253
```
254254
- 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)
255255
```
256256
// bad
257257
<Foo
258-
bar="bar"
259-
baz="baz" />
258+
bar='bar'
259+
baz='baz' />
260260
261261
// good
262262
<Foo
263-
bar="bar"
264-
baz="baz"
263+
bar='bar'
264+
baz='baz'
265265
/>
266266
```
267267
### Methods

0 commit comments

Comments
 (0)