[guide] fix indentation in section 4.7

This commit is contained in:
zwei
2018-01-16 16:20:46 +08:00
committed by Jordan Harband
parent 7dab8371c9
commit c4dcfd93a7

View File

@@ -441,39 +441,39 @@ Other Style Guides
<a name="arrays--bracket-newline"></a>
- [4.7](#arrays--bracket-newline) Use line breaks after open and before close array brackets if an array has multiple lines
```javascript
// bad
const arr = [
[0, 1], [2, 3], [4, 5],
];
```javascript
// bad
const arr = [
[0, 1], [2, 3], [4, 5],
];
const objectInArray = [{
id: 1,
}, {
id: 2,
}];
const numberInArray = [
1, 2,
];
// good
const arr = [[0, 1], [2, 3], [4, 5]];
const objectInArray = [
{
const objectInArray = [{
id: 1,
},
{
}, {
id: 2,
},
];
}];
const numberInArray = [
1,
2,
];
```
const numberInArray = [
1, 2,
];
// good
const arr = [[0, 1], [2, 3], [4, 5]];
const objectInArray = [
{
id: 1,
},
{
id: 2,
},
];
const numberInArray = [
1,
2,
];
```
**[⬆ back to top](#table-of-contents)**