Skip to content

Commit db97c57

Browse files
authored
chore: add remark lint (ant-design#23457)
* 💄 Add remark lint for markdown files * 💄 Add remark lint for markdown files * 💄 Add remark lint for markdown files
1 parent 1163d8e commit db97c57

23 files changed

+42
-32
lines changed

.remarkrc.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const config = {
2+
plugins: [
3+
'remark-preset-lint-recommended',
4+
['remark-lint-list-item-indent', 'space'],
5+
['remark-lint-no-literal-urls', false],
6+
],
7+
};
8+
9+
module.exports = config;

CODE_OF_CONDUCT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe
3434

3535
## Enforcement
3636

37-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
37+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [[email protected].](mailto:[email protected].) The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
3838

3939
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
4040

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ An enterprise-class UI design language and React UI library.
3232
[download-url]: https://npmjs.org/package/antd
3333
[lgtm-image]: https://flat.badgen.net/lgtm/alerts/g/ant-design/ant-design
3434
[lgtm-url]: https://lgtm.com/projects/g/ant-design/ant-design/alerts/
35-
[lgtm-image]: https://flat.badgen.net/lgtm/alerts/g/ant-design/ant-design
36-
[lgtm-url]: https://lgtm.com/projects/g/ant-design/ant-design/alerts/
3735
[fossa-image]: https://app.fossa.io/api/projects/git%2Bgithub.com%2Fant-design%2Fant-design.svg?type=shield
3836
[fossa-url]: https://app.fossa.io/projects/git%2Bgithub.com%2Fant-design%2Fant-design?ref=badge_shield
3937
[help-wanted-image]: https://flat.badgen.net/github/label-issues/ant-design/ant-design/help%20wanted/open

components/date-picker/index.en-US.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Added in `4.1.0`.
146146
| allowEmpty | Allow start or end input leave empty | \[boolean, boolean] | \[false, false] | |
147147
| defaultValue | to set default date | \[[moment](http://momentjs.com/), [moment](http://momentjs.com/)] | - | |
148148
| defaultPickerValue | to set default picker date | \[[moment](http://momentjs.com/), [moment](http://momentjs.com/)\] | - | |
149-
| disabled | disable start or end | [boolean, boolean] | - | |
149+
| disabled | disable start or end | `[boolean, boolean]` | - | |
150150
| disabledTime | to specify the time that cannot be selected | function(dates: \[moment, moment], partial: `'start'|'end'`) | - | |
151151
| format | to set the date format, refer to [moment.js](http://momentjs.com/). When an array is provided, all values are used for parsing and first value is used for formatting. | string \| string[] | "YYYY-MM-DD HH:mm:ss" | |
152152
| ranges | preseted ranges for quick selection | { \[range: string]: [moment](http://momentjs.com/)\[] } \| { \[range: string]: () => [moment](http://momentjs.com/)\[] } | - | |

components/date-picker/index.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ import 'moment/locale/zh-cn';
148148
| allowEmpty | 允许起始项部分为空 | \[boolean, boolean] | \[false, false] | |
149149
| defaultValue | 默认日期 | [moment](http://momentjs.com/)\[] || |
150150
| defaultPickerValue | 默认面板日期 | [moment](http://momentjs.com/)\[] || |
151-
| disabled | 禁用起始项 | [boolean, boolean] || |
151+
| disabled | 禁用起始项 | `[boolean, boolean]` || |
152152
| disabledTime | 不可选择的时间 | function(dates: \[moment, moment\], partial: `'start'|'end'`) || |
153153
| format | 展示的日期格式 | string | "YYYY-MM-DD HH:mm:ss" | |
154154
| ranges | 预设时间范围快捷选择 | { \[range: string]: [moment](http://momentjs.com/)\[] } \| { \[range: string]: () => [moment](http://momentjs.com/)\[] } || |

components/input-number/index.en-US.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ When a numeric value needs to be provided.
2525
| decimalSeparator | decimal separator | string | |
2626
| size | height of input box | `large` \| `middle` \| `small` | |
2727
| step | The number to which the current value is increased or decreased. It can be an integer or decimal. | number\|string | 1 |
28-
| type | HTML inputs can have a type of `number`, and this can be added to aid [mobile] broswer keyboards to show the number keybaord, as well as limit inputs to numbers only [0-9 and e], but will not guaruntee client and server side validation. | string - ie 'number' | |
28+
| type | HTML inputs can have a type of `number`, and this can be added to aid mobile broswer keyboards to show the number keybaord, as well as limit inputs to numbers only `0-9` and `e`, but will not guaruntee client and server side validation. | string - ie 'number' | |
2929
| value | current value | number | |
3030
| onChange | The callback triggered when the value is changed. | function(value: number \| string) | |
3131
| onPressEnter | The callback function that is triggered when Enter key is pressed. | function(e) | |

components/input-number/index.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ title: InputNumber
2323
| formatter | 指定输入框展示值的格式 | function(value: number \| string): string | |
2424
| max | 最大值 | number | Infinity |
2525
| min | 最小值 | number | -Infinity |
26-
| parser | 指定从 formatter 里转换回数字的方式,和 formatter 搭配使用 | function( string): number | |
26+
| parser | 指定从 `formatter` 里转换回数字的方式,和 `formatter` 搭配使用 | function(string): number | |
2727
| precision | 数值精度 | number | |
2828
| decimalSeparator | 小数点 | string | |
2929
| size | 输入框大小 | `large` \| `middle` \| `small` ||

docs/react/use-in-typescript.en-US.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Add `antd/dist/antd.css` at the top of `src/App.css`.
7676
...
7777
```
7878

79-
Ok, reboot with `yarn start`, you should now see a blue primary button displayed on the page. Next you can choose any components of `antd` to develop your application. Visit other workflows of `create-react-app` at its [User Guide ](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md).
79+
Ok, reboot with `yarn start`, you should now see a blue primary button displayed on the page. Next you can choose any components of `antd` to develop your application. Visit other workflows of `create-react-app` at it's [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md).
8080

8181
## Advanced Guides
8282

@@ -196,7 +196,7 @@ You can also follow instructions in [Use in create-react-app](/docs/react/use-wi
196196
And you can use [react-scripts-ts-antd](https://www.npmjs.com/package/react-scripts-ts-antd) which includes ts-import-plugin, react-app-rewired, scss, less and etc. You can create a new project that without any configurations by running just one command.
197197

198198
- [Create React apps (with Typescript and antd) with no build configuration](https://github.com/SZzzzz/react-scripts-ts-antd)
199-
- [react-app-rewire-typescript][https://github.com/lwd-technology/react-app-rewire-typescript]
199+
- [react-app-rewire-typescript](https://github.com/lwd-technology/react-app-rewire-typescript)
200200
- [ts-import-plugin](https://github.com/Brooooooklyn/ts-import-plugin)
201201
- [create-react-app Adding TypeScript](https://facebook.github.io/create-react-app/docs/adding-typescript)
202202
- [Migrating from create-react-app-typescript to Create React App](https://vincenttunru.com/migrate-create-react-app-typescript-to-create-react-app/)

docs/react/use-in-typescript.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ module.exports = override(
194194
你也可以使用 [react-scripts-ts-antd](https://www.npmjs.com/package/react-scripts-ts-antd),其中包括了 ts-import-plugin,react-app-rewired,scss,less 等插件。你可以通过只运行一个命令来创建一个没有任何配置的新项目。
195195

196196
- [Create React apps (with Typescript and antd) with no build configuration](https://github.com/SZzzzz/react-scripts-ts-antd)
197-
- [react-app-rewire-typescript][https://github.com/lwd-technology/react-app-rewire-typescript]
197+
- [react-app-rewire-typescript](https://github.com/lwd-technology/react-app-rewire-typescript)
198198
- [ts-import-plugin](https://github.com/Brooooooklyn/ts-import-plugin)
199199
- [create-react-app Adding TypeScript](https://facebook.github.io/create-react-app/docs/adding-typescript)
200200
- [Migrating from create-react-app-typescript to Create React App](https://vincenttunru.com/migrate-create-react-app-typescript-to-create-react-app/)

docs/react/use-with-create-react-app.en-US.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Add `antd/dist/antd.css` at the top of `src/App.css`.
8484
...
8585
```
8686

87-
Ok, you should now see a blue primary button displayed on the page. Next you can choose any components of `antd` to develop your application. Visit other workflows of `create-react-app` at its [User Guide ](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md).
87+
Ok, you should now see a blue primary button displayed on the page. Next you can choose any components of `antd` to develop your application. Visit other workflows of `create-react-app` at its [User Guide](https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md).
8888

8989
We are successfully running antd components now, go build your own application!
9090

docs/spec/alignment.en-US.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: Alignment
77

88
As is described in the Law of Continuity of Gestalt psychology, in the perceptual process, people usually tend to understand the object in the way that it is firstly perceived, to let the straight lines be straight and let the curve lines be curve. In the design of interface, aligning the elements meets users' perception, also delivers the information to users in a more smooth way.
99

10-
> ** Gestalt psychology or gestaltismGerman:Gestalttheorie**Gestalttheorie is an important genre of psychology. It rose in the beginning of the 20 century in Germany.The central principle of gestalt psychology is that the mind forms a global whole with self-organizing tendencies.「The whole is other than the sum of the parts.」--Quote from Wikipedia
10+
> **Gestalt psychology or gestaltism (German:Gestalttheorie)**: Gestalttheorie is an important genre of psychology. It rose in the beginning of the 20 century in Germany.The central principle of gestalt psychology is that the mind forms a global whole with self-organizing tendencies.「The whole is other than the sum of the parts.」--Quote from Wikipedia
1111
1212
---
1313

docs/spec/alignment.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: 对齐
77

88
正如「格式塔学派」中的连续律(Law of Continuity)所描述的,在知觉过程中人们往往倾向于使知觉对象的直线继续成为直线,使曲线继续成为曲线。在界面设计中,将元素进行对齐,既符合用户的认知特性,也能引导视觉流向,让用户更流畅地接收信息。
99

10-
> ** 格式塔学派(德语:Gestalttheorie)** :是心理学重要流派之一,兴起于 20 世纪初的德国,又称为完形心理学;主张人脑的运作原理是整体的,「整体不同于其部件的总和」。——摘自「维基百科」
10+
> **格式塔学派(德语:Gestalttheorie)**:是心理学重要流派之一,兴起于 20 世纪初的德国,又称为完形心理学;主张人脑的运作原理是整体的,「整体不同于其部件的总和」。——摘自「维基百科」
1111
1212
---
1313

docs/spec/data-display.zh-CN.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ title: 数据展示
4343

4444
> 注:
4545
>
46-
> 1. 卡片通常根据栅格进行排列,建议一行最多不超过四个
47-
> 2. 在有限的卡片空间内需注意信息之间的间距,若信息过长可做截断处理。例如『Ant Design 适用于中台…』
46+
> 1. 卡片通常根据栅格进行排列,建议一行最多不超过四个
47+
> 2. 在有限的卡片空间内需注意信息之间的间距,若信息过长可做截断处理。例如『Ant Design 适用于中台…』
4848
4949
---
5050

docs/spec/invitation.en-US.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ A common problem with many of these rich interactions (e.g. Drag and Drop, Inlin
99

1010
Invitations are the prompts and cues that lead users through an interaction. They often include just-in-time tips or visual affordances that hint at what will happen next in the interface.
1111

12-
> ** Signifiers ** are signals, communication devices. These signs tell you about the possible actions; what to do, and where to do it. Signifiers are often visible, audible or tangible, from the Design of Everyday Things.
12+
> **Signifiers** are signals, communication devices. These signs tell you about the possible actions; what to do, and where to do it. Signifiers are often visible, audible or tangible, from the Design of Everyday Things.
1313
14-
> ** Affordances ** are the relationships (read: possible actions) between an object and an entity (most often a person). The presence of an affordance is determined by the properties of the object and of the abilities of the entity who's interacting with the object, from the Design of Everyday Things.
14+
> **Affordances** are the relationships (read: possible actions) between an object and an entity (most often a person). The presence of an affordance is determined by the properties of the object and of the abilities of the entity who's interacting with the object, from the Design of Everyday Things.
1515
1616
---
1717

docs/spec/invitation.zh-CN.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ title: 提供邀请
99

1010
邀请就是引导用户进入下一个交互层次的提醒和暗示,通常包括意符(eg:实时的提示信息)和可供性,以表明在下一个界面可以做什么。当可供性中可感知的部分(Perceived Affordance)表现为意符时,人机交互的过程往往更加自然、顺畅。
1111

12-
> ** 意符(Signifiers)** :一种额外的提示,告诉用户可以采取什么行为,以及应该怎么操作;必须是可感知(eg:视觉、听觉、触觉等)。——摘自《设计心理学 1 》
12+
> **意符(Signifiers)**:一种额外的提示,告诉用户可以采取什么行为,以及应该怎么操作;必须是可感知(eg:视觉、听觉、触觉等)。——摘自《设计心理学 1 》
1313
14-
> ** 可供性(Affordance)** :也被翻译成「示能」,由 James J. Gibson 提出,定义为物品的特性与决定物品用途的主体能力之间的关系;其中部分可感知(此部分定义为 Perceived Affordance),部分不可感知。——摘自《设计心理学 1 》
14+
> **可供性(Affordance)**:也被翻译成「示能」,由 James J. Gibson 提出,定义为物品的特性与决定物品用途的主体能力之间的关系;其中部分可感知(此部分定义为 Perceived Affordance),部分不可感知。——摘自《设计心理学 1 》
1515
1616
---
1717

docs/spec/lightweight.en-US.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ title: Keep it Lightweight
88
Fitts's Law is an ergonomic principle that ties the size of a target and its contextual proximity to ease of use. In other words, if a tool is close at hand and large enough to target, then we can improve the user's interaction. Putting tools in context makes for lightweight interaction.
99

1010
> <img src="https://os.alipayobjects.com/rmsportal/wAcbQmeqTWDqsnu.png" width="150" />
11-
> ** Fitts's Law **: The time to acquire a target is a function of the distance to and size of the target. It is proportional to the distance to the target and inversely proportional to the width of the target.
11+
> **Fitts's Law**: The time to acquire a target is a function of the distance to and size of the target. It is proportional to the distance to the target and inversely proportional to the width of the target.
1212
1313
---
1414

docs/spec/lightweight.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: 简化交互
77

88
根据费茨法则(Fitts's Law)所描述的,如果用户鼠标移动距离越少、对象相对目标越大,那么用户越容易操作。通过运用上下文工具(即:放在内容中的操作工具),使内容和操作融合,从而简化交互。
99

10-
> ** 费茨法则 ** :到达目标的时间是到达目标的距离与目标大小的函数,具体:<img src="https://os.alipayobjects.com/rmsportal/wAcbQmeqTWDqsnu.png" width="150" />。其中:1.设备当前位置和目标位置的距离(D);2.目标的大小(W)。距离越长,所用时间越长;目标越大,所用时间越短。
10+
> **费茨法则** :到达目标的时间是到达目标的距离与目标大小的函数,具体:<img src="https://os.alipayobjects.com/rmsportal/wAcbQmeqTWDqsnu.png" width="150" />。其中:1.设备当前位置和目标位置的距离(D);2.目标的大小(W)。距离越长,所用时间越长;目标越大,所用时间越短。
1111
1212
---
1313

docs/spec/reaction.en-US.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ While we can't literally extend Newton's law to the world of user interfaces, we
1111

1212
While there is a possibility of too much feedback (or, more accurately, too much of the wrong feedback—a concept we will discuss in the upcoming chapters), a system with little or no feedback feels sluggish and thickheaded.
1313

14-
> ** Newton's Third Law of Motion **: For every action, there is an equal and opposite reaction, from Wikipedia.
14+
> **Newton's Third Law of Motion**: For every action, there is an equal and opposite reaction, from Wikipedia.
1515
1616
---
1717

docs/spec/reaction.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ title: 即时反应
1111

1212
虽然反馈太多(准确的说,错误的反馈太多)是一个问题,但是反馈太少甚至没有反馈的系统,则让人感觉迟钝和笨拙,用户体验更差。
1313

14-
> ** 牛顿第三定律 ** :当两个物体互相作用时,彼此施加于对方的力,其大小相等、方向相反。——摘自《维基百科》
14+
> **牛顿第三定律** :当两个物体互相作用时,彼此施加于对方的力,其大小相等、方向相反。——摘自《维基百科》
1515
1616
---
1717

docs/spec/stay.en-US.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ title: Stay on the Page
77

88
Solve most of problems on the same page and avoid a new one, because the page refresh and forwarding can lead to change blindness, in addition to disrupting the user's mental flow.
99

10-
> ** Change Blindness** is a surprising perceptual phenomenon that occurs when a change in a visual stimulus is introduced and the observer does not notice it. People's poor ability to detect changes has been argued to reflect fundamental limitations of human attention, from the term of Change blindness, Wikipedia.
10+
> **Change Blindness** is a surprising perceptual phenomenon that occurs when a change in a visual stimulus is introduced and the observer does not notice it. People's poor ability to detect changes has been argued to reflect fundamental limitations of human attention, from the term of Change blindness, Wikipedia.
1111
12-
> ** Flow**, also known as the zone, is the mental state of operation in which a person performing an activity is fully immersed in a feeling of energized focus, full involvement, and enjoyment in the process of the activity, from the term of Flow, Wikipedia
12+
> **Flow**, also known as the zone, is the mental state of operation in which a person performing an activity is fully immersed in a feeling of energized focus, full involvement, and enjoyment in the process of the activity, from the term of Flow, Wikipedia
1313
1414
---
1515

0 commit comments

Comments
 (0)