Skip to content

Commit b8d47bd

Browse files
jerecuiPanJiaChen
authored andcommitted
chore: update eslint && lint code
1 parent 8d242a0 commit b8d47bd

File tree

112 files changed

+592
-299
lines changed

Some content is hidden

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

112 files changed

+592
-299
lines changed

.eslintrc.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ module.exports = {
2121
"allowFirstLine": false
2222
}
2323
}],
24+
"vue/singleline-html-element-content-newline": "off",
25+
"vue/multiline-html-element-content-newline":"off",
2426
"vue/name-property-casing": ["error", "PascalCase"],
2527
'accessor-pairs': 2,
2628
'arrow-spacing': [2, {

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@
8080
"copy-webpack-plugin": "4.5.2",
8181
"cross-env": "5.2.0",
8282
"css-loader": "1.0.0",
83-
"eslint": "4.19.1",
83+
"eslint": "5.15.2",
8484
"eslint-friendly-formatter": "4.0.1",
85-
"eslint-loader": "2.0.0",
86-
"eslint-plugin-vue": "4.7.1",
85+
"eslint-loader": "2.1.2",
86+
"eslint-plugin-vue": "5.2.2",
8787
"file-loader": "1.1.11",
8888
"friendly-errors-webpack-plugin": "1.7.0",
8989
"hash-sum": "1.0.2",

src/App.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<template>
22
<div id="app">
3-
<router-view/>
3+
<router-view />
44
</div>
55
</template>
66

77
<script>
8-
export default{
8+
export default {
99
name: 'App'
1010
}
1111
</script>

src/components/BackToTop/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<svg width="16" height="16" viewBox="0 0 17 17" xmlns="http://www.w3.org/2000/svg" class="Icon Icon--backToTopArrow" aria-hidden="true" style="height: 16px; width: 16px;">
55
<title>回到顶部</title>
66
<g>
7-
<path d="M12.036 15.59c0 .55-.453.995-.997.995H5.032c-.55 0-.997-.445-.997-.996V8.584H1.03c-1.1 0-1.36-.633-.578-1.416L7.33.29c.39-.39 1.026-.385 1.412 0l6.878 6.88c.782.78.523 1.415-.58 1.415h-3.004v7.004z" fill-rule="evenodd"/>
7+
<path d="M12.036 15.59c0 .55-.453.995-.997.995H5.032c-.55 0-.997-.445-.997-.996V8.584H1.03c-1.1 0-1.36-.633-.578-1.416L7.33.29c.39-.39 1.026-.385 1.412 0l6.878 6.88c.782.78.523 1.415-.58 1.415h-3.004v7.004z" fill-rule="evenodd" />
88
</g>
99
</svg>
1010
</div>

src/components/Breadcrumb/index.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
<el-breadcrumb class="app-breadcrumb" separator="/">
33
<transition-group name="breadcrumb">
44
<el-breadcrumb-item v-for="(item,index) in levelList" :key="item.path">
5-
<span v-if="item.redirect==='noredirect'||index==levelList.length-1" class="no-redirect">{{
6-
generateTitle(item.meta.title) }}</span>
5+
<span v-if="item.redirect==='noredirect'||index==levelList.length-1" class="no-redirect">
6+
{{ generateTitle(item.meta.title) }}
7+
</span>
78
<a v-else @click.prevent="handleLink(item)">{{ generateTitle(item.meta.title) }}</a>
89
</el-breadcrumb-item>
910
</transition-group>

src/components/Charts/keyboard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div :class="className" :id="id" :style="{height:height,width:width}"/>
2+
<div :id="id" :class="className" :style="{height:height,width:width}" />
33
</template>
44

55
<script>

src/components/Charts/lineMarker.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div :class="className" :id="id" :style="{height:height,width:width}"/>
2+
<div :id="id" :class="className" :style="{height:height,width:width}" />
33
</template>
44

55
<script>

src/components/Charts/mixChart.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div :class="className" :id="id" :style="{height:height,width:width}"/>
2+
<div :id="id" :class="className" :style="{height:height,width:width}" />
33
</template>
44

55
<script>

src/components/DndList/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<div class="list-complete-item-handle">{{ element.id }}[{{ element.author }}] {{ element.title }}</div>
88
<div style="position:absolute;right:0px;">
99
<span style="float: right ;margin-top: -20px;margin-right:5px;" @click="deleteEle(element)">
10-
<i style="color:#ff4949" class="el-icon-delete"/>
10+
<i style="color:#ff4949" class="el-icon-delete" />
1111
</span>
1212
</div>
1313
</div>

src/components/DragSelect/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<el-select ref="dragSelect" v-model="selectVal" v-bind="$attrs" class="drag-select" multiple v-on="$listeners">
3-
<slot/>
3+
<slot />
44
</el-select>
55
</template>
66

src/components/Dropzone/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div :ref="id" :action="url" :id="id" class="dropzone">
2+
<div :id="id" :ref="id" :action="url" class="dropzone">
33
<input type="file" name="file">
44
</div>
55
</template>

src/components/GithubCorner/index.vue

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,20 @@
55
height="80"
66
viewBox="0 0 250 250"
77
style="fill:#40c9c6; color:#fff;"
8-
aria-hidden="true">
9-
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"/>
8+
aria-hidden="true"
9+
>
10+
<path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z" />
1011
<path
1112
d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
1213
fill="currentColor"
1314
style="transform-origin: 130px 106px;"
14-
class="octo-arm"/>
15+
class="octo-arm"
16+
/>
1517
<path
1618
d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
1719
fill="currentColor"
18-
class="octo-body"/>
20+
class="octo-body"
21+
/>
1922
</svg>
2023
</a>
2124
</template>

src/components/HeaderSearch/index.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
remote
1111
placeholder="Search"
1212
class="header-search-select"
13-
@change="change">
14-
<el-option v-for="item in options" :key="item.path" :value="item" :label="item.title.join(' > ')"/>
13+
@change="change"
14+
>
15+
<el-option v-for="item in options" :key="item.path" :value="item" :label="item.title.join(' > ')" />
1516
</el-select>
1617
</div>
1718
</template>

src/components/ImageCropper/index.vue

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22
<div v-show="value" class="vue-image-crop-upload">
33
<div class="vicp-wrap">
44
<div class="vicp-close" @click="off">
5-
<i class="vicp-icon4"/>
5+
<i class="vicp-icon4" />
66
</div>
77

88
<div v-show="step == 1" class="vicp-step1">
99
<div class="vicp-drop-area" @dragleave="preventDefault" @dragover="preventDefault" @dragenter="preventDefault" @click="handleClick" @drop="handleChange">
1010
<i v-show="loading != 1" class="vicp-icon1">
11-
<i class="vicp-icon1-arrow"/>
12-
<i class="vicp-icon1-body"/>
13-
<i class="vicp-icon1-bottom"/>
11+
<i class="vicp-icon1-arrow" />
12+
<i class="vicp-icon1-body" />
13+
<i class="vicp-icon1-bottom" />
1414
</i>
1515
<span v-show="loading !== 1" class="vicp-hint">{{ lang.hint }}</span>
1616
<span v-show="!isSupported" class="vicp-no-supported-hint">{{ lang.noSupported }}</span>
1717
<input v-show="false" v-if="step == 1" ref="fileinput" type="file" @change="handleChange">
1818
</div>
1919
<div v-show="hasError" class="vicp-error">
20-
<i class="vicp-icon2"/> {{ errorMsg }}
20+
<i class="vicp-icon2" /> {{ errorMsg }}
2121
</div>
2222
<div class="vicp-operate">
2323
<a @click="off" @mousedown="ripple">{{ lang.btn.off }}</a>
@@ -48,15 +48,16 @@
4848
@mousedown="imgStartMove"
4949
@mousemove="imgMove"
5050
@mouseup="createImg"
51-
@mouseout="createImg">
52-
<div :style="sourceImgShadeStyle" class="vicp-img-shade vicp-img-shade-1"/>
53-
<div :style="sourceImgShadeStyle" class="vicp-img-shade vicp-img-shade-2"/>
51+
@mouseout="createImg"
52+
>
53+
<div :style="sourceImgShadeStyle" class="vicp-img-shade vicp-img-shade-1" />
54+
<div :style="sourceImgShadeStyle" class="vicp-img-shade vicp-img-shade-2" />
5455
</div>
5556

5657
<div class="vicp-range">
5758
<input :value="scale.range" type="range" step="1" min="0" max="100" @input="zoomChange">
58-
<i class="vicp-icon5" @mousedown="startZoomSub" @mouseout="endZoomSub" @mouseup="endZoomSub"/>
59-
<i class="vicp-icon6" @mousedown="startZoomAdd" @mouseout="endZoomAdd" @mouseup="endZoomAdd"/>
59+
<i class="vicp-icon5" @mousedown="startZoomSub" @mouseout="endZoomSub" @mouseup="endZoomSub" />
60+
<i class="vicp-icon6" @mousedown="startZoomAdd" @mouseout="endZoomAdd" @mouseup="endZoomAdd" />
6061
</div>
6162

6263
<div v-if="!noRotate" class="vicp-rotate">
@@ -87,21 +88,21 @@
8788
<div class="vicp-upload">
8889
<span v-show="loading === 1" class="vicp-loading">{{ lang.loading }}</span>
8990
<div class="vicp-progress-wrap">
90-
<span v-show="loading === 1" :style="progressStyle" class="vicp-progress"/>
91+
<span v-show="loading === 1" :style="progressStyle" class="vicp-progress" />
9192
</div>
9293
<div v-show="hasError" class="vicp-error">
93-
<i class="vicp-icon2"/> {{ errorMsg }}
94+
<i class="vicp-icon2" /> {{ errorMsg }}
9495
</div>
9596
<div v-show="loading === 2" class="vicp-success">
96-
<i class="vicp-icon3"/> {{ lang.success }}
97+
<i class="vicp-icon3" /> {{ lang.success }}
9798
</div>
9899
</div>
99100
<div class="vicp-operate">
100101
<a @click="setStep(2)" @mousedown="ripple">{{ lang.btn.back }}</a>
101102
<a @click="off" @mousedown="ripple">{{ lang.btn.close }}</a>
102103
</div>
103104
</div>
104-
<canvas v-show="false" ref="canvas" :width="width" :height="height"/>
105+
<canvas v-show="false" ref="canvas" :width="width" :height="height" />
105106
</div>
106107
</div>
107108
</template>

src/components/JsonEditor/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="json-editor">
3-
<textarea ref="textarea"/>
3+
<textarea ref="textarea" />
44
</div>
55
</template>
66

src/components/Kanban/index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
<draggable
77
:list="list"
88
:options="options"
9-
class="board-column-content">
9+
class="board-column-content"
10+
>
1011
<div v-for="element in list" :key="element.id" class="board-item">
1112
{{ element.name }} {{ element.id }}
1213
</div>

src/components/LangSelect/index.vue

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@
44
<svg-icon class-name="international-icon" icon-class="language" />
55
</div>
66
<el-dropdown-menu slot="dropdown">
7-
<el-dropdown-item :disabled="language==='zh'" command="zh">中文</el-dropdown-item>
8-
<el-dropdown-item :disabled="language==='en'" command="en">English</el-dropdown-item>
9-
<el-dropdown-item :disabled="language==='es'" command="es">Español</el-dropdown-item>
7+
<el-dropdown-item :disabled="language==='zh'" command="zh">
8+
中文
9+
</el-dropdown-item>
10+
<el-dropdown-item :disabled="language==='en'" command="en">
11+
English
12+
</el-dropdown-item>
13+
<el-dropdown-item :disabled="language==='es'" command="es">
14+
Español
15+
</el-dropdown-item>
1016
</el-dropdown-menu>
1117
</el-dropdown>
1218
</template>

src/components/MDinput/index.vue

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<template>
22
<div :class="computedClasses" class="material-input__component">
33
<div :class="{iconClass:icon}">
4-
<i v-if="icon" :class="['el-icon-' + icon]" class="el-input__icon material-input__icon"/>
4+
<i v-if="icon" :class="['el-icon-' + icon]" class="el-input__icon material-input__icon" />
55
<input
66
v-if="type === 'email'"
7+
v-model="currentValue"
78
:name="name"
89
:placeholder="fillPlaceHolder"
9-
v-model="currentValue"
1010
:readonly="readonly"
1111
:disabled="disabled"
1212
:autoComplete="autoComplete"
@@ -15,12 +15,13 @@
1515
class="material-input"
1616
@focus="handleMdFocus"
1717
@blur="handleMdBlur"
18-
@input="handleModelInput">
18+
@input="handleModelInput"
19+
>
1920
<input
2021
v-if="type === 'url'"
22+
v-model="currentValue"
2123
:name="name"
2224
:placeholder="fillPlaceHolder"
23-
v-model="currentValue"
2425
:readonly="readonly"
2526
:disabled="disabled"
2627
:autoComplete="autoComplete"
@@ -29,12 +30,13 @@
2930
class="material-input"
3031
@focus="handleMdFocus"
3132
@blur="handleMdBlur"
32-
@input="handleModelInput">
33+
@input="handleModelInput"
34+
>
3335
<input
3436
v-if="type === 'number'"
37+
v-model="currentValue"
3538
:name="name"
3639
:placeholder="fillPlaceHolder"
37-
v-model="currentValue"
3840
:step="step"
3941
:readonly="readonly"
4042
:disabled="disabled"
@@ -48,12 +50,13 @@
4850
class="material-input"
4951
@focus="handleMdFocus"
5052
@blur="handleMdBlur"
51-
@input="handleModelInput">
53+
@input="handleModelInput"
54+
>
5255
<input
5356
v-if="type === 'password'"
57+
v-model="currentValue"
5458
:name="name"
5559
:placeholder="fillPlaceHolder"
56-
v-model="currentValue"
5760
:readonly="readonly"
5861
:disabled="disabled"
5962
:autoComplete="autoComplete"
@@ -64,12 +67,13 @@
6467
class="material-input"
6568
@focus="handleMdFocus"
6669
@blur="handleMdBlur"
67-
@input="handleModelInput">
70+
@input="handleModelInput"
71+
>
6872
<input
6973
v-if="type === 'tel'"
74+
v-model="currentValue"
7075
:name="name"
7176
:placeholder="fillPlaceHolder"
72-
v-model="currentValue"
7377
:readonly="readonly"
7478
:disabled="disabled"
7579
:autoComplete="autoComplete"
@@ -78,12 +82,13 @@
7882
class="material-input"
7983
@focus="handleMdFocus"
8084
@blur="handleMdBlur"
81-
@input="handleModelInput">
85+
@input="handleModelInput"
86+
>
8287
<input
8388
v-if="type === 'text'"
89+
v-model="currentValue"
8490
:name="name"
8591
:placeholder="fillPlaceHolder"
86-
v-model="currentValue"
8792
:readonly="readonly"
8893
:disabled="disabled"
8994
:autoComplete="autoComplete"
@@ -94,10 +99,11 @@
9499
class="material-input"
95100
@focus="handleMdFocus"
96101
@blur="handleMdBlur"
97-
@input="handleModelInput">
98-
<span class="material-input-bar"/>
102+
@input="handleModelInput"
103+
>
104+
<span class="material-input-bar" />
99105
<label class="material-label">
100-
<slot/>
106+
<slot />
101107
</label>
102108
</div>
103109
</div>

src/components/MarkdownEditor/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div :id="id"/>
2+
<div :id="id" />
33
</template>
44

55
<script>

src/components/Pagination/index.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
:total="total"
1010
v-bind="$attrs"
1111
@size-change="handleSizeChange"
12-
@current-change="handleCurrentChange"/>
12+
@current-change="handleCurrentChange"
13+
/>
1314
</div>
1415
</template>
1516

src/components/PanThumb/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div :style="{zIndex:zIndex,height:height,width:width}" class="pan-item">
33
<div class="pan-info">
44
<div class="pan-info-roles-container">
5-
<slot/>
5+
<slot />
66
</div>
77
</div>
88
<img :src="image" class="pan-thumb">

0 commit comments

Comments
 (0)