Skip to content

Commit bf27083

Browse files
committed
added eslint to devDependencies. removed dead function
1 parent 3a4ecc2 commit bf27083

File tree

4 files changed

+14
-23
lines changed

4 files changed

+14
-23
lines changed

builder/list_item_hunter.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
*
99
*/
1010

11-
1211
"use strict";
1312

1413
var list_item_hunter = function () {

builder/pattern_assembler.js

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/*
2-
* patternlab-node - v1.1.3 - 2016
3-
*
1+
/*
2+
* patternlab-node - v1.1.3 - 2016
3+
*
44
* Brian Muenzenmeyer, and the web community.
5-
* Licensed under the MIT license.
6-
*
7-
* Many thanks to Brad Frost and Dave Olsen for inspiration, encouragement, and advice.
5+
* Licensed under the MIT license.
6+
*
7+
* Many thanks to Brad Frost and Dave Olsen for inspiration, encouragement, and advice.
88
*
99
*/
1010

@@ -13,13 +13,6 @@
1313

1414
var pattern_assembler = function () {
1515

16-
function isObjectEmpty(obj) {
17-
for (var prop in obj) {
18-
if (obj.hasOwnProperty(prop)) { return false; }
19-
}
20-
return true;
21-
}
22-
2316
// returns any patterns that match {{> value:mod }} or {{> value:mod(foo:"bar") }} within the pattern
2417
function findPartialsWithStyleModifiers(pattern) {
2518
var matches = pattern.template.match(/{{>([ ])?([\w\-\.\/~]+)(?!\()(\:[A-Za-z0-9-_|]+)+(?:(| )\(.*)?([ ])?}}/g);
@@ -67,7 +60,7 @@ var pattern_assembler = function () {
6760
break;
6861
}
6962
}
70-
63+
7164
//if the pattern is new, just push to the array
7265
if (isNew) {
7366
patternlab.patterns.push(pattern);
@@ -249,7 +242,7 @@ var pattern_assembler = function () {
249242

250243
function getpatternbykey(key, patternlab) {
251244
var i; // for the for loops
252-
245+
253246
//look for exact key matches
254247
for (i = 0; i < patternlab.patterns.length; i++) {
255248
if (patternlab.patterns[i].key === key) {
@@ -271,7 +264,7 @@ var pattern_assembler = function () {
271264
var keyParts = key.split('-'),
272265
keyType = keyParts[0],
273266
keyName = keyParts.slice(1).join('-');
274-
267+
275268
if (patternlab.patterns[i].key.split('-')[0] === keyType && patternlab.patterns[i].key.indexOf(keyName) > -1) {
276269
return patternlab.patterns[i];
277270
}
@@ -293,7 +286,7 @@ var pattern_assembler = function () {
293286
obj2[p] = {};
294287
}
295288
obj2[p] = mergeData(obj1[p], obj2[p]);
296-
289+
297290
// Pop when recursion meets a non-object. If obj1[p] is a non-object,
298291
// only copy to undefined obj2[p]. This way, obj2 maintains priority.
299292
} else if (typeof obj2[p] === 'undefined') {
@@ -360,7 +353,7 @@ var pattern_assembler = function () {
360353
}
361354
return JSON.parse(dataObjAsString);
362355
}
363-
356+
364357
//look for pattern links included in data files.
365358
//these will be in the form of link.* WITHOUT {{}}, which would still be there from direct pattern inclusion
366359
function parseDataLinks(patternlab) {
@@ -411,9 +404,6 @@ var pattern_assembler = function () {
411404
combine_listItems: function (patternlab) {
412405
buildListItems(patternlab);
413406
},
414-
is_object_empty: function (obj) {
415-
return isObjectEmpty(obj);
416-
},
417407
parse_data_links: function (patternlab) {
418408
parseDataLinks(patternlab);
419409
}

package.gulp.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
},
1414
"devDependencies": {
1515
"browser-sync": "^2.11.1",
16+
"eslint": "^2.2.0",
1617
"gulp": "^3.9.0",
1718
"gulp-connect": "^2.3.1",
1819
"gulp-copy": "0.0.2",

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
},
1414
"devDependencies": {
1515
"bs-html-injector": "^3.0.0",
16+
"eslint": "^2.2.0",
1617
"grunt": "~0.4.5",
17-
"grunt-contrib-concat": "^0.5.1",
1818
"grunt-browser-sync": "^2.2.0",
19+
"grunt-contrib-concat": "^0.5.1",
1920
"grunt-contrib-copy": "^0.8.2",
2021
"grunt-contrib-nodeunit": "^0.4.1",
2122
"grunt-contrib-watch": "^0.6.1"

0 commit comments

Comments
 (0)