Skip to content

Commit bc93ecf

Browse files
authored
Added dangling commas
1 parent b8b598b commit bc93ecf

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -570,15 +570,15 @@ $ `npm i` - and you're ready to go!
570570
// bad
571571
const obj = {
572572
id: 5,
573-
name: "foo"
573+
name: "foo",
574574
};
575575
obj[getKey("enabled")] = true;
576576
577577
// good
578578
const obj = {
579579
id: 5,
580580
name: "foo",
581-
[getKey("enabled")]: true
581+
[getKey("enabled")]: true,
582582
};
583583
```
584584
@@ -615,12 +615,12 @@ $ `npm i` - and you're ready to go!
615615
616616
// bad
617617
const obj = {
618-
foo: foo
618+
foo: foo,
619619
};
620620
621621
// good
622622
const obj = {
623-
foo
623+
foo,
624624
};
625625
```
626626
@@ -640,7 +640,7 @@ $ `npm i` - and you're ready to go!
640640
foo,
641641
abc: 3,
642642
xyz: 4,
643-
bar
643+
bar,
644644
};
645645
646646
// good
@@ -650,7 +650,7 @@ $ `npm i` - and you're ready to go!
650650
test: 1,
651651
key: 2,
652652
abc: 3,
653-
xyz: 4
653+
xyz: 4,
654654
};
655655
```
656656
@@ -664,14 +664,14 @@ $ `npm i` - and you're ready to go!
664664
const bad = {
665665
"foo": 3,
666666
"bar": 4,
667-
"data-foo": 5
667+
"data-foo": 5,
668668
};
669669
670670
// good
671671
const good = {
672672
foo: 3,
673673
bar: 4,
674-
"data-foo": 5
674+
"data-foo": 5,
675675
};
676676
```
677677
@@ -1792,7 +1792,7 @@ $ `npm i` - and you're ready to go!
17921792
let {
17931793
foo,
17941794
foo1,
1795-
foo2
1795+
foo2,
17961796
} = require("bar");
17971797
```
17981798

@@ -1862,7 +1862,7 @@ $ `npm i` - and you're ready to go!
18621862
longNameB,
18631863
longNameC,
18641864
longNameD,
1865-
longNameE
1865+
longNameE,
18661866
} = require("path");
18671867
```
18681868
@@ -2985,12 +2985,12 @@ $ `npm i` - and you're ready to go!
29852985
29862986
// bad
29872987
let x ={
2988-
foo: "bar"
2988+
foo: "bar",
29892989
};
29902990
29912991
// good
29922992
let x = {
2993-
foo: "bar"
2993+
foo: "bar",
29942994
};
29952995
```
29962996
@@ -3891,12 +3891,12 @@ $ `npm i` - and you're ready to go!
38913891
38923892
// bad - unnecessarily uppercases key while adding no semantic value
38933893
export const MAPPING = {
3894-
KEY: "value"
3894+
KEY: "value",
38953895
};
38963896
38973897
// good
38983898
export const MAPPING = {
3899-
key: "value"
3899+
key: "value",
39003900
};
39013901
```
39023902
<a name="naming--state-booleans"></a><a name="23.11"></a>

0 commit comments

Comments
 (0)