From 15d3aa7b95e37cc2e9a06208089169cbe04383b5 Mon Sep 17 00:00:00 2001
From: silverwind <me@silverwind.io>
Date: Sun, 5 Jul 2020 12:51:29 +0200
Subject: [PATCH] Enable a few more eslint rules (#12145)

This gets the config closer to what 1.12 had.

Related: https://github.com/go-gitea/gitea/pull/12129
---
 .eslintrc | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/.eslintrc b/.eslintrc
index 8e478f4a5a..493a04f81c 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -31,6 +31,8 @@ overrides:
   - files: ["web_src/**/*worker.js"]
     env:
       worker: true
+    rules:
+      no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, status, statusbar, stop, toolbar, top]
 
 rules:
   accessor-pairs: [2]
@@ -116,7 +118,7 @@ rules:
   import/order: [0]
   import/prefer-default-export: [0]
   import/unambiguous: [0]
-  indent: [2, 2, {ignoreComments: true, SwitchCase: 1}]
+  indent: [2, 2, {SwitchCase: 1}]
   init-declarations: [0]
   key-spacing: [2]
   keyword-spacing: [2]
@@ -165,7 +167,7 @@ rules:
   no-dupe-keys: [2]
   no-duplicate-case: [2]
   no-duplicate-imports: [2]
-  no-else-return: [0]
+  no-else-return: [2]
   no-empty-character-class: [2]
   no-empty-function: [0]
   no-empty-pattern: [2]
@@ -223,7 +225,7 @@ rules:
   no-redeclare: [2]
   no-regex-spaces: [2]
   no-restricted-exports: [0]
-  no-restricted-globals: [0]
+  no-restricted-globals: [2, addEventListener, blur, close, closed, confirm, defaultStatus, defaultstatus, error, event, external, find, focus, frameElement, frames, history, innerHeight, innerWidth, isFinite, isNaN, length, location, locationbar, menubar, moveBy, moveTo, name, onblur, onerror, onfocus, onload, onresize, onunload, open, opener, opera, outerHeight, outerWidth, pageXOffset, pageYOffset, parent, print, removeEventListener, resizeBy, resizeTo, screen, screenLeft, screenTop, screenX, screenY, scroll, scrollbars, scrollBy, scrollTo, scrollX, scrollY, self, status, statusbar, stop, toolbar, top]
   no-restricted-imports: [0]
   no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement]
   no-return-assign: [0]
@@ -264,7 +266,7 @@ rules:
   no-useless-constructor: [2]
   no-useless-escape: [2]
   no-useless-rename: [2]
-  no-useless-return: [0]
+  no-useless-return: [2]
   no-var: [2]
   no-void: [2]
   no-warning-comments: [0]