From 2e2222304deefada082099f3aaf2f7f1a5dc4604 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Go=C5=82=C4=99biowski-Owczarek?= Date: Wed, 8 Apr 2020 22:36:44 +0200 Subject: [PATCH] Enable no-extra-semi & no-irregular-whitespace The no-extra-semi rule: https://eslint.org/docs/rules/no-extra-semi disallows unnecessary semicolons, e.g. it forbids the following: ```js var x = 5;; function foo() { // code }; ``` In jQuery we usually don't add a semicolon at the end of function declarations but I found a few cases where we do, creating an inconsistency. The no-irregular-whitespace rule: https://eslint.org/docs/rules/no-irregular-whitespace forbids most whitespaces that may be hard to notice in source. We have one such occurrence in Core code that would be good to forbid. Fixes #15 --- .eslintrc.json | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.eslintrc.json b/.eslintrc.json index 13e5e01..cccdadf 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -77,6 +77,7 @@ ], "no-mixed-spaces-and-tabs": "error", "no-trailing-spaces": "error", + "no-irregular-whitespace": "error", "no-multi-str": "error", "comma-dangle": [ "error", @@ -112,6 +113,7 @@ "after": true } ], + "no-extra-semi": "error", "space-infix-ops": "error", "eol-last": "error", "lines-around-comment": [