Commit 9300006

mo <mo@mokhan.ca>
2018-12-15 17:11:01
autofix linter errors
1 parent 7eab1d4
Changed files (5)
app/controllers/concerns/authenticatable.rb
@@ -29,6 +29,7 @@ module Authenticatable
 
   def authenticate_mfa!
     return unless Current.user?
+
     redirect_to new_mfa_path unless mfa_completed?
   end
 
app/javascript/controllers/application_controller.js
@@ -29,13 +29,11 @@ export default class extends Controller {
   }
 
   hide(element) {
-    if (element)
-      element.classList.add('hide');
+    if (element) element.classList.add('hide');
   }
 
   show(element) {
-    if (element)
-      element.classList.remove('hide');
+    if (element) element.classList.remove('hide');
   }
 
   log(message) {
app/javascript/controllers/content_loader_controller.js
@@ -2,34 +2,34 @@ import ApplicationController from './application_controller';
 
 export default class extends ApplicationController {
   connect() {
-    this.load()
+    this.load();
 
-    if (this.data.has("refreshInterval")) {
-      this.startRefreshing()
+    if (this.data.has('refreshInterval')) {
+      this.startRefreshing();
     }
   }
 
   disconnect() {
-    this.stopRefreshing()
+    this.stopRefreshing();
   }
 
   load() {
-    fetch(this.data.get("url"))
+    fetch(this.data.get('url'))
       .then(response => response.text())
-      .then(html => {
-        this.element.innerHTML = html
-      })
+      .then((html) => {
+        this.element.innerHTML = html;
+      });
   }
 
   startRefreshing() {
     this.refreshTimer = setInterval(() => {
-      this.load()
-    }, this.data.get("refreshInterval"))
+      this.load();
+    }, this.data.get('refreshInterval'));
   }
 
   stopRefreshing() {
     if (this.refreshTimer) {
-      clearInterval(this.refreshTimer)
+      clearInterval(this.refreshTimer);
     }
   }
 }
app/javascript/packs/application.js
@@ -7,7 +7,7 @@
 // To reference this file, add <%= javascript_pack_tag 'application' %> to the appropriate
 // layout file, like app/views/layouts/application.html.erb
 
-import "@stimulus/polyfills"
+import '@stimulus/polyfills';
 import { Application } from 'stimulus';
 import { definitionsFromContext } from 'stimulus/webpack-helpers';
 import LocalTime from 'local-time';
app/views/sessions/show.html.erb
@@ -20,7 +20,7 @@
           <%= link_to t(".mfa"), my_mfa_path, class: 'navbar-item' %>
           <%= link_to t(".sessions"), my_sessions_path, class: 'navbar-item' %>
           <%= link_to t(".audits"), my_audits_path, class: 'navbar-item' %>
-          <hr class="navbar-divider">
+          <hr class="navbar-divider" />
           <a class="navbar-item" href="https://github.com/saml-kit/proof/issues/new" target="_blank"> Report an issue </a>
         </div>
       </div>