Skip to content

Commit f6dbe68

Browse files
author
Antonio Miranda
committed
Avoid optional commas before newlines
This commit solves polarmobile#23
1 parent 3dd8c5a commit f6dbe68

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ The details in this guide have been very heavily inspired by several existing st
2626
* [Maximum Line Length](#maximum_line_length)
2727
* [Blank Lines](#blank_lines)
2828
* [Trailing Whitespace](#trailing_whitespace)
29+
* [Optional Commas](#optional_commas)
2930
* [Encoding](#encoding)
3031
* [Module Imports](#module_imports)
3132
* [Whitespace in Expressions and Statements](#whitespace)
@@ -69,6 +70,21 @@ Use a single blank line within the bodies of methods or functions in cases where
6970

7071
Do not include trailing whitespace on any lines.
7172

73+
<a name="optional_commas"/>
74+
### Optional Commas
75+
76+
Avoid the use of commas before newlines when each property of an Object or Array is listed on its own line.
77+
78+
```coffeescript
79+
bitlist = [
80+
1, 0, 1
81+
1, 1, 0
82+
]
83+
brother:
84+
name: "Max"
85+
age: 11
86+
```
87+
7288
<a name="encoding"/>
7389
### Encoding
7490

0 commit comments

Comments
 (0)