Skip to content

Commit

Permalink
add wiseService to default lint list and fix some lints
Browse files Browse the repository at this point in the history
  • Loading branch information
awick committed Jul 18, 2020
1 parent 1be2281 commit f5cbd68
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/wiseService/vueapp/dist/
/wiseService/node_modules
/wiseService/sprintf.js
/wiseService/example.source.js
/viewer/vueapp/build/
/viewer/vueapp/config/
/viewer/vueapp/dist/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"vuex": "^3.0.1"
},
"scripts": {
"lint": "eslint --ext .js,.vue parliament viewer notifiers",
"lint": "eslint --ext .js,.vue parliament viewer notifiers wiseService",
"lint-viewer": "eslint --ext .js,.vue viewer",
"lint-parliament": "eslint --ext .js,.vue parliament",
"lint-wise": "eslint --ext .js,.vue wiseService",
Expand Down
2 changes: 1 addition & 1 deletion wiseService/simpleSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ SimpleSource.prototype.initSimple = function () {
// ----------------------------------------------------------------------------
SimpleSource.prototype.getTypes = function () {
return [this.type];
}
};
// ----------------------------------------------------------------------------
SimpleSource.prototype.load = function () {
var setFunc;
Expand Down
12 changes: 6 additions & 6 deletions wiseService/wiseService.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ internals.sourceApi = {
}
src.getTypes = function () {
return types;
}
};
}

for (let i = 0; i < types.length; i++) {
Expand Down Expand Up @@ -426,8 +426,8 @@ function funcName (typeName) {
}
// ----------------------------------------------------------------------------
// This function adds a new type to the internals.types map of types.
// If src is defined will add it to already defined types as src to query.
function addType(type, src) {
// If newSrc is defined will add it to already defined types as src to query.
function addType (type, newSrc) {
let typeInfo = internals.types[type];
if (!typeInfo) {
typeInfo = internals.types[type] = {
Expand Down Expand Up @@ -477,9 +477,9 @@ function addType(type, src) {
} else {
typeInfo.excludes = items.split(';').map(item => item.trim()).filter(item => item !== '').map(item => RegExp.fromWildExp(item, 'ailop'));
}
} else if (src !== undefined) {
typeInfo.sources.push(src);
src.srcInProgress[type] = [];
} else if (newSrc !== undefined) {
typeInfo.sources.push(newSrc);
newSrc.srcInProgress[type] = [];
}
return typeInfo;
}
Expand Down
4 changes: 2 additions & 2 deletions wiseService/wiseSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,8 @@ WISESource.prototype.typeSetting = function () {
this.typeFunc = this.api.funcName(this.type);
if (this.getTypes === undefined) {
this.getTypes = function () {
return [src.type];
}
return [this.type];
};
}
};
// ----------------------------------------------------------------------------
Expand Down

0 comments on commit f5cbd68

Please sign in to comment.