Skip to content

Commit

Permalink
add error message if eslint is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
rizowski committed Jul 17, 2019
1 parent 37a57ce commit 769932b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/eslint/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ const eslint = {
} catch (error) {
logger.debug(error);

if (error.errno === 'ENOENT' && error.path === 'eslint') {
throw new Error("Error: Eslint was not found either globally or locally.\nRun 'npm i -g eslint' or 'npm i -D eslint' to resolve the issue.");
}

throw new Error(error.stdout || error.stderr);
}
},
Expand Down

0 comments on commit 769932b

Please sign in to comment.