Skip to content

Commit

Permalink
Add section on multi-line imports. Fixes airbnb#1051
Browse files Browse the repository at this point in the history
  • Loading branch information
karanjthakkar committed Oct 6, 2016
1 parent e2de71e commit 6ad315c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1223,6 +1223,25 @@ Other Style Guides
foo.init();
```
<a name="modules--multiline-imports-over-newlines"></a><a name="10.8"></a>
- [10.8](#modules--multiline-imports-over-newlines) Multi-line imports should be preferred over single line
> Why? The curly braces follow the same indentation rules as every other curly brace block in the style guide, as do the trailing commas.
```javascript
// bad
import {longNameA, longNameB, longNameC, longNameD, longNameE} from 'path';
// good
import {
longNameA,
longNameB,
longNameC,
longNameD,
longNameE
} from 'path';
```
**[⬆ back to top](#table-of-contents)**
## Iterators and Generators
Expand Down

0 comments on commit 6ad315c

Please sign in to comment.