Skip to content

Commit ef15df7

Browse files
fix lint errors
Signed-off-by: NeelParihar <neel@terminusdb.com>
1 parent 0130d58 commit ef15df7

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

lib/query/woqlCore.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,11 @@ WOQLQuery.prototype.asv = function (colname_or_index, variable, type) {
168168
asvar['@type'] = 'Column';
169169
asvar.indicator = { '@type': 'Indicator', name: colname_or_index };
170170
}
171-
if (variable instanceof Var){
172-
asvar.variable = variable.name
173-
}else if (variable.substring(0, 2) === 'v:'){
171+
if (variable instanceof Var) {
172+
asvar.variable = variable.name;
173+
} else if (variable.substring(0, 2) === 'v:') {
174174
asvar.variable = variable.substring(2);
175-
}else{
175+
} else {
176176
asvar.variable = variable;
177177
}
178178
if (type) asvar.type = type;

lib/query/woqlDoc.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ function convert(obj) {
2626
'@value': obj,
2727
},
2828
};
29+
// eslint-disable-next-line no-use-before-define
2930
} if (obj instanceof Var) {
3031
return {
31-
'@type' : 'Value',
32-
variable : obj.name,
33-
}
32+
'@type': 'Value',
33+
variable: obj.name,
34+
};
3435
} if (typeof (obj) === 'object') {
3536
const pairs = [];
3637
// eslint-disable-next-line no-restricted-syntax

lib/query/woqlQuery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ WOQLQuery.prototype.as = function (...varList) {
413413
} else if (typeof varList[0] === 'number' || typeof varList[0] === 'string') {
414414
if (varList[2] && typeof varList[2] === 'string') {
415415
var oasv = this.asv(varList[0], varList[1], varList[2]);
416-
} else if (varList[1] && varList[1] instanceof Var){
416+
} else if (varList[1] && varList[1] instanceof Var) {
417417
var oasv = this.asv(varList[0], varList[1]);
418418
} else if (varList[1] && typeof varList[1] === 'string') {
419419
if (varList[1].substring(0, 4) === 'xsd:' || varList[1].substring(0, 4) === 'xdd:') {

0 commit comments

Comments
 (0)