Issue #51: Add linter to .gitlabci.yml

Signed-off-by: Lucas Fernandes de Oliveira's avatarLucas Fernandes de Oliveira <lfo14@inf.ufpr.br>
parent d034968b
Pipeline #13698 passed with stage
in 52 seconds
......@@ -19,6 +19,7 @@ run_tests:
script:
- mv config/ci_test.yaml.example config/test.yaml
- npm test
- npm run lint
tags:
- node
- postgres
......@@ -646,7 +646,7 @@ export class PostgresAdapter extends Adapter {
// Joins
let conds: string[] = [];
for (let i in dimMap) {
for (let i of Object.keys(dimMap)) {
let remainViews = dimMap[i].views.slice();
let dim = dimMap[i].dim;
let leftSide = this.buildColumn(dim, remainViews.shift().id);
......
......@@ -311,7 +311,7 @@ describe("engine class", () => {
"==": FilterOperator.EQUAL,
"!=": FilterOperator.NOTEQUAL
};
for (let op in operators) {
for (let op of Object.keys(operators)) {
const strFilter = "dim:0" + op + "0";
const clause = engine.parseClause(strFilter);
expect(clause).to.be.an("object");
......@@ -328,7 +328,7 @@ describe("engine class", () => {
expect(clause.filters[0].operator).to.be.equal(operators[op]);
}
for (let op in operators) {
for (let op of Object.keys(operators)) {
const strFilter = "dim:2" + op + "0";
const clause = engine.parseClause(strFilter);
expect(clause).to.be.an("object");
......
......@@ -339,7 +339,7 @@ export class Graph {
let queue: Vertex[] = [root];
while (queue.length > 0) {
let v: Vertex = queue.shift();
for (let key in v.neighbors) {
for (let key of Object.keys(v.neighbors)) {
let u: Vertex = this.verticeMap[key];
if (this.canVisit(u, v.neighbors[key], clauses)) {
// Mark all vertices visited by the search
......@@ -414,7 +414,7 @@ export class Graph {
let views: View[] = [];
// Pick all views that contain the root vertex
for (let i in root.neighbors) {
for (let i of Object.keys(root.neighbors)) {
views = views.concat(root.neighbors[i].filter((item) => {
return item.isView &&
this.passConstraints(clauses, item.view.clauses);
......
......@@ -138,7 +138,7 @@ export class Fixture {
for (let i = 0; i < rows.length; ++i) {
let values = [];
let keys = [];
for (let key in rows[i]) {
for (let key of Object.keys(rows[i])) {
keys.push("\"" + key + "\"");
values.push("'" + rows[i][key] + "'");
}
......
......@@ -5,6 +5,8 @@
"object-literal-sort-keys": false,
"one-line": false,
"trailing-comma": false,
"interface-name": false
"interface-name": false,
"max-line-length": false,
"member-ordering": false
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment