Skip to content

Commit b08d69c

Browse files
authored
Merge pull request #1 from fredj/eslint
Add eslint configuration
2 parents 2a5eb0b + bb8be49 commit b08d69c

File tree

4 files changed

+18
-4
lines changed

4 files changed

+18
-4
lines changed

.eslintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"extends": "openlayers",
3+
"rules": {
4+
"no-var": "off"
5+
}
6+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ module.exports = function(fonts, size, lineHeight) {
3737
}
3838
var weight = 400;
3939
var style = 'normal';
40-
var fontFamilies = []
40+
var fontFamilies = [];
4141
var haveWeight, haveStyle;
4242
for (var i = 0, ii = fonts.length; i < ii; ++i) {
4343
var font = fonts[i];
@@ -62,7 +62,7 @@ module.exports = function(fonts, size, lineHeight) {
6262
weight = maybeWeight;
6363
}
6464
var fontFamily = parts.join(sp)
65-
.replace('Klokantech Noto Sans', 'Noto Sans');
65+
.replace('Klokantech Noto Sans', 'Noto Sans');
6666
if (fontFamily.indexOf(sp) !== -1) {
6767
fontFamily = '"' + fontFamily + '"';
6868
}
@@ -72,4 +72,4 @@ module.exports = function(fonts, size, lineHeight) {
7272
cssData = fontCache[fonts] = [style, weight, fontFamilies];
7373
}
7474
return cssData[0] + sp + cssData[1] + sp + size + 'px' + (lineHeight ? '/' + lineHeight : '') + sp + cssData[2];
75-
}
75+
};

package.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,12 @@
1212
"font"
1313
],
1414
"author": "Andreas Hocevar",
15-
"license": "BSD-2-Clause"
15+
"license": "BSD-2-Clause",
16+
"scripts": {
17+
"lint": "eslint *.js"
18+
},
19+
"devDependencies": {
20+
"eslint": "^5.15.0",
21+
"eslint-config-openlayers": "^11.0.0"
22+
}
1623
}

0 commit comments

Comments
 (0)