From eb59b83eb03d0c91abacefe075d2608b3b82bf2e Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 8 Feb 2017 16:42:21 -0800 Subject: [PATCH] Enforce comparing `typeof` expressions against string literals (valid-typeof) Adds { "requireStringLiterals": true } to the 'valid-typeof' rule that we already enforce. Fixes: https://github.com/feross/standard/issues/629 --- eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eslintrc.json b/eslintrc.json index 9021bfba..6b35228f 100644 --- a/eslintrc.json +++ b/eslintrc.json @@ -156,7 +156,7 @@ "template-tag-spacing": ["error", "never"], "unicode-bom": ["error", "never"], "use-isnan": "error", - "valid-typeof": "error", + "valid-typeof": ["error", { "requireStringLiterals": true }], "wrap-iife": ["error", "any", { "functionPrototypeMethods": true }], "yield-star-spacing": ["error", "both"], "yoda": ["error", "never"],