eslint/eslint — pull request #951 by jrajav (2014-06-03 16:19:44+00:00)
Title: Update: Search parent directories for .eslintignore (Fixes #933)

Fixes #933. Corrected to throw errors instead of just logging them based on discussion in #947. Changed tests to use `assert.throws` based on advice in #949.

The refactor from #928 retained Config's `.findIgnoreFile()` method but didn't use it anywhere, thus skirting FileFinder's logic to search up through parent directories. This change merges that refactor and the logic from before which did use `.findIgnoreFile()`, restoring the behavior of searching parent directories if `.eslintignore` is not found in the current directory. Unlike for configs, multiple ignore files will not be merged, the first found will be the only one used. If an ignorePath is given as a command line option, that path will be the only location checked, parent directories will not be considered.

Tests added to confirm the change and the error throwing, and other minor cleanup / consistency relevant to changes in config.js.