Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Correct error and test messages to fit config search path #9428

Merged
merged 1 commit into from
Oct 14, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion messages/no-config-found.txt
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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