Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
make sure every type of config file is considered before applying def…
Browse files Browse the repository at this point in the history
…aults
  • Loading branch information
zaggino committed Dec 14, 2015
1 parent d9faa73 commit 7917a2d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/extensions/default/ESLint/domain.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@
var ignorePath;

if (projectRoot) {
configPath = projectRoot + '.eslintrc';
try {
if (fs.statSync(configPath).isFile()) {
noop();
var dirContent = fs.readdirSync(projectRoot);
dirContent = dirContent.filter(function (entry) {
return entry.match(/^\.eslintrc(\.(js|yaml|yml|json))?$/);
});
if (dirContent.length === 0) {
throw new Error('no config file found!');
}
} catch (e) {
// config file not found, use default
Expand Down

0 comments on commit 7917a2d

Please sign in to comment.