Add singlequote override and fix files
Based on phosphor-webui and JavaScript common practices we are setting
ESLint to required single quote for JS files and double quote for
SCSS files. This commit adds the ESLint override to the prettier rules
and runs the npm lint script that fixes the files that violate the
rule.
Signed-off-by: Derick Montague <derick.montague@ibm.com>
Change-Id: I50cba77b2d0797595ce94258029608efa8665005
diff --git a/src/router/index.js b/src/router/index.js
index 9c80234..99f2a12 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -1,42 +1,42 @@
-import Vue from "vue";
-import VueRouter from "vue-router";
-import store from "../store/index";
-import AppLayout from "../layouts/AppLayout.vue";
+import Vue from 'vue';
+import VueRouter from 'vue-router';
+import store from '../store/index';
+import AppLayout from '../layouts/AppLayout.vue';
Vue.use(VueRouter);
const routes = [
{
- path: "/",
- name: "",
+ path: '/',
+ name: '',
meta: {
requiresAuth: true
},
component: AppLayout,
children: [
{
- path: "",
- component: () => import("@/views/Overview"),
+ path: '',
+ component: () => import('@/views/Overview'),
meta: {
- title: "Server Overview"
+ title: 'Server Overview'
}
},
{
- path: "/access-control/local-user-management",
- name: "local-users",
- component: () => import("@/views/AccessControl/LocalUserManagement"),
+ path: '/access-control/local-user-management',
+ name: 'local-users',
+ component: () => import('@/views/AccessControl/LocalUserManagement'),
meta: {
- title: "Manage Local Users"
+ title: 'Manage Local Users'
}
}
]
},
{
- path: "/login",
- name: "login",
- component: () => import("@/views/Login"),
+ path: '/login',
+ name: 'login',
+ component: () => import('@/views/Login'),
meta: {
- title: "Login"
+ title: 'Login'
}
}
];
@@ -44,16 +44,16 @@
const router = new VueRouter({
base: process.env.BASE_URL,
routes,
- linkExactActiveClass: "nav__link--current"
+ linkExactActiveClass: 'nav__link--current'
});
router.beforeEach((to, from, next) => {
if (to.matched.some(record => record.meta.requiresAuth)) {
- if (store.getters["authentication/isLoggedIn"]) {
+ if (store.getters['authentication/isLoggedIn']) {
next();
return;
}
- next("/login");
+ next('/login');
} else {
next();
}