Skip to content

Commit

Permalink
improve error message when extended config doesn't existn
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Oct 7, 2016
1 parent a00cf57 commit 8829b33
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion options-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,13 @@ function buildConfig(opts) {
name = `eslint-config-${name}`;
}

return resolveFrom(opts.cwd, name);
const ret = resolveFrom(opts.cwd, name);

if (!ret) {
throw new Error(`Couldn't find ESLint config: ${name}`);
}

return ret;
});

config.baseConfig.extends = config.baseConfig.extends.concat(configs);
Expand Down

0 comments on commit 8829b33

Please sign in to comment.