Skip to content

Commit

Permalink
Fix: Correct error and test messages to fit config search path (#9428)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrpool authored and ilyavolodin committed Oct 14, 2017
1 parent 62a323c commit 85388fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion messages/no-config-found.txt
Expand Up @@ -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
6 changes: 4 additions & 2 deletions tests/bin/eslint.js
Expand Up @@ -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 => {
Expand Down

0 comments on commit 85388fb

Please sign in to comment.