[improvement] update eslint config (#2288)

This commit is contained in:
neverland
2018-12-14 14:24:23 +08:00
committed by GitHub
parent d2751ffdfa
commit 16e4889a92
141 changed files with 6387 additions and 7536 deletions

View File

@@ -15,6 +15,7 @@
</template>
<script>
/* eslint-disable object-shorthand */
import create from '../utils/create';
import findParent from '../mixins/find-parent';

View File

@@ -188,22 +188,18 @@ exports[`renders demo correctly 1`] = `
<div class="van-tab__pane" style="display:none;">
<!---->
<div>
<div>
<i class="van-icon van-icon-more-o" style="color:undefined;font-size:undefined;">
<div><i class="van-icon van-icon-more-o" style="color:undefined;font-size:undefined;">
<!---->
<!---->
</i>标签
<!----></i>标签
</div>
</div>
</div>
<div class="van-tab__pane" style="display:none;">
<!---->
<div>
<div>
<i class="van-icon van-icon-more-o" style="color:undefined;font-size:undefined;">
<div><i class="van-icon van-icon-more-o" style="color:undefined;font-size:undefined;">
<!---->
<!---->
</i>标签
<!----></i>标签
</div>
</div>
</div>

View File

@@ -35,7 +35,7 @@ exports[`change tabs data 2`] = `
title1
</span></div>
<div class="van-tab"><span class="van-ellipsis">
</span></div>
<div class="van-tab van-tab--disabled"><span class="van-ellipsis">
title3
@@ -65,7 +65,7 @@ exports[`click to switch tab 1`] = `
<div class="van-tabs van-tabs--line">
<div class="van-tabs__wrap van-hairline--top-bottom">
<div class="van-tabs__nav van-tabs__nav--line" style="border-color: #f44;">
<div class="van-tabs__line" style="width: 2px; background-color: rgb(255, 68, 68);"></div>
<div class="van-tabs__line" style="width: 2px; background-color: rgb(255, 68, 68); transform: translateX(-1px);"></div>
<div class="van-tab van-tab--active"><span class="van-ellipsis">
title1
</span></div>
@@ -98,7 +98,7 @@ exports[`click to switch tab 2`] = `
<div class="van-tabs van-tabs--line">
<div class="van-tabs__wrap van-hairline--top-bottom">
<div class="van-tabs__nav van-tabs__nav--line" style="border-color: #f44;">
<div class="van-tabs__line" style="width: 2px; background-color: rgb(255, 68, 68);"></div>
<div class="van-tabs__line" style="width: 2px; background-color: rgb(255, 68, 68); transform: translateX(-1px);"></div>
<div class="van-tab"><span class="van-ellipsis">
title1
</span></div>
@@ -131,7 +131,7 @@ exports[`swipe to switch tab 1`] = `
<div class="van-tabs van-tabs--line">
<div class="van-tabs__wrap van-hairline--top-bottom">
<div class="van-tabs__nav van-tabs__nav--line" style="border-color: #f44;">
<div class="van-tabs__line" style="width: 2px; background-color: rgb(255, 68, 68);"></div>
<div class="van-tabs__line" style="width: 2px; background-color: rgb(255, 68, 68); transform: translateX(-1px);"></div>
<div class="van-tab van-tab--active"><span class="van-ellipsis">
title1
</span></div>
@@ -164,7 +164,7 @@ exports[`swipe to switch tab 2`] = `
<div class="van-tabs van-tabs--line">
<div class="van-tabs__wrap van-hairline--top-bottom">
<div class="van-tabs__nav van-tabs__nav--line" style="border-color: #f44;">
<div class="van-tabs__line" style="width: 2px; background-color: rgb(255, 68, 68);"></div>
<div class="van-tabs__line" style="width: 2px; background-color: rgb(255, 68, 68); transform: translateX(-1px);"></div>
<div class="van-tab"><span class="van-ellipsis">
title1
</span></div>
@@ -197,7 +197,7 @@ exports[`swipe to switch tab 3`] = `
<div class="van-tabs van-tabs--line">
<div class="van-tabs__wrap van-hairline--top-bottom">
<div class="van-tabs__nav van-tabs__nav--line" style="border-color: #f44;">
<div class="van-tabs__line" style="width: 2px; background-color: rgb(255, 68, 68);"></div>
<div class="van-tabs__line" style="width: 2px; background-color: rgb(255, 68, 68); transform: translateX(-1px);"></div>
<div class="van-tab"><span class="van-ellipsis">
title1
</span></div>
@@ -230,7 +230,7 @@ exports[`swipe to switch tab 4`] = `
<div class="van-tabs van-tabs--line">
<div class="van-tabs__wrap van-hairline--top-bottom">
<div class="van-tabs__nav van-tabs__nav--line" style="border-color: #f44;">
<div class="van-tabs__line" style="width: 2px; background-color: rgb(255, 68, 68);"></div>
<div class="van-tabs__line" style="width: 2px; background-color: rgb(255, 68, 68); transform: translateX(-1px);"></div>
<div class="van-tab van-tab--active"><span class="van-ellipsis">
title1
</span></div>

View File

@@ -38,7 +38,7 @@ function createWrapper(options) {
});
}
test('click to switch tab', async() => {
test('click to switch tab', async () => {
const onChange = jest.fn();
const wrapper = createWrapper({
methods: {
@@ -57,7 +57,7 @@ test('click to switch tab', async() => {
expect(onChange.mock.calls.length).toEqual(1);
});
test('swipe to switch tab', async() => {
test('swipe to switch tab', async () => {
const onChange = jest.fn();
const wrapper = createWrapper({
methods: {
@@ -81,7 +81,7 @@ test('swipe to switch tab', async() => {
wrapper.destroy();
});
test('change tabs data', async() => {
test('change tabs data', async () => {
const wrapper = createWrapper();
expect(wrapper).toMatchSnapshot();