diff --git a/.prettierignore b/.prettierignore
index c77005801..f03c4e5e0 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -24,3 +24,6 @@ components/style/color/*.less
.gitattributes
.stylelintrc
.vcmrc
+.logo
+.npmrc.template
+.huskyrc
\ No newline at end of file
diff --git a/components/checkbox/__tests__/group.test.js b/components/checkbox/__tests__/group.test.js
index beb821ac6..7760f7914 100644
--- a/components/checkbox/__tests__/group.test.js
+++ b/components/checkbox/__tests__/group.test.js
@@ -40,7 +40,10 @@ describe('CheckboxGroup', () => {
it('does not trigger onChange callback of both Checkbox and CheckboxGroup when CheckboxGroup is disabled', () => {
const onChangeGroup = jest.fn();
- const options = [{ label: 'Apple', value: 'Apple' }, { label: 'Pear', value: 'Pear' }];
+ const options = [
+ { label: 'Apple', value: 'Apple' },
+ { label: 'Pear', value: 'Pear' },
+ ];
const groupWrapper = mount(
{
@@ -95,7 +98,10 @@ describe('CheckboxGroup', () => {
});
it('passes prefixCls down to checkbox', () => {
- const options = [{ label: 'Apple', value: 'Apple' }, { label: 'Orange', value: 'Orange' }];
+ const options = [
+ { label: 'Apple', value: 'Apple' },
+ { label: 'Orange', value: 'Orange' },
+ ];
const wrapper = mount({
render() {
@@ -106,7 +112,10 @@ describe('CheckboxGroup', () => {
expect(wrapper.html()).toMatchSnapshot();
});
it('should be controlled by value', async () => {
- const options = [{ label: 'Apple', value: 'Apple' }, { label: 'Orange', value: 'Orange' }];
+ const options = [
+ { label: 'Apple', value: 'Apple' },
+ { label: 'Orange', value: 'Orange' },
+ ];
const wrapper = mount(Checkbox.Group, {
propsData: { options },
diff --git a/components/date-picker/__tests__/utils.js b/components/date-picker/__tests__/utils.js
index 5727862a2..6ad15af12 100644
--- a/components/date-picker/__tests__/utils.js
+++ b/components/date-picker/__tests__/utils.js
@@ -1,4 +1,3 @@
-/* eslint-disable import/prefer-default-export */
export function $$(className) {
return document.body.querySelectorAll(className);
}
diff --git a/components/date-picker/demo/disabled-date.md b/components/date-picker/demo/disabled-date.md
index 6a64efda6..0e91e0ee3 100644
--- a/components/date-picker/demo/disabled-date.md
+++ b/components/date-picker/demo/disabled-date.md
@@ -24,7 +24,7 @@ Disabled part of dates and time by `disabledDate` and `disabledTime` respectivel
:disabledDate="disabledDate"
:disabledTime="disabledRangeTime"
:showTime="{
- hideDisabledOptions: true,
+ hideDisabledOptions: true,
defaultValue: [moment('00:00:00', 'HH:mm:ss'), moment('11:59:59', 'HH:mm:ss')]
}"
format="YYYY-MM-DD HH:mm:ss"
diff --git a/components/drawer/index.jsx b/components/drawer/index.jsx
index 38ebfea0a..17649a318 100644
--- a/components/drawer/index.jsx
+++ b/components/drawer/index.jsx
@@ -162,7 +162,7 @@ const Drawer = {
return (
{this.renderHeader(prefixCls)}
diff --git a/components/form/FormItem.jsx b/components/form/FormItem.jsx
index 07f04f239..95bdec62f 100644
--- a/components/form/FormItem.jsx
+++ b/components/form/FormItem.jsx
@@ -96,7 +96,8 @@ export default {
const { help, validateStatus } = this.$props;
warning(
this.getControls(this.slotDefault, true).length <= 1 ||
- (help !== undefined || validateStatus !== undefined),
+ help !== undefined ||
+ validateStatus !== undefined,
'`Form.Item` cannot generate `validateStatus` and `help` automatically, ' +
'while there are more than one `getFieldDecorator` in it.',
);
diff --git a/components/form/demo/validate-other.vue b/components/form/demo/validate-other.vue
index 9b73edee3..38e03320e 100644
--- a/components/form/demo/validate-other.vue
+++ b/components/form/demo/validate-other.vue
@@ -9,7 +9,12 @@ Demonstration of validation configuration for form controls which are not shown
-
+
China
diff --git a/components/locale-provider/__tests__/index.test.js b/components/locale-provider/__tests__/index.test.js
index 4e3e7dcf3..783c21828 100644
--- a/components/locale-provider/__tests__/index.test.js
+++ b/components/locale-provider/__tests__/index.test.js
@@ -1,4 +1,3 @@
-/* eslint-disable react/no-multi-comp */
import { mount } from '@vue/test-utils';
import Vue from 'vue';
import moment from 'moment';
diff --git a/components/radio/__tests__/group.test.js b/components/radio/__tests__/group.test.js
index 2e6926412..61de03bb4 100644
--- a/components/radio/__tests__/group.test.js
+++ b/components/radio/__tests__/group.test.js
@@ -218,7 +218,10 @@ describe('Radio', () => {
});
it('passes prefixCls down to radio', () => {
- const options = [{ label: 'Apple', value: 'Apple' }, { label: 'Orange', value: 'Orange' }];
+ const options = [
+ { label: 'Apple', value: 'Apple' },
+ { label: 'Orange', value: 'Orange' },
+ ];
const wrapper = mount(RadioGroup, {
propsData: {
diff --git a/components/table/__tests__/Table.filter.test.js b/components/table/__tests__/Table.filter.test.js
index 25504ebed..e8e597ec6 100644
--- a/components/table/__tests__/Table.filter.test.js
+++ b/components/table/__tests__/Table.filter.test.js
@@ -21,7 +21,10 @@ describe('Table.filter', () => {
{
text: 'Title',
value: 'title',
- children: [{ text: 'Designer', value: 'designer' }, { text: 'Coder', value: 'coder' }],
+ children: [
+ { text: 'Designer', value: 'designer' },
+ { text: 'Coder', value: 'coder' },
+ ],
},
],
onFilter: filterFn,
@@ -358,7 +361,10 @@ describe('Table.filter', () => {
title="name"
dataIndex="name"
key="name"
- filters={[{ text: 'Jack', value: 'Jack' }, { text: 'Lucy', value: 'Lucy' }]}
+ filters={[
+ { text: 'Jack', value: 'Jack' },
+ { text: 'Lucy', value: 'Lucy' },
+ ]}
filteredValue={this.filters.name}
onFilter={filterFn}
/>
@@ -399,7 +405,10 @@ describe('Table.filter', () => {
title: 'Name',
dataIndex: 'name',
key: 'name',
- filters: [{ text: 'Jack', value: 'Jack' }, { text: 'Lucy', value: 'Lucy' }],
+ filters: [
+ { text: 'Jack', value: 'Jack' },
+ { text: 'Lucy', value: 'Lucy' },
+ ],
onFilter: filterFn,
filteredValue: ['Jack'],
},
diff --git a/components/table/index.zh-CN.md b/components/table/index.zh-CN.md
index e2a5bbbc8..9b71b5399 100644
--- a/components/table/index.zh-CN.md
+++ b/components/table/index.zh-CN.md
@@ -69,11 +69,11 @@ const columns = [
### 事件
-| 事件名称 | 说明 | 回调参数 |
-| ------------------ | -------------------------- | ------------------------------------- |
-| expandedRowsChange | 展开的行变化时触发 | Function(expandedRows) |
-| change | 分页、排序、筛选变化时触发 | Function(pagination, filters, sorter, { currentDataSource }) |
-| expand | 点击展开图标时触发 | Function(expanded, record) |
+| 事件名称 | 说明 | 回调参数 |
+| --- | --- | --- |
+| expandedRowsChange | 展开的行变化时触发 | Function(expandedRows) |
+| change | 分页、排序、筛选变化时触发 | Function(pagination, filters, sorter, { currentDataSource }) |
+| expand | 点击展开图标时触发 | Function(expanded, record) |
#### customRow 用法
diff --git a/components/tree/DirectoryTree.jsx b/components/tree/DirectoryTree.jsx
index 7463e336f..03bf15947 100644
--- a/components/tree/DirectoryTree.jsx
+++ b/components/tree/DirectoryTree.jsx
@@ -171,7 +171,10 @@ export default {
},
setUncontrolledState(state) {
- const newState = omit(state, Object.keys(getOptionProps(this)).map(p => `_${p}`));
+ const newState = omit(
+ state,
+ Object.keys(getOptionProps(this)).map(p => `_${p}`),
+ );
if (Object.keys(newState).length) {
this.setState(newState);
}
diff --git a/components/tree/Tree.jsx b/components/tree/Tree.jsx
index bf97528b7..eb0599179 100644
--- a/components/tree/Tree.jsx
+++ b/components/tree/Tree.jsx
@@ -161,14 +161,7 @@ export default {
return treeData.map(item => {
const key = item[replaceFields.key];
const children = item[replaceFields.children];
- const {
- on = {},
- slots = {},
- scopedSlots = {},
- class: cls,
- style,
- ...restProps
- } = item;
+ const { on = {}, slots = {}, scopedSlots = {}, class: cls, style, ...restProps } = item;
const treeNodeProps = {
...restProps,
icon:
diff --git a/components/tree/demo/index.vue b/components/tree/demo/index.vue
index 4583c3e19..53cb48a10 100644
--- a/components/tree/demo/index.vue
+++ b/components/tree/demo/index.vue
@@ -38,7 +38,7 @@ export default {
-
+
diff --git a/components/tree/index.en-US.md b/components/tree/index.en-US.md
index 7d4ebe349..4b98bb33d 100644
--- a/components/tree/index.en-US.md
+++ b/components/tree/index.en-US.md
@@ -64,8 +64,8 @@ One of the Tree `treeNode` prop for describing the tree's node, TreeNode has the
### DirectoryTree props
-| Property | Description | Type | Default |
-| ------------ | ------------------------------------------------------------ | ------ | ------- |
+| Property | Description | Type | Default |
+| ------------ | ------------------------------------------------------------- | ------ | ------- |
| expandAction | Directory open logic, optional `false` `'click'` `'dblclick'` | string | click |
## FAQ
diff --git a/components/tree/index.zh-CN.md b/components/tree/index.zh-CN.md
index 89097245d..7bf576e83 100644
--- a/components/tree/index.zh-CN.md
+++ b/components/tree/index.zh-CN.md
@@ -5,7 +5,7 @@
| 参数 | 说明 | 类型 | 默认值 |
| --- | --- | --- | --- |
| treeData | 节点的配置描述,具体项见下表, 1.1.4 之前的版本使用`treeNodes` | array | -- |
-| replaceFields | 替换treeNode中 title,key,children字段为treeData中对应的字段 | object |{children:'children', title:'title', key:'key' } |
+| replaceFields | 替换 treeNode 中 title,key,children 字段为 treeData 中对应的字段 | object | {children:'children', title:'title', key:'key' } |
| autoExpandParent | 是否自动展开父节点 | boolean | true |
| checkable | 节点前添加 Checkbox 复选框 | boolean | false |
| checkedKeys(v-model) | (受控)选中复选框的树节点(注意:父子节点有关联,如果传入父节点 key,则子节点自动选中;相应当子节点 key 都传入,父节点也自动选中。当设置`checkable`和`checkStrictly`,它是一个有`checked`和`halfChecked`属性的对象,并且父子节点的选中与否不再关联 | string\[] \| number\[] \| {checked: string\[] \| number\[], halfChecked: string\[] \| number\[]} | \[] |
@@ -64,8 +64,8 @@
### DirectoryTree props
-| 参数 | 说明 | 类型 | 默认值 |
-| ------------ | ------------------------------------------------ | ------ | ------ |
+| 参数 | 说明 | 类型 | 默认值 |
+| ------------ | ------------------------------------------------- | ------ | ------ |
| expandAction | 目录展开逻辑,可选 `false` `'click'` `'dblclick'` | string | click |
## FAQ
diff --git a/components/upload/__tests__/mock.js b/components/upload/__tests__/mock.js
index 83ac77ef3..1f2e57c8a 100644
--- a/components/upload/__tests__/mock.js
+++ b/components/upload/__tests__/mock.js
@@ -11,4 +11,4 @@ export function setup() {
});
}
-export const teardown = mock.teardown.bind(mock);
\ No newline at end of file
+export const teardown = mock.teardown.bind(mock);
diff --git a/components/vc-calendar/demo/antd-calendar.vue b/components/vc-calendar/demo/antd-calendar.vue
index 70f84df06..4220d944a 100644
--- a/components/vc-calendar/demo/antd-calendar.vue
+++ b/components/vc-calendar/demo/antd-calendar.vue
@@ -1,5 +1,5 @@