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

Improve "no valid rules" error message to include file type #3729

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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