From d5acf57357c26bfb6dd1a1ee7779283ead1daf0b Mon Sep 17 00:00:00 2001 From: Michael Krotscheck Date: Mon, 11 Jan 2016 07:44:25 -0800 Subject: [PATCH] Enable builtinGlobals for no-redeclare This adds the builtinGlobals flag to the no-redeclare rule, which will throw errors when known globals - such as Object, Array, window, document, etc - are used as variable names. http://eslint.org/docs/rules/no-redeclare Change-Id: I36b94c69cdb1fbe5f42b99aec06af01205002cf6 --- .eslintrc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.eslintrc b/.eslintrc index 7f4bbd6..0b7aef2 100644 --- a/.eslintrc +++ b/.eslintrc @@ -343,7 +343,9 @@ rules: # Disallow declaring the same variable more than once # http://eslint.org/docs/rules/no-redeclare - no-redeclare: 2 + no-redeclare: + - 2 + - builtinGlobals: true # Disallow use of assignment in return statement # http://eslint.org/docs/rules/no-return-assign