Skip to content

Commit b5fa517

Browse files
author
Peter Ramsing
committed
👕 Lint fix - spaces and parens added
1 parent 0fcb127 commit b5fa517

12 files changed

+21
-23
lines changed

lib/core/lg-logic.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
calcValue: function(fraction, gutter, rounder, unit) {
2+
calcValue: function (fraction, gutter, rounder, unit) {
33
var calcValue = '';
44
var gutterLogic = '';
55

@@ -18,18 +18,18 @@ module.exports = {
1818
calcValue = `calc(${rounder}${unit} * ${fraction}${gutterLogic})`;
1919
return calcValue;
2020
},
21-
validateUnit: function(value, validUnits) {
21+
validateUnit: function (value, validUnits) {
2222
var validation = false;
2323

2424
if (validUnits.indexOf(value) !== -1) {
2525
validation = true;
2626
}
2727
return validation;
2828
},
29-
parseLostProperty: function(nodes, propertyName, defaultPropertyValue) {
29+
parseLostProperty: function (nodes, propertyName, defaultPropertyValue) {
3030
var propertyValue = defaultPropertyValue;
3131

32-
nodes.forEach(declaration => {
32+
nodes.forEach((declaration) => {
3333
if (declaration.prop === propertyName) {
3434
propertyValue = declaration.value;
3535
declaration.remove();

lib/core/lg-utilities.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ const hToD = function hToD(...h) {
9191
const safeRgbToRgb = function safeRgbToRgb(rgb) {
9292
var value = extractRgbSubstring(rgb)
9393
.split(',')
94-
.map(function(a) {
94+
.map(function (a) {
9595
var b = parseInt(a, 10);
9696
return !isNaN(b) ? b : 0;
9797
});

lib/lost-center.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = function lostCenterDecl(css, settings, result) {
1414
var lostColumnGutter = 0;
1515
var validUnits = ['%', 'vw'];
1616

17-
var isFractionValue = value => {
17+
var isFractionValue = (value) => {
1818
var lostFractionPattern = /^\d+\/\d+$/;
1919
return lostFractionPattern.test(value);
2020
};

lib/lost-column.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module.exports = function lostColumnDecl(css, settings, result) {
6161
// Converts the cycle to an integer so that checks on whether it's 0 make sense
6262
lostColumnCycle = parseInt(lostColumnCycle);
6363

64-
decl.parent.nodes.forEach(declaration => {
64+
decl.parent.nodes.forEach((declaration) => {
6565
if (declaration.prop === 'lost-unit') {
6666
if (lgLogic.validateUnit(declaration.value, validUnits)) {
6767
unit = declaration.value;

lib/lost-gutter.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ var lostGutterLocal = require('./lost-vars-gutter-local');
44
module.exports = function lgGutter(css, settings) {
55
var gutter, newValue;
66

7-
css.walkDecls(declaration => {
7+
css.walkDecls((declaration) => {
88
if (
99
/(\$lost-gutter)/g.test(declaration.value) &&
1010
!/(\$lost-gutter-local)/g.test(declaration.value)

lib/lost-move.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = function lostMoveDecl(css, settings) {
2727
}
2828
});
2929

30-
decl.parent.nodes.forEach(declaration => {
30+
decl.parent.nodes.forEach((declaration) => {
3131
if (declaration.prop === 'lost-column') {
3232
var columnArray = declaration.value.split(' ');
3333
if (columnArray[2]) {
@@ -39,7 +39,7 @@ module.exports = function lostMoveDecl(css, settings) {
3939
}
4040
});
4141

42-
decl.parent.nodes.forEach(declaration => {
42+
decl.parent.nodes.forEach((declaration) => {
4343
if (declaration.prop === 'lost-row') {
4444
var rowArray = declaration.value.split(' ');
4545
if (rowArray[1]) {

lib/lost-row.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ module.exports = function lostRowDecl(css, settings, result) {
5656
}
5757
});
5858

59-
decl.parent.nodes.forEach(declaration => {
59+
decl.parent.nodes.forEach((declaration) => {
6060
if (declaration.prop === 'lost-unit') {
6161
if (lgLogic.validateUnit(declaration.value, validUnits)) {
6262
unit = declaration.value;

lib/lost-vars-gutter-local.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = function lostVarsGutterLocal(declaration, settings) {
22
var newLocalValue = settings.gutter;
33

4-
declaration.parent.nodes.forEach(parentDeclaration => {
4+
declaration.parent.nodes.forEach((parentDeclaration) => {
55
var declarationArray = parentDeclaration.value.split(' ');
66

77
if (

lib/lost-vars.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var variableFunctions = {
77
};
88

99
module.exports = function lostVarsDecl(css, settings) {
10-
css.walkDecls(declaration => {
10+
css.walkDecls((declaration) => {
1111
var value = declaration.value,
1212
variables = [],
1313
// eslint-disable-next-line
@@ -26,7 +26,7 @@ module.exports = function lostVarsDecl(css, settings) {
2626
}
2727
}
2828

29-
variables.forEach(variable => {
29+
variables.forEach((variable) => {
3030
var func = variableFunctions[variable];
3131

3232
if (typeof func !== 'function') {

lib/lost-waffle.js

+2-4
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,13 @@ module.exports = function lostWaffleDecl(css, settings) {
8989
}
9090
});
9191

92-
decl.parent.nodes.forEach(declaration => {
92+
decl.parent.nodes.forEach((declaration) => {
9393
if (declaration.prop === 'lost-unit') {
9494
if (lgLogic.validateUnit(declaration.value, validUnits)) {
9595
unit = declaration.value;
9696
} else {
9797
throw declaration.error(
98-
`lost-unit: property ${
99-
declaration.value
100-
} is not a valid unit for lost-waffle.`
98+
`lost-unit: property ${declaration.value} is not a valid unit for lost-waffle.`
10199
);
102100
}
103101
declaration.remove();

lost.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ const defaultSettings = {
4646
direction: 'ltr',
4747
};
4848

49-
module.exports = postcss.plugin('lost', settings => {
49+
module.exports = postcss.plugin('lost', (settings) => {
5050
let runSettings = assign({}, defaultSettings, settings | {});
5151
return (css, result) => {
52-
libs.forEach(lib => {
52+
libs.forEach((lib) => {
5353
lib(css, runSettings, result);
5454
});
5555
};

test/.eslintrc.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module.exports = {
2-
env: {
3-
mocha: true
4-
}
2+
env: {
3+
mocha: true,
4+
},
55
};

0 commit comments

Comments
 (0)