Skip to content

Commit

Permalink
Improve "no valid rules" error message to include file type (palantir…
Browse files Browse the repository at this point in the history
…#3729)

* Improve "no valid rules" error message to include file type

* Lint
  • Loading branch information
OliverJAsh authored and giladgray committed May 3, 2018
1 parent baa413e commit c86193f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ruleLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ export function loadRules(ruleOptionsList: IOptions[],
showWarningOnce(warning);
}
if (rules.length === 0) {
showWarningOnce("No valid rules have been specified");
const fileType = isJs ? "JavaScript" : "TypeScript";
showWarningOnce(`No valid rules have been specified for ${fileType} files`);
}
return rules;
}
Expand Down

0 comments on commit c86193f

Please sign in to comment.