From f5d0460b86f194a925dbfcec9378d04a8402e769 Mon Sep 17 00:00:00 2001 From: Tom Yearke Date: Tue, 11 Apr 2017 15:23:06 -0400 Subject: [PATCH] Style: Removed ESLint rule prohibiting for...in statements --- .eslintrc.json | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 16292d5..0ee407d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -76,6 +76,21 @@ ], "no-continue": "off", "no-plusplus": "off", - "no-prototype-builtins": "off" + "no-prototype-builtins": "off", + "no-restricted-syntax": [ + "error", + { + "selector": "ForOfStatement", + "message": "iterators/generators require regenerator-runtime, which is too heavyweight for this guide to allow them. Separately, loops should be avoided in favor of array iterations." + }, + { + "selector": "LabeledStatement", + "message": "Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand." + }, + { + "selector": "WithStatement", + "message": "`with` is disallowed in strict mode because it makes code impossible to predict and optimize." + } + ] } }