Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mastodon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pierre Boudes
mastodon
Commits
fbe11151
Commit
fbe11151
authored
7 years ago
by
Yamagishi Kazutoshi
Committed by
Eugen Rochko
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove eslint-disable comments (#4681)
Do not reject console.error and console.warn with ESLint rules.
parent
e4c761f9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.eslintrc.yml
+1
-0
1 addition, 0 deletions
.eslintrc.yml
app/javascript/mastodon/features/ui/index.js
+1
-1
1 addition, 1 deletion
app/javascript/mastodon/features/ui/index.js
app/javascript/mastodon/web_push_subscription.js
+0
-4
0 additions, 4 deletions
app/javascript/mastodon/web_push_subscription.js
with
2 additions
and
5 deletions
.eslintrc.yml
+
1
−
0
View file @
fbe11151
...
...
@@ -49,6 +49,7 @@ rules:
-
warn
-
allow
:
-
error
-
warn
no-fallthrough
:
error
no-irregular-whitespace
:
error
no-mixed-spaces-and-tabs
:
warn
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/features/ui/index.js
+
1
−
1
View file @
fbe11151
...
...
@@ -135,7 +135,7 @@ export default class UI extends React.PureComponent {
if
(
data
.
type
===
'
navigate
'
)
{
this
.
context
.
router
.
history
.
push
(
data
.
path
);
}
else
{
console
.
warn
(
'
Unknown message type:
'
,
data
.
type
);
// eslint-disable-line no-console
console
.
warn
(
'
Unknown message type:
'
,
data
.
type
);
}
}
...
...
This diff is collapsed.
Click to expand it.
app/javascript/mastodon/web_push_subscription.js
+
0
−
4
View file @
fbe11151
...
...
@@ -48,7 +48,6 @@ export function register () {
if
(
supportsPushNotifications
)
{
if
(
!
getApplicationServerKey
())
{
// eslint-disable-next-line no-console
console
.
error
(
'
The VAPID public key is not set. You will not be able to receive Web Push Notifications.
'
);
return
;
}
...
...
@@ -84,10 +83,8 @@ export function register () {
})
.
catch
(
error
=>
{
if
(
error
.
code
===
20
&&
error
.
name
===
'
AbortError
'
)
{
// eslint-disable-next-line no-console
console
.
warn
(
'
Your browser supports Web Push Notifications, but does not seem to implement the VAPID protocol.
'
);
}
else
if
(
error
.
code
===
5
&&
error
.
name
===
'
InvalidCharacterError
'
)
{
// eslint-disable-next-line no-console
console
.
error
(
'
The VAPID public key seems to be invalid:
'
,
getApplicationServerKey
());
}
...
...
@@ -103,7 +100,6 @@ export function register () {
}
});
}
else
{
// eslint-disable-next-line no-console
console
.
warn
(
'
Your browser does not support Web Push Notifications.
'
);
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment