Skip to content

Commit c4844b4

Browse files
committed
Revert "Change eslint rules to use vue recommended"
Merged accidentally. Although this one did have the proper +1s/+2s. The 2 underneath did not. The author will resubmit. This reverts commit 5e7ac49. Change-Id: Iceb1de3a170cc0b592b183545c792aa3eb87bfee Signed-off-by: Gunnar Mills <[email protected]>
1 parent ff4ab40 commit c4844b4

File tree

16 files changed

+71
-97
lines changed

16 files changed

+71
-97
lines changed

.eslintrc.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = {
33
env: {
44
node: true
55
},
6-
extends: ['plugin:vue/recommended', '@vue/prettier'],
6+
extends: ['plugin:vue/essential', '@vue/prettier'],
77
rules: {
88
'no-console': 'off',
99
'no-debugger': process.env.NODE_ENV === 'production' ? 'error' : 'off',
@@ -12,8 +12,7 @@ module.exports = {
1212
{
1313
singleQuote: true
1414
}
15-
],
16-
'vue/component-name-in-template-casing': ['error', 'kebab-case']
15+
]
1716
},
1817
parserOptions: {
1918
parser: 'babel-eslint'

src/components/AppHeader/AppHeader.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ import StatusIcon from '../Global/StatusIcon';
4242
export default {
4343
name: 'AppHeader',
4444
components: { IconAvatar, IconRenew, StatusIcon },
45+
created() {
46+
this.getHostInfo();
47+
},
4548
computed: {
4649
hostStatus() {
4750
return this.$store.getters['global/hostStatus'];
@@ -58,9 +61,6 @@ export default {
5861
}
5962
}
6063
},
61-
created() {
62-
this.getHostInfo();
63-
},
6464
methods: {
6565
getHostInfo() {
6666
this.$store.dispatch('global/getHostStatus');

src/components/AppNavigation/AppNavigation.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<icon-health />Health
88
<icon-expand class="icon-expand" />
99
</b-button>
10-
<b-collapse id="health-menu" tag="ul" class="nav-item__nav">
10+
<b-collapse tag="ul" id="health-menu" class="nav-item__nav">
1111
<b-nav-item href="javascript:void(0)">Event Log</b-nav-item>
1212
<b-nav-item href="javascript:void(0)">Hardware Status</b-nav-item>
1313
<b-nav-item href="javascript:void(0)">Sensors</b-nav-item>
@@ -19,7 +19,7 @@
1919
<icon-control />Control
2020
<icon-expand class="icon-expand" />
2121
</b-button>
22-
<b-collapse id="control-menu" tag="ul" class="nav-item__nav">
22+
<b-collapse tag="ul" id="control-menu" class="nav-item__nav">
2323
<b-nav-item href="javascript:void(0)">
2424
Server power operations
2525
</b-nav-item>
@@ -33,7 +33,7 @@
3333
<icon-configuration />Configuration
3434
<icon-expand class="icon-expand" />
3535
</b-button>
36-
<b-collapse id="configuration-menu" tag="ul" class="nav-item__nav">
36+
<b-collapse tag="ul" id="configuration-menu" class="nav-item__nav">
3737
<b-nav-item href="javascript:void(0)">Network settings</b-nav-item>
3838
<b-nav-item href="javascript:void(0)">SNMP settings</b-nav-item>
3939
<b-nav-item href="javascript:void(0)">Firmware</b-nav-item>
@@ -45,7 +45,7 @@
4545
<icon-access-control />Access Control
4646
<icon-expand class="icon-expand" />
4747
</b-button>
48-
<b-collapse id="access-control-menu" tag="ul" class="nav-item__nav">
48+
<b-collapse tag="ul" id="access-control-menu" class="nav-item__nav">
4949
<b-nav-item href="javascript:void(0)">LDAP</b-nav-item>
5050
<b-nav-item to="/access-control/local-user-management">
5151
Local user management

src/components/Global/PageSection.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@
88
<script>
99
export default {
1010
name: 'PageSection',
11-
props: {
12-
sectionTitle: {
13-
type: String,
14-
required: true
15-
}
16-
}
11+
props: ['sectionTitle']
1712
};
1813
</script>
1914

src/components/Global/PageTitle.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@
88
<script>
99
export default {
1010
name: 'PageTitle',
11-
props: {
12-
description: {
13-
type: String,
14-
default: ''
15-
}
16-
},
11+
props: ['description'],
1712
data() {
1813
return {
1914
title: this.$route.meta.title

src/components/Global/StatusIcon.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,11 @@ import IconError from '@carbon/icons-vue/es/error--filled/20';
1313
1414
export default {
1515
name: 'StatusIcon',
16+
props: ['status'],
1617
components: {
1718
iconSuccess: IconCheckmark,
1819
iconDanger: IconWarning,
1920
iconSecondary: IconError
20-
},
21-
props: {
22-
status: {
23-
type: String,
24-
default: ''
25-
}
2621
}
2722
};
2823
</script>

src/layouts/AppLayout.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<template>
22
<div>
3-
<app-header ref="focusTarget" />
3+
<AppHeader ref="focusTarget" />
44
<b-container fluid class="page-container">
55
<b-row no-gutters>
66
<b-col tag="nav" cols="12" md="3" lg="2">
7-
<app-navigation />
7+
<AppNavigation />
88
</b-col>
99
<b-col cols="12" md="9" lg="10">
10-
<page-container>
10+
<PageContainer>
1111
<router-view ref="routerView" />
12-
</page-container>
12+
</PageContainer>
1313
</b-col>
1414
</b-row>
1515
</b-container>

src/views/AccessControl/LocalUserManagement/LocalUserManagement.vue

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<template>
22
<b-container class="ml-0">
3-
<page-title />
3+
<PageTitle />
44
<b-row>
55
<b-col lg="10">
6-
<b-button variant="link" @click="initModalSettings">
6+
<b-button @click="initModalSettings" variant="link">
77
Account policy settings
88
<icon-settings />
99
</b-button>
10-
<b-button variant="primary" @click="initModalUser(null)">
10+
<b-button @click="initModalUser(null)" variant="primary">
1111
Add user
1212
<icon-add />
1313
</b-button>
@@ -49,9 +49,9 @@
4949
</b-col>
5050
</b-row>
5151
<!-- Modals -->
52-
<modal-settings :settings="settings"></modal-settings>
52+
<modal-settings v-bind:settings="settings"></modal-settings>
5353
<modal-user
54-
:user="activeUser"
54+
v-bind:user="activeUser"
5555
@ok="saveUser"
5656
@hidden="clearActiveUser"
5757
></modal-user>
@@ -70,7 +70,7 @@ import ModalSettings from './ModalSettings';
7070
import PageTitle from '../../../components/Global/PageTitle';
7171
7272
export default {
73-
name: 'LocalUsers',
73+
name: 'local-users',
7474
components: {
7575
IconAdd,
7676
IconEdit,
@@ -87,6 +87,9 @@ export default {
8787
settings: null
8888
};
8989
},
90+
created() {
91+
this.getUsers();
92+
},
9093
computed: {
9194
allUsers() {
9295
return this.$store.getters['localUsers/allUsers'];
@@ -110,9 +113,6 @@ export default {
110113
});
111114
}
112115
},
113-
created() {
114-
this.getUsers();
115-
},
116116
methods: {
117117
getUsers() {
118118
this.$store.dispatch('localUsers/getUsers');

src/views/AccessControl/LocalUserManagement/ModalSettings.vue

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44

55
<script>
66
export default {
7-
props: {
8-
settings: {
9-
type: String,
10-
default: ''
11-
}
12-
}
7+
props: ['settings']
138
};
149
</script>

src/views/AccessControl/LocalUserManagement/ModalUser.vue

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
>
2323
</b-form-group>
2424
<b-form-group label="Username">
25-
<b-form-input v-model="form.username" type="text" />
25+
<b-form-input type="text" v-model="form.username" />
2626
</b-form-group>
2727
<b-form-group label="Privilege">
2828
<b-form-select
@@ -31,7 +31,7 @@
3131
></b-form-select>
3232
</b-form-group>
3333
<b-form-group label="Password">
34-
<b-form-input v-model="form.password" type="password" />
34+
<b-form-input type="password" v-model="form.password" />
3535
</b-form-group>
3636
</b-form>
3737
<template v-slot:modal-ok>
@@ -47,12 +47,7 @@
4747

4848
<script>
4949
export default {
50-
props: {
51-
user: {
52-
type: Object,
53-
default: null
54-
}
55-
},
50+
props: ['user'],
5651
data() {
5752
return {
5853
privilegeTypes: ['Administrator', 'Operator', 'ReadOnly', 'NoAccess']

0 commit comments

Comments
 (0)