Skip to content

Commit 15d3aa7

Browse files
authored
Enable a few more eslint rules (#12145)
This gets the config closer to what 1.12 had. Related: #12129
1 parent c6d6c51 commit 15d3aa7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.eslintrc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ overrides:
3131
- files: ["web_src/**/*worker.js"]
3232
env:
3333
worker: true
34+
rules:
35+
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]
3436

3537
rules:
3638
accessor-pairs: [2]
@@ -116,7 +118,7 @@ rules:
116118
import/order: [0]
117119
import/prefer-default-export: [0]
118120
import/unambiguous: [0]
119-
indent: [2, 2, {ignoreComments: true, SwitchCase: 1}]
121+
indent: [2, 2, {SwitchCase: 1}]
120122
init-declarations: [0]
121123
key-spacing: [2]
122124
keyword-spacing: [2]
@@ -165,7 +167,7 @@ rules:
165167
no-dupe-keys: [2]
166168
no-duplicate-case: [2]
167169
no-duplicate-imports: [2]
168-
no-else-return: [0]
170+
no-else-return: [2]
169171
no-empty-character-class: [2]
170172
no-empty-function: [0]
171173
no-empty-pattern: [2]
@@ -223,7 +225,7 @@ rules:
223225
no-redeclare: [2]
224226
no-regex-spaces: [2]
225227
no-restricted-exports: [0]
226-
no-restricted-globals: [0]
228+
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]
227229
no-restricted-imports: [0]
228230
no-restricted-syntax: [2, WithStatement, ForInStatement, LabeledStatement]
229231
no-return-assign: [0]
@@ -264,7 +266,7 @@ rules:
264266
no-useless-constructor: [2]
265267
no-useless-escape: [2]
266268
no-useless-rename: [2]
267-
no-useless-return: [0]
269+
no-useless-return: [2]
268270
no-var: [2]
269271
no-void: [2]
270272
no-warning-comments: [0]

0 commit comments

Comments
 (0)