From d038a80c43ef8e0c345f5d9fc77ce38c8201cdd4 Mon Sep 17 00:00:00 2001 From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> Date: Mon, 9 Nov 2020 19:10:43 +0530 Subject: [PATCH] chore: Make eslint stricter (#23869) Error for - Invalid tab style - No space between unary operations - Space between blocks Warn for - Comma Spacing - Block Spacing - Object Key Spacing - Keyword Spacing --- .eslintrc | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/.eslintrc b/.eslintrc index 757aa3caaf..d6f0f49363 100644 --- a/.eslintrc +++ b/.eslintrc @@ -5,7 +5,7 @@ "es6": true }, "parserOptions": { - "ecmaVersion": 6, + "ecmaVersion": 9, "sourceType": "module" }, "extends": "eslint:recommended", @@ -15,6 +15,14 @@ "tab", { "SwitchCase": 1 } ], + "brace-style": [ + "error", + "1tbs" + ], + "space-unary-ops": [ + "error", + { "words": true } + ], "linebreak-style": [ "error", "unix" @@ -44,12 +52,10 @@ "no-control-regex": [ "off" ], - "spaced-comment": [ - "warn" - ], - "no-trailing-spaces": [ - "warn" - ] + "space-before-blocks": "warn", + "keyword-spacing": "warn", + "comma-spacing": "warn", + "key-spacing": "warn" }, "root": true, "globals": {