mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-14 07:47:54 -05:00
Merge pull request #170 from chromakode/clarify-file-ending-newline
Clarify single newlines at the end of files.
This commit is contained in:
13
README.md
13
README.md
@@ -777,7 +777,7 @@
|
||||
var x = y + 5;
|
||||
```
|
||||
|
||||
- Place an empty newline at the end of the file.
|
||||
- End files with a single newline character.
|
||||
|
||||
```javascript
|
||||
// bad
|
||||
@@ -786,12 +786,19 @@
|
||||
})(this);
|
||||
```
|
||||
|
||||
```javascript
|
||||
// bad
|
||||
(function(global) {
|
||||
// ...stuff...
|
||||
})(this);↵
|
||||
↵
|
||||
```
|
||||
|
||||
```javascript
|
||||
// good
|
||||
(function(global) {
|
||||
// ...stuff...
|
||||
})(this);
|
||||
|
||||
})(this);↵
|
||||
```
|
||||
|
||||
- Use indentation when making long method chains.
|
||||
|
||||
Reference in New Issue
Block a user