File tree Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Expand file tree Collapse file tree 1 file changed +14
-14
lines changed Original file line number Diff line number Diff line change @@ -570,15 +570,15 @@ $ `npm i` - and you're ready to go!
570
570
// bad
571
571
const obj = {
572
572
id: 5,
573
- name: "foo"
573
+ name: "foo",
574
574
};
575
575
obj[getKey("enabled")] = true;
576
576
577
577
// good
578
578
const obj = {
579
579
id: 5,
580
580
name: "foo",
581
- [getKey("enabled")]: true
581
+ [getKey("enabled")]: true,
582
582
};
583
583
```
584
584
@@ -615,12 +615,12 @@ $ `npm i` - and you're ready to go!
615
615
616
616
// bad
617
617
const obj = {
618
- foo: foo
618
+ foo: foo,
619
619
};
620
620
621
621
// good
622
622
const obj = {
623
- foo
623
+ foo,
624
624
};
625
625
```
626
626
@@ -640,7 +640,7 @@ $ `npm i` - and you're ready to go!
640
640
foo,
641
641
abc: 3,
642
642
xyz: 4,
643
- bar
643
+ bar,
644
644
};
645
645
646
646
// good
@@ -650,7 +650,7 @@ $ `npm i` - and you're ready to go!
650
650
test: 1,
651
651
key: 2,
652
652
abc: 3,
653
- xyz: 4
653
+ xyz: 4,
654
654
};
655
655
```
656
656
@@ -664,14 +664,14 @@ $ `npm i` - and you're ready to go!
664
664
const bad = {
665
665
"foo": 3,
666
666
"bar": 4,
667
- "data-foo": 5
667
+ "data-foo": 5,
668
668
};
669
669
670
670
// good
671
671
const good = {
672
672
foo: 3,
673
673
bar: 4,
674
- "data-foo": 5
674
+ "data-foo": 5,
675
675
};
676
676
```
677
677
@@ -1792,7 +1792,7 @@ $ `npm i` - and you're ready to go!
1792
1792
let {
1793
1793
foo,
1794
1794
foo1,
1795
- foo2
1795
+ foo2,
1796
1796
} = require("bar");
1797
1797
` ` `
1798
1798
@@ -1862,7 +1862,7 @@ $ `npm i` - and you're ready to go!
1862
1862
longNameB,
1863
1863
longNameC,
1864
1864
longNameD,
1865
- longNameE
1865
+ longNameE,
1866
1866
} = require("path");
1867
1867
```
1868
1868
@@ -2985,12 +2985,12 @@ $ `npm i` - and you're ready to go!
2985
2985
2986
2986
// bad
2987
2987
let x ={
2988
- foo: "bar"
2988
+ foo: "bar",
2989
2989
};
2990
2990
2991
2991
// good
2992
2992
let x = {
2993
- foo: "bar"
2993
+ foo: "bar",
2994
2994
};
2995
2995
```
2996
2996
@@ -3891,12 +3891,12 @@ $ `npm i` - and you're ready to go!
3891
3891
3892
3892
// bad - unnecessarily uppercases key while adding no semantic value
3893
3893
export const MAPPING = {
3894
- KEY: "value"
3894
+ KEY: "value",
3895
3895
};
3896
3896
3897
3897
// good
3898
3898
export const MAPPING = {
3899
- key: "value"
3899
+ key: "value",
3900
3900
};
3901
3901
` ` `
3902
3902
< a name= " naming--state-booleans" >< / a>< a name= " 23.11" >< / a>
You can’t perform that action at this time.
0 commit comments