From d6c80f658c1893c692e0c3e87bb4023723b22e1a Mon Sep 17 00:00:00 2001 From: Felipe Gomes Date: Thu, 10 Dec 2015 14:34:44 -0500 Subject: [PATCH] Bug 1231728 - Enable no-dupe-args, no-dupe-keys, no-duplicate-case, no-obj-calls, no-with rules globally, no-redlecare and consistent-return in browser. r=Mossop --- browser/.eslintrc | 10 +++++++++- toolkit/.eslintrc | 10 +++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/browser/.eslintrc b/browser/.eslintrc index e7e9d8ce592..230ece043bb 100644 --- a/browser/.eslintrc +++ b/browser/.eslintrc @@ -1,5 +1,13 @@ { "extends": [ "../toolkit/.eslintrc" - ] + ], + + "rules": { + // No redeclaring variables + "no-redeclare": 2, + + // Functions must always return something or nothing + "consistent-return": 2, + } } diff --git a/toolkit/.eslintrc b/toolkit/.eslintrc index 5db3708c08f..345239bef81 100644 --- a/toolkit/.eslintrc +++ b/toolkit/.eslintrc @@ -53,13 +53,13 @@ // "no-array-constructor": 2, // No duplicate arguments in function declarations - // "no-dupe-args": 2, + "no-dupe-args": 2, // No duplicate keys in object declarations - // "no-dupe-keys": 2, + "no-dupe-keys": 2, // No duplicate cases in switch statements - // "no-duplicate-case": 2, + "no-duplicate-case": 2, // No labels // "no-labels": 2, @@ -116,7 +116,7 @@ // "no-new-object": 2, // No Math() or JSON() - // "no-obj-calls": 2, + "no-obj-calls": 2, // No octal literals // "no-octal": 2, @@ -158,7 +158,7 @@ // "no-use-before-define": [2, "nofunc"], // No using with - // "no-with": 2, + "no-with": 2, // Always require semicolon at end of statement // "semi": [2, "always"],