diff --git a/.eslintrc.js b/.eslintrc.js
index 1861ec826..c82d5d2cc 100644
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -16,6 +16,10 @@ module.exports = {
plugins: ['vue'],
+ extends: [
+ 'plugin:vue/strongly-recommended'
+ ],
+
globals: {
expect: true,
sinon: true,
@@ -142,6 +146,17 @@ module.exports = {
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'object-curly-spacing': [2, 'always', { objectsInObjects: false }],
'array-bracket-spacing': [2, 'never'],
- 'vue/jsx-uses-vars': 2
+ 'vue/jsx-uses-vars': 2,
+ 'vue/require-v-for-key': 0,
+ "vue/require-default-prop": 0,
+ "vue/name-property-casing": 0,
+ "vue/no-unused-vars": 0,
+ 'vue/max-attributes-per-line': [2, {
+ "singleline": 5,
+ "multiline": {
+ "max": 5,
+ "allowFirstLine": false
+ }
+ }]
}
}
diff --git a/docs/demos/views/actionsheet.vue b/docs/demos/views/actionsheet.vue
index 46e9aabf4..56fcd4124 100644
--- a/docs/demos/views/actionsheet.vue
+++ b/docs/demos/views/actionsheet.vue
@@ -7,7 +7,7 @@
{{ $t('button2') }}
-
+
diff --git a/docs/demos/views/address-edit.vue b/docs/demos/views/address-edit.vue
index 16f9d33d0..5bbc78968 100644
--- a/docs/demos/views/address-edit.vue
+++ b/docs/demos/views/address-edit.vue
@@ -2,11 +2,11 @@
-
+
-
+
-
+
diff --git a/docs/demos/views/badge.vue b/docs/demos/views/badge.vue
index 308c35e1a..80342523d 100644
--- a/docs/demos/views/badge.vue
+++ b/docs/demos/views/badge.vue
@@ -1,11 +1,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/docs/demos/views/button.vue b/docs/demos/views/button.vue
index a83f2da34..cad8cdfc4 100644
--- a/docs/demos/views/button.vue
+++ b/docs/demos/views/button.vue
@@ -5,7 +5,7 @@
{{ $t('primary') }}
{{ $t('danger') }}
-
+
{{ $t('large') }}
{{ $t('normal') }}
@@ -18,8 +18,8 @@
-
-
+
+
@@ -29,14 +29,14 @@
- {{ $t('button') }}
+ {{ $t('button') }}
- {{ $t('button') }}
+ {{ $t('button') }}
- {{ $t('button') }}
+ {{ $t('button') }}
@@ -75,10 +75,9 @@ export default {
mini: 'Mini'
}
}
-}
+};
-
\ No newline at end of file
+
diff --git a/docs/demos/views/card.vue b/docs/demos/views/card.vue
index 09892340c..d53cdb441 100644
--- a/docs/demos/views/card.vue
+++ b/docs/demos/views/card.vue
@@ -8,7 +8,7 @@
price="2.00"
:thumb="imageURL"
/>
-
+
diff --git a/docs/demos/views/cell-swipe.vue b/docs/demos/views/cell-swipe.vue
index 41c3afb1e..05c21e685 100644
--- a/docs/demos/views/cell-swipe.vue
+++ b/docs/demos/views/cell-swipe.vue
@@ -6,7 +6,7 @@
{{ $t('button1') }}
-
+
{{ $t('button2') }}
@@ -16,7 +16,7 @@
{{ $t('button1') }}
-
+
{{ $t('button2') }}
@@ -82,7 +82,7 @@ export default {
line-height: 44px;
}
.van-cell-swipe__left {
- background-color: #FF4444;
+ background-color: #FF4444;
}
.van-cell-swipe__right {
background-color: #84c483;
diff --git a/docs/demos/views/cell.vue b/docs/demos/views/cell.vue
index 8e4a3c9b8..4a366d357 100644
--- a/docs/demos/views/cell.vue
+++ b/docs/demos/views/cell.vue
@@ -37,12 +37,12 @@
-
+
-
+
-
\ No newline at end of file
+
diff --git a/docs/demos/views/layout.vue b/docs/demos/views/layout.vue
index fad7f479b..8d023225c 100644
--- a/docs/demos/views/layout.vue
+++ b/docs/demos/views/layout.vue
@@ -37,7 +37,7 @@ export default {
title2: 'Column Spacing'
}
}
-}
+};
\ No newline at end of file
+
diff --git a/docs/demos/views/lazyload.vue b/docs/demos/views/lazyload.vue
index 9a8a96fb7..c242500cc 100644
--- a/docs/demos/views/lazyload.vue
+++ b/docs/demos/views/lazyload.vue
@@ -1,7 +1,7 @@
-
+
@@ -10,7 +10,7 @@
-
+
@@ -53,7 +53,7 @@ export default {
console.log('component show');
}
}
-}
+};
\ No newline at end of file
+
diff --git a/docs/demos/views/loading.vue b/docs/demos/views/loading.vue
index 2ce588f23..6b7430075 100644
--- a/docs/demos/views/loading.vue
+++ b/docs/demos/views/loading.vue
@@ -31,7 +31,7 @@ export default {
title3: 'Spinner'
}
}
-}
+};
\ No newline at end of file
+
diff --git a/docs/demos/views/number-keyboard.vue b/docs/demos/views/number-keyboard.vue
index e204ce2c9..faada3ef1 100644
--- a/docs/demos/views/number-keyboard.vue
+++ b/docs/demos/views/number-keyboard.vue
@@ -7,8 +7,8 @@
-
-
-
@@ -55,7 +55,7 @@ export default {
return {
currentPage1: 1,
currentPage2: 1,
- currentPage3: 1,
+ currentPage3: 1
};
}
};
diff --git a/docs/demos/views/panel.vue b/docs/demos/views/panel.vue
index 86cbdea15..6fe57b20c 100644
--- a/docs/demos/views/panel.vue
+++ b/docs/demos/views/panel.vue
@@ -32,4 +32,4 @@
padding: 20px;
}
}
-
\ No newline at end of file
+
diff --git a/docs/demos/views/picker.vue b/docs/demos/views/picker.vue
index 112fd2f6c..9e752f784 100644
--- a/docs/demos/views/picker.vue
+++ b/docs/demos/views/picker.vue
@@ -10,7 +10,7 @@
{{ $t('button6') }}
-
+
\ No newline at end of file
+}
+
diff --git a/docs/demos/views/radio.vue b/docs/demos/views/radio.vue
index a7543028b..ce0fa9d91 100644
--- a/docs/demos/views/radio.vue
+++ b/docs/demos/views/radio.vue
@@ -81,7 +81,7 @@ export default {
float: right;
position: static;
}
-
+
.van-radio__label {
margin: 0;
}
diff --git a/docs/demos/views/search.vue b/docs/demos/views/search.vue
index 942816da6..a99ef21f2 100644
--- a/docs/demos/views/search.vue
+++ b/docs/demos/views/search.vue
@@ -9,7 +9,7 @@
@@ -19,8 +19,9 @@
+ :show-action="true"
+ @search="onSearch"
+ >
{{ $t('search') }}
@@ -44,7 +45,7 @@ export default {
data() {
return {
- value: '',
+ value: ''
};
},
@@ -65,4 +66,4 @@ export default {
padding: 0 10px;
}
}
-
\ No newline at end of file
+
diff --git a/docs/demos/views/sku.vue b/docs/demos/views/sku.vue
index 51773c0d3..29e95078b 100644
--- a/docs/demos/views/sku.vue
+++ b/docs/demos/views/sku.vue
@@ -6,16 +6,15 @@
v-model="showBase"
:sku="$t('sku').sku"
:goods="$t('sku').goods_info"
- :goodsId="$t('sku').goods_id"
- :hideStock="$t('sku').sku.hide_stock"
+ :goods-id="$t('sku').goods_id"
+ :hide-stock="$t('sku').sku.hide_stock"
:quota="$t('sku').quota"
- :quotaUsed="$t('sku').quota_used"
- :resetStepperOnHide="true"
- :disableStepperInput="true"
+ :quota-used="$t('sku').quota_used"
+ :reset-stepper-on-hide="true"
+ :disable-stepper-input="true"
@buy-clicked="handleBuyClicked"
@add-cart="handleAddCartClicked"
- >
-
+ />
{{ $t('basicUsage') }}
@@ -24,24 +23,24 @@
-
+
- {{ $t('button1') }}
- {{ $t('button2') }}
+ {{ $t('button1') }}
+ {{ $t('button2') }}
diff --git a/docs/demos/views/stepper.vue b/docs/demos/views/stepper.vue
index 2890c2788..6e659d051 100644
--- a/docs/demos/views/stepper.vue
+++ b/docs/demos/views/stepper.vue
@@ -9,9 +9,9 @@
-
+
-
+
\ No newline at end of file
+
diff --git a/docs/demos/views/submit-bar.vue b/docs/demos/views/submit-bar.vue
index c02a6ff44..b7367643f 100644
--- a/docs/demos/views/submit-bar.vue
+++ b/docs/demos/views/submit-bar.vue
@@ -3,7 +3,7 @@
@@ -12,7 +12,7 @@
@@ -22,7 +22,7 @@
@@ -30,7 +30,7 @@
{{ $t('check') }}
diff --git a/docs/demos/views/swipe.vue b/docs/demos/views/swipe.vue
index aafe36147..ca66d62d9 100644
--- a/docs/demos/views/swipe.vue
+++ b/docs/demos/views/swipe.vue
@@ -12,7 +12,7 @@
-
+
@@ -77,4 +77,4 @@ export default {
}
}
}
-
\ No newline at end of file
+
diff --git a/docs/demos/views/switch-cell.vue b/docs/demos/views/switch-cell.vue
index 264901030..76e125eab 100644
--- a/docs/demos/views/switch-cell.vue
+++ b/docs/demos/views/switch-cell.vue
@@ -22,15 +22,6 @@
-
-
-
diff --git a/docs/demos/views/switch.vue b/docs/demos/views/switch.vue
index da24b2206..92df8d9e9 100644
--- a/docs/demos/views/switch.vue
+++ b/docs/demos/views/switch.vue
@@ -51,7 +51,6 @@ export default {
};
-
diff --git a/docs/demos/views/waterfall.vue b/docs/demos/views/waterfall.vue
index 965895c3a..3c63a8213 100644
--- a/docs/demos/views/waterfall.vue
+++ b/docs/demos/views/waterfall.vue
@@ -40,7 +40,7 @@ export default {
loadMore() {
this.disabled = true;
setTimeout(() => {
- for (let i = 0; i < 5; i ++) {
+ for (let i = 0; i < 5; i++) {
this.list.push(this.list.length);
}
this.disabled = false;
@@ -50,7 +50,6 @@ export default {
};
-