Skip to content

Commit 37df67a

Browse files
committed
👕 Adds trailing comma
1 parent ae9de55 commit 37df67a

18 files changed

+98
-79
lines changed

.prettierrc

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
{
2-
"singleQuote": true
2+
"singleQuote": true,
3+
"trailingComma": "es5"
34
}

lib/core/lg-logic.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,5 @@ module.exports = {
3737
});
3838

3939
return propertyValue;
40-
}
40+
},
4141
};

lib/core/lg-utilities.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,5 +107,5 @@ module.exports = {
107107
hToD,
108108
safeRgbToRgb,
109109
safeHexToRgb,
110-
glueFractionMembers
110+
glueFractionMembers,
111111
};

lib/lost-align.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = function lostAlign(css, settings) {
1717
if (alignDirection === 'reset') {
1818
decl.cloneBefore({
1919
prop: 'position',
20-
value: 'static'
20+
value: 'static',
2121
});
2222
newBlock(
2323
decl,
@@ -28,7 +28,7 @@ module.exports = function lostAlign(css, settings) {
2828
} else {
2929
decl.cloneBefore({
3030
prop: 'position',
31-
value: 'relative'
31+
value: 'relative',
3232
});
3333
if (alignDirection === 'horizontal') {
3434
newBlock(
@@ -131,7 +131,7 @@ module.exports = function lostAlign(css, settings) {
131131
} else if (alignDirection === 'reset') {
132132
decl.cloneBefore({
133133
prop: 'display',
134-
value: 'initial'
134+
value: 'initial',
135135
});
136136
newBlock(
137137
decl,
@@ -142,7 +142,7 @@ module.exports = function lostAlign(css, settings) {
142142
} else {
143143
decl.cloneBefore({
144144
prop: 'display',
145-
value: 'flex'
145+
value: 'flex',
146146
});
147147
if (alignDirection === 'horizontal') {
148148
newBlock(

lib/lost-center.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -88,39 +88,39 @@ module.exports = function lostCenterDecl(css, settings, result) {
8888
} else {
8989
decl.cloneBefore({
9090
prop: 'display',
91-
value: 'flex'
91+
value: 'flex',
9292
});
9393

9494
decl.cloneBefore({
9595
prop: 'flex-flow',
96-
value: 'row wrap'
96+
value: 'row wrap',
9797
});
9898
}
9999

100100
decl.cloneBefore({
101101
prop: 'max-width',
102-
value: lostCenterMaxWidth
102+
value: lostCenterMaxWidth,
103103
});
104104

105105
decl.cloneBefore({
106106
prop: 'margin-left',
107-
value: 'auto'
107+
value: 'auto',
108108
});
109109

110110
decl.cloneBefore({
111111
prop: 'margin-right',
112-
value: 'auto'
112+
value: 'auto',
113113
});
114114

115115
if (lostCenterPadding !== undefined) {
116116
decl.cloneBefore({
117117
prop: 'padding-left',
118-
value: lostCenterPadding
118+
value: lostCenterPadding,
119119
});
120120

121121
decl.cloneBefore({
122122
prop: 'padding-right',
123-
value: lostCenterPadding
123+
value: lostCenterPadding,
124124
});
125125
}
126126

lib/lost-column.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ module.exports = function lostColumnDecl(css, settings, result) {
112112
if (lostColumnFlexbox === 'flex') {
113113
decl.cloneBefore({
114114
prop: 'flex-grow',
115-
value: '0'
115+
value: '0',
116116
});
117117
decl.cloneBefore({
118118
prop: 'flex-shrink',
119-
value: '0'
119+
value: '0',
120120
});
121121

122122
if (lostColumnCycle !== 0) {
@@ -144,7 +144,7 @@ module.exports = function lostColumnDecl(css, settings, result) {
144144
lostColumnGutter,
145145
lostColumnRounder,
146146
unit
147-
)
147+
),
148148
});
149149

150150
// IE 10-11 don't take into account box-sizing when calculating flex-basis, but
@@ -157,7 +157,7 @@ module.exports = function lostColumnDecl(css, settings, result) {
157157
lostColumnGutter,
158158
lostColumnRounder,
159159
unit
160-
)
160+
),
161161
});
162162

163163
if (gridDirection === 'rtl') {
@@ -266,12 +266,12 @@ module.exports = function lostColumnDecl(css, settings, result) {
266266
lostColumnGutter,
267267
lostColumnRounder,
268268
unit
269-
)
269+
),
270270
});
271271
} else {
272272
decl.cloneBefore({
273273
prop: 'width',
274-
value: 'auto'
274+
value: 'auto',
275275
});
276276

277277
if (gridDirection === 'rtl') {

lib/lost-flex-container.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ module.exports = function lostFlexContainerDecl(css) {
44
) {
55
decl.cloneBefore({
66
prop: 'display',
7-
value: 'flex'
7+
value: 'flex',
88
});
99

1010
if (decl.value === 'column') {
1111
decl.cloneBefore({
1212
prop: 'flex-flow',
13-
value: 'column nowrap'
13+
value: 'column nowrap',
1414
});
1515
} else {
1616
decl.cloneBefore({
1717
prop: 'flex-flow',
18-
value: 'row wrap'
18+
value: 'row wrap',
1919
});
2020
}
2121

lib/lost-masonry-column.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module.exports = function lostMasonryColumnDecl(css, settings) {
1515
Object.keys(props).forEach(function traverseProps(prop) {
1616
decl.cloneBefore({
1717
prop: prop,
18-
value: props[prop]
18+
value: props[prop],
1919
});
2020
});
2121
}
@@ -78,12 +78,12 @@ module.exports = function lostMasonryColumnDecl(css, settings) {
7878
if (lostMasonryColumnFlexbox === 'flex') {
7979
decl.cloneBefore({
8080
prop: 'flex',
81-
value: '0 0 auto'
81+
value: '0 0 auto',
8282
});
8383
} else {
8484
decl.cloneBefore({
8585
prop: 'float',
86-
value: 'left'
86+
value: 'left',
8787
});
8888
}
8989

@@ -102,14 +102,14 @@ module.exports = function lostMasonryColumnDecl(css, settings) {
102102
lostMasonryColumnGutterUnit,
103103
'margin-right':
104104
parseInt(lostMasonryColumnGutter, 10) / 2 +
105-
lostMasonryColumnGutterUnit
105+
lostMasonryColumnGutterUnit,
106106
});
107107
} else {
108108
cloneAllBefore({
109109
width:
110110
'calc(' + lostMasonryColumnRounder + '% * ' + lostMasonryColumn + ')',
111111
'margin-left': parseInt(lostMasonryColumnGutter, 10) / 2,
112-
'margin-right': parseInt(lostMasonryColumnGutter, 10) / 2
112+
'margin-right': parseInt(lostMasonryColumnGutter, 10) / 2,
113113
});
114114
}
115115

lib/lost-masonry-wrap.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module.exports = function lostMasonryWrapDecl(css, settings) {
1313
Object.keys(props).forEach(function traverseProps(prop) {
1414
decl.cloneBefore({
1515
prop: prop,
16-
value: props[prop]
16+
value: props[prop],
1717
});
1818
});
1919
}
@@ -70,12 +70,12 @@ module.exports = function lostMasonryWrapDecl(css, settings) {
7070
} else {
7171
decl.cloneBefore({
7272
prop: 'display',
73-
value: 'flex'
73+
value: 'flex',
7474
});
7575

7676
decl.cloneBefore({
7777
prop: 'flex-flow',
78-
value: 'row wrap'
78+
value: 'row wrap',
7979
});
8080
}
8181

@@ -85,7 +85,7 @@ module.exports = function lostMasonryWrapDecl(css, settings) {
8585
'margin-left':
8686
parseInt(lostMasonryWrapGutter, 10) / -2 + lostMasonryWrapGutterUnit,
8787
'margin-right':
88-
parseInt(lostMasonryWrapGutter, 10) / -2 + lostMasonryWrapGutterUnit
88+
parseInt(lostMasonryWrapGutter, 10) / -2 + lostMasonryWrapGutterUnit,
8989
});
9090

9191
decl.remove();

lib/lost-move.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ module.exports = function lostMoveDecl(css, settings) {
7373

7474
decl.cloneBefore({
7575
prop: 'position',
76-
value: 'relative'
76+
value: 'relative',
7777
});
7878

7979
if (lostMoveDirection === 'column') {
@@ -93,12 +93,12 @@ module.exports = function lostMoveDecl(css, settings) {
9393
lostMove +
9494
') + ' +
9595
lostMoveGutter +
96-
')'
96+
')',
9797
});
9898
} else {
9999
decl.cloneBefore({
100100
prop: 'top',
101-
value: 'calc(' + lostMoveRounder + '% * ' + lostMove + ')'
101+
value: 'calc(' + lostMoveRounder + '% * ' + lostMove + ')',
102102
});
103103
}
104104
} else if (lostMoveGutter !== '0') {
@@ -117,12 +117,12 @@ module.exports = function lostMoveDecl(css, settings) {
117117
lostMove +
118118
') + ' +
119119
lostMoveGutter +
120-
')'
120+
')',
121121
});
122122
} else {
123123
decl.cloneBefore({
124124
prop: 'left',
125-
value: 'calc(' + lostMoveRounder + '% * ' + lostMove + ')'
125+
value: 'calc(' + lostMoveRounder + '% * ' + lostMove + ')',
126126
});
127127
}
128128

0 commit comments

Comments
 (0)