about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-08-24 19:15:36 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-08-24 12:15:36 +0200
commitfbe1115114edb2d46c05b5065398b7234b9fb6a0 (patch)
tree8fc45aa24ec6e8868e3f05d3c8a9d4ed547d3d40
parente4c761f902579c2122eb4d531d1596ff5376d96d (diff)
Remove eslint-disable comments (#4681)
Do not reject console.error and console.warn with ESLint rules.
-rw-r--r--.eslintrc.yml1
-rw-r--r--app/javascript/mastodon/features/ui/index.js2
-rw-r--r--app/javascript/mastodon/web_push_subscription.js4
3 files changed, 2 insertions, 5 deletions
diff --git a/.eslintrc.yml b/.eslintrc.yml
index fd2ba46dd..1c60cbdb3 100644
--- a/.eslintrc.yml
+++ b/.eslintrc.yml
@@ -49,6 +49,7 @@ rules:
   - warn
   - allow:
     - error
+    - warn
   no-fallthrough: error
   no-irregular-whitespace: error
   no-mixed-spaces-and-tabs: warn
diff --git a/app/javascript/mastodon/features/ui/index.js b/app/javascript/mastodon/features/ui/index.js
index a791f8947..44243d370 100644
--- a/app/javascript/mastodon/features/ui/index.js
+++ b/app/javascript/mastodon/features/ui/index.js
@@ -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);
     }
   }
 
diff --git a/app/javascript/mastodon/web_push_subscription.js b/app/javascript/mastodon/web_push_subscription.js
index 96ac63b52..3dbed09ea 100644
--- a/app/javascript/mastodon/web_push_subscription.js
+++ b/app/javascript/mastodon/web_push_subscription.js
@@ -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.');
   }
 }