From 85388fb79dd3c4f7beb03e024fe34c34bf5bc408 Mon Sep 17 00:00:00 2001 From: Jonathan Pool Date: Sat, 14 Oct 2017 11:28:55 -0700 Subject: [PATCH] Fix: Correct error and test messages to fit config search path (#9428) --- messages/no-config-found.txt | 2 +- tests/bin/eslint.js | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/messages/no-config-found.txt b/messages/no-config-found.txt index c5fb0200765..2f95c41b8c7 100644 --- a/messages/no-config-found.txt +++ b/messages/no-config-found.txt @@ -2,6 +2,6 @@ ESLint couldn't find a configuration file. To set up a configuration file for th eslint --init -ESLint looked for configuration files in <%= directory %> and its ancestors. +ESLint looked for configuration files in <%= directory %> and its ancestors. If it found none, it then looked in your home directory. If you think you already have a configuration file or if you need more help, please stop by the ESLint chat room: https://gitter.im/eslint/eslint diff --git a/tests/bin/eslint.js b/tests/bin/eslint.js index 04ae01f3d84..6c7cd09903e 100644 --- a/tests/bin/eslint.js +++ b/tests/bin/eslint.js @@ -122,8 +122,10 @@ describe("bin/eslint.js", () => { return assertExitCode(child, 1); }); - it("gives a detailed error message if no config file is found", () => { - const child = runESLint(["--stdin"], { cwd: "/" }); // Assumes the root directory has no .eslintrc file + it("gives a detailed error message if no config file is found in / or in ~/", () => { + + // Assumes the root and home directories have no .eslintrc file. + const child = runESLint(["--stdin"], { cwd: "/" }); const exitCodePromise = assertExitCode(child, 1); const stdoutPromise = getOutput(child).then(output => {