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." + } + ] } }