Skip to content

Commit

Permalink
fix: CI failing due to linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
jchip committed Apr 23, 2020
1 parent 89fe343 commit 43436ad
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 9 deletions.
2 changes: 1 addition & 1 deletion packages/xarc-app-dev/lib/dev-admin/admin-server.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ ${instruction}`
store.push(false);
}

let str = data.toString();
const str = data.toString();
if (!str.trim()) {
store.push("");
logger.info("");
Expand Down
1 change: 0 additions & 1 deletion packages/xarc-app-dev/lib/dev-admin/console-io.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
/* eslint-disable no-console, no-process-exit */

const readline = require("readline");
const logUpdate = require("log-update");
const VisualLogger = require("visual-logger");

class ConsoleIO extends VisualLogger {
Expand Down
2 changes: 2 additions & 0 deletions packages/xarc-app-dev/lib/dev-admin/dev-hapi.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ function register(server, options, next) {
console.error("webpack dev middleware error", err);
reply(err);
});

return undefined;
}
});

Expand Down
8 changes: 5 additions & 3 deletions packages/xarc-app-dev/lib/dev-admin/log-parser.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"use strict";

const ck = require("chalker");
const { Levels } = require("./log-reader");
/* eslint-disable max-statements, complexity */

const ck = require("chalker");
const FyiTag = ck`<yellow.inverse>[fyi]</> `;
const BunyanTag = ck`<cyan.inverse>[app]</> `;

Expand Down Expand Up @@ -33,7 +33,9 @@ function parse(str) {
if (str[0] === "{" || str[0] === "[") {
jsonData = JSON.parse(str);
}
} catch {}
} catch {
//
}

let message;
let level;
Expand Down
18 changes: 15 additions & 3 deletions packages/xarc-app-dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,28 @@
"xsh": "^0.4.4"
},
"devDependencies": {
"@types/chai": "^4.2.11",
"@types/mocha": "^7.0.2",
"@types/sinon": "^9.0.0",
"@types/sinon-chai": "^3.2.4",
"@xarc/app": "../xarc-app",
"@xarc/module-dev": "^2.0.3",
"@xarc/module-dev": "^2.1.0",
"babel-eslint": "^10.1.0",
"chai": "^4.0.0",
"chai": "^4.2.0",
"electrode-archetype-opt-postcss": "../electrode-archetype-opt-postcss",
"electrode-archetype-opt-sass": "../electrode-archetype-opt-sass",
"electrode-archetype-opt-stylus": "../electrode-archetype-opt-stylus",
"eslint": "^6.8.0",
"eslint-config-walmart": "^2.2.1",
"eslint-plugin-filenames": "^1.1.0",
"eslint-plugin-jsdoc": "^21.0.0",
"mocha": "^7.1.0",
"mock-require": "^3.0.3",
"nyc": "^15.0.0",
"prettier": "^1.14.2",
"run-verify": "^1.2.1"
"run-verify": "^1.2.1",
"sinon": "^7.2.6",
"sinon-chai": "^3.3.0"
},
"engines": {
"node": ">= 10",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";

const expect = require("chai").expect;
const { BunyanTag, FyiTag, parse } = require("../../../lib/dev-admin/log-parser");
const { parse } = require("../../../lib/dev-admin/log-parser");

describe("log-parser", function() {
it("should return correct level and message for a simple error", () => {
Expand Down

0 comments on commit 43436ad

Please sign in to comment.