From d64563eae1e50e53547b25b2f19b9e849db40ce8 Mon Sep 17 00:00:00 2001 From: Oliver Joseph Ash Date: Wed, 21 Feb 2018 13:03:55 +0000 Subject: [PATCH 1/2] Improve "no valid rules" error message to include file type --- src/ruleLoader.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ruleLoader.ts b/src/ruleLoader.ts index ee45cfebad8..e973bfbc59f 100644 --- a/src/ruleLoader.ts +++ b/src/ruleLoader.ts @@ -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; } From 02dbe45cd063cebf784061d67e20ce00b722d12f Mon Sep 17 00:00:00 2001 From: Oliver Joseph Ash Date: Fri, 16 Mar 2018 19:26:25 +0000 Subject: [PATCH 2/2] Lint --- src/ruleLoader.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ruleLoader.ts b/src/ruleLoader.ts index e973bfbc59f..ccd3d3b78cf 100644 --- a/src/ruleLoader.ts +++ b/src/ruleLoader.ts @@ -76,7 +76,7 @@ export function loadRules(ruleOptionsList: IOptions[], showWarningOnce(warning); } if (rules.length === 0) { - const fileType = isJs ? 'JavaScript' : 'TypeScript'; + const fileType = isJs ? "JavaScript" : "TypeScript"; showWarningOnce(`No valid rules have been specified for ${fileType} files`); } return rules;