-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bugfix for shared event source #12129
Conversation
For some reason our eslint configuration is not working correctly and a bug has become apparent when trying to backport this to 1.12. Signed-off-by: Andrew Thornton <art27@cantab.net>
eslint is working but it's not as strict as before. Can adjust the rules offended here. |
Here's a config adjustment to get master closer to the 1.12 config. It also fixes previously encountered airbnb/javascript#1632 by allowing diff --git a/.eslintrc b/.eslintrc
index 8e478f4a5..388120e51 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -30,8 +30,10 @@ globals:
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]
array-bracket-newline: [0]
@@ -115,9 +117,9 @@ rules:
import/no-webpack-loader-syntax: [2]
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]
line-comment-position: [0]
@@ -164,9 +166,9 @@ rules:
no-dupe-else-if: [2]
no-dupe-keys: [2]
no-duplicate-case: [2]
no-duplicate-imports: [2]
- no-else-return: [0]
+ no-else-return: [2, {allowElseIf: false}]
no-empty-character-class: [2]
no-empty-function: [0]
no-empty-pattern: [2]
no-empty: [2, {allowEmptyCatch: true}]
@@ -222,9 +224,9 @@ rules:
no-prototype-builtins: [2]
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]
no-return-await: [0]
@@ -263,9 +265,9 @@ rules:
no-useless-concat: [2]
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]
no-whitespace-before-property: [2] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is a bugfix as notifications worked when I tested the original PR, but rather just improving code for linter sake. Either way this is an improvement. Ty :)
This gets the config closer to what 1.12 had. Related: go-gitea#12129
This gets the config closer to what 1.12 had. Related: #12129
For some reason our eslint configuration is not working correctly and a bug has become apparent when trying to backport this to 1.12. Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
This gets the config closer to what 1.12 had. Related: go-gitea#12129
For some reason our eslint configuration is not working correctly
and a bug has become apparent when trying to backport this to 1.12.
Related #12095
Signed-off-by: Andrew Thornton art27@cantab.net