Skip to content

Commit

Permalink
Chore: Move lib/logging and lib/timing to lib/util/ (refs #10559) (#1…
Browse files Browse the repository at this point in the history
…0579)

* Chore: Move lib/logging to lib/util/logging

* Chore: Move lib/timing to lib/util/timing
  • Loading branch information
platinumazure committed Jul 9, 2018
1 parent 64dfa21 commit 1e88170
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion lib/cli.js
Expand Up @@ -20,7 +20,7 @@ const fs = require("fs"),
options = require("./options"),
CLIEngine = require("./cli-engine"),
mkdirp = require("mkdirp"),
log = require("./logging");
log = require("./util/logging");

const debug = require("debug")("eslint:cli");

Expand Down
2 changes: 1 addition & 1 deletion lib/config/config-initializer.js
Expand Up @@ -20,7 +20,7 @@ const util = require("util"),
ModuleResolver = require("../util/module-resolver"),
npmUtil = require("../util/npm-util"),
recConfig = require("../../conf/eslint-recommended"),
log = require("../logging");
log = require("../util/logging");

const debug = require("debug")("eslint:config-initializer");

Expand Down
2 changes: 1 addition & 1 deletion lib/linter.js
Expand Up @@ -24,7 +24,7 @@ const eslintScope = require("eslint-scope"),
Traverser = require("./util/traverser"),
createReportTranslator = require("./report-translator"),
Rules = require("./rules"),
timing = require("./timing"),
timing = require("./util/timing"),
astUtils = require("./ast-utils"),
pkg = require("../package.json"),
SourceCodeFixer = require("./util/source-code-fixer");
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/util/npm-util.js
Expand Up @@ -12,7 +12,7 @@
const fs = require("fs"),
spawn = require("cross-spawn"),
path = require("path"),
log = require("../logging");
log = require("./logging");

//------------------------------------------------------------------------------
// Helpers
Expand Down
File renamed without changes.
26 changes: 13 additions & 13 deletions tests/lib/cli.js
Expand Up @@ -37,7 +37,7 @@ describe("cli", () => {
error: sinon.spy()
};
const cli = proxyquire("../../lib/cli", {
"./logging": log
"./util/logging": log
});

/**
Expand All @@ -58,7 +58,7 @@ describe("cli", () => {

const localCLI = proxyquire("../../lib/cli", {
"./cli-engine": fakeCLIEngine,
"./logging": log
"./util/logging": log
});

localCLI.execute(cmd);
Expand Down Expand Up @@ -697,7 +697,7 @@ describe("cli", () => {

localCLI = proxyquire("../../lib/cli", {
"./cli-engine": fakeCLIEngine,
"./logging": log
"./util/logging": log
});

localCLI.execute("--no-inline-config .");
Expand All @@ -719,7 +719,7 @@ describe("cli", () => {

localCLI = proxyquire("../../lib/cli", {
"./cli-engine": fakeCLIEngine,
"./logging": log
"./util/logging": log
});

const exitCode = localCLI.execute(".");
Expand Down Expand Up @@ -755,7 +755,7 @@ describe("cli", () => {

localCLI = proxyquire("../../lib/cli", {
"./cli-engine": fakeCLIEngine,
"./logging": log
"./util/logging": log
});

const exitCode = localCLI.execute("--fix .");
Expand Down Expand Up @@ -791,7 +791,7 @@ describe("cli", () => {

localCLI = proxyquire("../../lib/cli", {
"./cli-engine": fakeCLIEngine,
"./logging": log
"./util/logging": log
});

const exitCode = localCLI.execute("--fix .");
Expand Down Expand Up @@ -828,7 +828,7 @@ describe("cli", () => {

localCLI = proxyquire("../../lib/cli", {
"./cli-engine": fakeCLIEngine,
"./logging": log
"./util/logging": log
});

const exitCode = localCLI.execute("--fix --quiet .");
Expand All @@ -844,7 +844,7 @@ describe("cli", () => {

localCLI = proxyquire("../../lib/cli", {
"./cli-engine": fakeCLIEngine,
"./logging": log
"./util/logging": log
});

const exitCode = localCLI.execute("--fix .", "foo = bar;");
Expand Down Expand Up @@ -878,7 +878,7 @@ describe("cli", () => {

localCLI = proxyquire("../../lib/cli", {
"./cli-engine": fakeCLIEngine,
"./logging": log
"./util/logging": log
});

const exitCode = localCLI.execute("--fix-dry-run .");
Expand Down Expand Up @@ -914,7 +914,7 @@ describe("cli", () => {

localCLI = proxyquire("../../lib/cli", {
"./cli-engine": fakeCLIEngine,
"./logging": log
"./util/logging": log
});

const exitCode = localCLI.execute("--fix-dry-run .");
Expand Down Expand Up @@ -951,7 +951,7 @@ describe("cli", () => {

localCLI = proxyquire("../../lib/cli", {
"./cli-engine": fakeCLIEngine,
"./logging": log
"./util/logging": log
});

const exitCode = localCLI.execute("--fix-dry-run --quiet .");
Expand Down Expand Up @@ -987,7 +987,7 @@ describe("cli", () => {

localCLI = proxyquire("../../lib/cli", {
"./cli-engine": fakeCLIEngine,
"./logging": log
"./util/logging": log
});

const exitCode = localCLI.execute("--fix-dry-run .", "foo = bar;");
Expand All @@ -1002,7 +1002,7 @@ describe("cli", () => {

localCLI = proxyquire("../../lib/cli", {
"./cli-engine": fakeCLIEngine,
"./logging": log
"./util/logging": log
});

const exitCode = localCLI.execute("--fix --fix-dry-run .", "foo = bar;");
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/config/config-initializer.js
Expand Up @@ -41,7 +41,7 @@ describe("configInitializer", () => {
error: sinon.spy()
};
const requireStubs = {
"../logging": log,
"../util/logging": log,
"../util/module-resolver": class ModuleResolver {

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/util/npm-util.js
Expand Up @@ -12,7 +12,7 @@ const assert = require("chai").assert,
spawn = require("cross-spawn"),
sinon = require("sinon"),
npmUtil = require("../../../lib/util/npm-util"),
log = require("../../../lib/logging"),
log = require("../../../lib/util/logging"),
mockFs = require("mock-fs");

//------------------------------------------------------------------------------
Expand Down

0 comments on commit 1e88170

Please sign in to comment.