aboutsummaryrefslogtreecommitdiffstats
path: root/.eslintrc
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2020-07-05 12:51:29 +0200
committerGitHub <noreply@github.com>2020-07-05 11:51:29 +0100
commit15d3aa7b95e37cc2e9a06208089169cbe04383b5 (patch)
tree50a70d70e271934f6d56a221a4a685108cac628e /.eslintrc
parentc6d6c51ada19a06ad6d3d53f6d03234573eeca64 (diff)
downloadgitea-15d3aa7b95e37cc2e9a06208089169cbe04383b5.tar.gz
gitea-15d3aa7b95e37cc2e9a06208089169cbe04383b5.zip
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
Diffstat (limited to '.eslintrc')
-rw-r--r--.eslintrc10
1 files 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]