Skip to content

Commit f5cbd68

Browse files
committed
add wiseService to default lint list and fix some lints
1 parent 1be2281 commit f5cbd68

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
/wiseService/vueapp/dist/
88
/wiseService/node_modules
99
/wiseService/sprintf.js
10+
/wiseService/example.source.js
1011
/viewer/vueapp/build/
1112
/viewer/vueapp/config/
1213
/viewer/vueapp/dist/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"vuex": "^3.0.1"
5454
},
5555
"scripts": {
56-
"lint": "eslint --ext .js,.vue parliament viewer notifiers",
56+
"lint": "eslint --ext .js,.vue parliament viewer notifiers wiseService",
5757
"lint-viewer": "eslint --ext .js,.vue viewer",
5858
"lint-parliament": "eslint --ext .js,.vue parliament",
5959
"lint-wise": "eslint --ext .js,.vue wiseService",

wiseService/simpleSource.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ SimpleSource.prototype.initSimple = function () {
9393
// ----------------------------------------------------------------------------
9494
SimpleSource.prototype.getTypes = function () {
9595
return [this.type];
96-
}
96+
};
9797
// ----------------------------------------------------------------------------
9898
SimpleSource.prototype.load = function () {
9999
var setFunc;

wiseService/wiseService.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ internals.sourceApi = {
308308
}
309309
src.getTypes = function () {
310310
return types;
311-
}
311+
};
312312
}
313313

314314
for (let i = 0; i < types.length; i++) {
@@ -426,8 +426,8 @@ function funcName (typeName) {
426426
}
427427
// ----------------------------------------------------------------------------
428428
// This function adds a new type to the internals.types map of types.
429-
// If src is defined will add it to already defined types as src to query.
430-
function addType(type, src) {
429+
// If newSrc is defined will add it to already defined types as src to query.
430+
function addType (type, newSrc) {
431431
let typeInfo = internals.types[type];
432432
if (!typeInfo) {
433433
typeInfo = internals.types[type] = {
@@ -477,9 +477,9 @@ function addType(type, src) {
477477
} else {
478478
typeInfo.excludes = items.split(';').map(item => item.trim()).filter(item => item !== '').map(item => RegExp.fromWildExp(item, 'ailop'));
479479
}
480-
} else if (src !== undefined) {
481-
typeInfo.sources.push(src);
482-
src.srcInProgress[type] = [];
480+
} else if (newSrc !== undefined) {
481+
typeInfo.sources.push(newSrc);
482+
newSrc.srcInProgress[type] = [];
483483
}
484484
return typeInfo;
485485
}

wiseService/wiseSource.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,8 @@ WISESource.prototype.typeSetting = function () {
382382
this.typeFunc = this.api.funcName(this.type);
383383
if (this.getTypes === undefined) {
384384
this.getTypes = function () {
385-
return [src.type];
386-
}
385+
return [this.type];
386+
};
387387
}
388388
};
389389
// ----------------------------------------------------------------------------

0 commit comments

Comments
 (0)