Skip to content

Commit d4f7943

Browse files
committed
Fix eslint errors
1 parent 22dc1b8 commit d4f7943

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+302
-166
lines changed

client/.eslintignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
build/*.js
22
config/*.js
33
src/assets
4+
node_modules

client/src/App.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<script>
88
export default {
9-
name: 'App'
9+
name: 'App',
1010
}
1111
</script>
1212

client/src/api/gateway.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,34 @@ export function addItem(form) {
44
return request({
55
url: '/api/v1/gateway',
66
method: 'post',
7-
data: form
7+
data: form,
88
})
99
}
1010

1111
export function getFolder(folderId) {
1212
return request({
1313
url: `/api/v1/gateway?parentId=${folderId}&childStat=true`,
14-
method: 'get'
14+
method: 'get',
1515
})
1616
}
1717

1818
export function getItem(itemId) {
1919
return request({
2020
url: `/api/v1/gateway/${itemId}`,
21-
method: 'get'
21+
method: 'get',
2222
})
2323
}
2424

2525
export function getFolderMapping() {
2626
return request({
2727
url: `/api/v1/gateway?type=folder`,
28-
method: 'get'
28+
method: 'get',
2929
})
3030
}
3131

3232
export function deleteItem(id) {
3333
return request({
3434
url: `api/v1/gateway/${id}`,
35-
method: 'delete'
35+
method: 'delete',
3636
})
3737
}

client/src/api/login.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ export function login(username, password) {
66
method: 'post',
77
data: {
88
username,
9-
password
10-
}
9+
password,
10+
},
1111
})
1212
}
1313

@@ -18,22 +18,22 @@ export function register(username, email, password) {
1818
data: {
1919
username,
2020
email,
21-
password
22-
}
21+
password,
22+
},
2323
})
2424
}
2525

2626
export function getInfo(token) {
2727
return request({
2828
url: '/api/v1/users/info',
2929
method: 'get',
30-
params: { token }
30+
params: { token },
3131
})
3232
}
3333

3434
export function logout() {
3535
return request({
3636
url: '/api/v1/users/logout',
37-
method: 'post'
37+
method: 'post',
3838
})
3939
}

client/src/api/ojInfo.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import request from '@/utils/request'
33
export function getOjInfo() {
44
return request({
55
url: '/api/v1/ojInfo',
6-
method: 'get'
6+
method: 'get',
77
})
88
}

client/src/api/problemBank.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import request from '@/utils/request'
33
export function getProblemInfo(platform, problemId) {
44
return request({
55
url: `/api/v1/problemBank/${platform}/${problemId}`,
6-
method: 'get'
6+
method: 'get',
77
})
88
}

client/src/api/table.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ export function getList(params) {
44
return request({
55
url: '/table/list',
66
method: 'get',
7-
params
7+
params,
88
})
99
}

client/src/api/user.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ import request from '@/utils/request'
33
export function getUser(username) {
44
return request({
55
url: `/api/v1/user/${username}`,
6-
method: 'get'
6+
method: 'get',
77
})
88
}

client/src/components/Breadcrumb/index.vue

+6-6
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { mapGetters } from 'vuex'
1515
export default {
1616
computed: {
1717
...mapGetters([
18-
'gatewayBreadcrumb'
18+
'gatewayBreadcrumb',
1919
]),
2020
levelListUpgraded() {
2121
const second = this.levelList[1]
@@ -25,20 +25,20 @@ export default {
2525
return gatewayBreadcrumb
2626
}
2727
return this.levelList
28-
}
28+
},
2929
},
3030
created() {
3131
this.getBreadcrumb()
3232
},
3333
data() {
3434
return {
35-
levelList: null
35+
levelList: null,
3636
}
3737
},
3838
watch: {
3939
$route() {
4040
this.getBreadcrumb()
41-
}
41+
},
4242
},
4343
methods: {
4444
getBreadcrumb() {
@@ -48,8 +48,8 @@ export default {
4848
matched = [{ path: '/dashboard', meta: { title: 'Dashboard' }}].concat(matched)
4949
}
5050
this.levelList = matched
51-
}
52-
}
51+
},
52+
},
5353
}
5454
</script>
5555

client/src/components/Hamburger/index.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ export default {
1818
props: {
1919
isActive: {
2020
type: Boolean,
21-
default: false
21+
default: false,
2222
},
2323
toggleClick: {
2424
type: Function,
25-
default: null
26-
}
27-
}
25+
default: null,
26+
},
27+
},
2828
}
2929
</script>
3030

client/src/components/SvgIcon/index.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ export default {
1010
props: {
1111
iconClass: {
1212
type: String,
13-
required: true
13+
required: true,
1414
},
1515
className: {
16-
type: String
17-
}
16+
type: String,
17+
},
1818
},
1919
computed: {
2020
iconName() {
@@ -26,8 +26,8 @@ export default {
2626
} else {
2727
return 'svg-icon'
2828
}
29-
}
30-
}
29+
},
30+
},
3131
}
3232
</script>
3333

client/src/main.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ new Vue({
2828
router,
2929
store,
3030
template: '<App/>',
31-
components: { App }
31+
components: { App },
3232
})

client/src/router/index.js

+18-18
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ export const constantRouterMap = [
3434
hidden: true,
3535
children: [{
3636
path: 'dashboard',
37-
component: () => import('@/views/dashboard/index')
38-
}]
37+
component: () => import('@/views/dashboard/index'),
38+
}],
3939
},
4040
{
4141
path: '/example',
@@ -48,15 +48,15 @@ export const constantRouterMap = [
4848
path: 'table',
4949
name: 'Table',
5050
component: () => import('@/views/table/index'),
51-
meta: { title: 'Table', icon: 'table' }
51+
meta: { title: 'Table', icon: 'table' },
5252
},
5353
{
5454
path: 'tree',
5555
name: 'Tree',
5656
component: () => import('@/views/tree/index'),
57-
meta: { title: 'Tree', icon: 'tree' }
58-
}
59-
]
57+
meta: { title: 'Tree', icon: 'tree' },
58+
},
59+
],
6060
},
6161
{
6262
path: '/form',
@@ -66,9 +66,9 @@ export const constantRouterMap = [
6666
path: 'index',
6767
name: 'Form',
6868
component: () => import('@/views/form/index'),
69-
meta: { title: 'Form', icon: 'form' }
70-
}
71-
]
69+
meta: { title: 'Form', icon: 'form' },
70+
},
71+
],
7272
},
7373
{
7474
path: '/gateway',
@@ -79,17 +79,17 @@ export const constantRouterMap = [
7979
name: 'gateway-root',
8080
component: () => import('@/views/gateway/index'),
8181
meta: { title: 'Gateway', icon: 'example' },
82-
props: { folderId: '000000000000000000000000' }
82+
props: { folderId: '000000000000000000000000' },
8383
},
8484
{
8585
path: 'folder/:folderId',
8686
name: 'gateway',
8787
component: () => import('@/views/gateway/index'),
8888
meta: { title: 'Gateway', icon: 'example' },
8989
props: true,
90-
hidden: true
91-
}
92-
]
90+
hidden: true,
91+
},
92+
],
9393
},
9494
{
9595
path: '/user',
@@ -100,15 +100,15 @@ export const constantRouterMap = [
100100
name: 'profile',
101101
component: () => import('@/views/users/index'),
102102
meta: { title: 'Profile', icon: 'user' },
103-
props: true
104-
}
105-
]
103+
props: true,
104+
},
105+
],
106106
},
107-
{ path: '*', redirect: '/404', hidden: true }
107+
{ path: '*', redirect: '/404', hidden: true },
108108
]
109109

110110
export default new Router({
111111
// mode: 'history', //后端支持可开
112112
scrollBehavior: () => ({ y: 0 }),
113-
routes: constantRouterMap
113+
routes: constantRouterMap,
114114
})

client/src/store/actions.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ module.exports = {
33
GatewayAddItems: 'GatewayAddItems',
44
GatewayInit: 'GatewayInit',
55
GatewayDeleteItem: 'GatewayDeleteItem',
6-
FetchProfile: 'FetchProfile'
6+
FetchProfile: 'FetchProfile',
77
}

client/src/store/getters.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ const getters = {
1010
gatewayRoot: state => state.gateway.root,
1111
gatewayBreadcrumb: state => state.gateway.gatewayBreadcrumb,
1212
user: state => state.user,
13-
profile: state => state.profile
13+
profile: state => state.profile,
1414
}
1515
export default getters

client/src/store/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ const store = new Vuex.Store({
1515
user,
1616
ojInfo,
1717
gateway,
18-
profile
18+
profile,
1919
},
20-
getters
20+
getters,
2121
})
2222

2323
export default store

client/src/store/modules/app.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ const app = {
44
state: {
55
sidebar: {
66
opened: !+Cookies.get('sidebarStatus'),
7-
withoutAnimation: false
7+
withoutAnimation: false,
88
},
9-
device: 'desktop'
9+
device: 'desktop',
1010
},
1111
mutations: {
1212
TOGGLE_SIDEBAR: state => {
@@ -25,7 +25,7 @@ const app = {
2525
},
2626
TOGGLE_DEVICE: (state, device) => {
2727
state.device = device
28-
}
28+
},
2929
},
3030
actions: {
3131
ToggleSideBar: ({ commit }) => {
@@ -36,8 +36,8 @@ const app = {
3636
},
3737
ToggleDevice({ commit }, device) {
3838
commit('TOGGLE_DEVICE', device)
39-
}
40-
}
39+
},
40+
},
4141
}
4242

4343
export default app

0 commit comments

Comments
 (0)