Skip to content

Commit b0a4287

Browse files
chore: update lint-staged config to include markdown (#9323)
1 parent 2c83788 commit b0a4287

10 files changed

Lines changed: 1967 additions & 2459 deletions

File tree

.lintstagedrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"*.less": "stylelint --fix",
3-
"*.{html,ts}": "eslint --fix"
3+
"*.{md,html,ts}": "eslint --fix"
44
}

CHANGELOG.md

Lines changed: 1844 additions & 2345 deletions
Large diffs are not rendered by default.

CODE_OF_CONDUCT.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,22 @@ appearance, race, religion, or sexual identity and orientation.
1414
Examples of behavior that contributes to creating a positive environment
1515
include:
1616

17-
* Using welcoming and inclusive language
18-
* Being respectful of differing viewpoints and experiences
19-
* Gracefully accepting constructive criticism
20-
* Focusing on what is best for the community
21-
* Showing empathy towards other community members
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
2222

2323
Examples of unacceptable behavior by participants include:
2424

25-
* The use of sexualized language or imagery and unwelcome sexual attention or
26-
advances
27-
* Trolling, insulting/derogatory comments, and personal or political attacks
28-
* Public or private harassment
29-
* Publishing others' private information, such as a physical or electronic
30-
address, without explicit permission
31-
* Other conduct which could reasonably be considered inappropriate in a
32-
professional setting
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
3333

3434
## Our Responsibilities
3535

CONTRIBUTING.md

Lines changed: 91 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@
33
We would love for you to contribute to NG-ZORRO and help make it even better than it is
44
today! As a contributor, here are the guidelines we would like you to follow:
55

6-
- [Code of Conduct](#coc)
7-
- [Question or Problem?](#question)
8-
- [Issues and Bugs](#issue)
9-
- [Feature Requests](#feature)
10-
- [Submission Guidelines](#submit)
11-
- [Coding Rules](#rules)
12-
- [Commit Message Guidelines](#commit)
6+
- [Code of Conduct](#coc)
7+
- [Question or Problem?](#question)
8+
- [Issues and Bugs](#issue)
9+
- [Feature Requests](#feature)
10+
- [Submission Guidelines](#submit)
11+
- [Coding Rules](#rules)
12+
- [Commit Message Guidelines](#commit)
1313

1414
## <a name="coc"></a> Code of Conduct
15+
1516
Help us keep NG-ZORRO open and inclusive. Please read and follow our [Code of Conduct](https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/CODE_OF_CONDUCT.md).
1617

1718
## <a name="question"></a> Got a Question or Problem?
@@ -29,20 +30,22 @@ To save your and our time, we will systematically close all issues that are requ
2930
If you would like to chat about the question in real-time, you can reach out via [![Discord](https://img.shields.io/discord/748677963142135818?label=Discord&style=flat-square)](https://discord.com/channels/748677963142135818/764322550712893451).
3031

3132
## <a name="issue"></a> Found a Bug?
33+
3234
If you find a bug in the source code, you can help us by
3335
[submitting an issue](#submit-issue) to our [GitHub Repository](https://github.com/NG-ZORRO/ng-zorro-antd). Even better, you can
3436
[submit a Pull Request](#submit-pr) with a fix.
3537

3638
## <a name="feature"></a> Missing a Feature?
37-
You can *request* a new feature by [submitting an issue](#submit-issue) to our GitHub
38-
Repository. If you would like to *implement* a new feature, please submit an issue with
39-
a for your work first, to be sure that we can use it.
39+
40+
You can _request_ a new feature by [submitting an issue](#submit-issue) to our GitHub
41+
Repository. If you would like to _implement_ a new feature, please submit an issue with
42+
a for your work first, to be sure that we can use it.
4043
Please consider what kind of change it is:
4144

42-
* For a **Major Feature**, first open an issue and outline your proposal so that it can be
43-
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
44-
and help you to craft the change so that it is successfully accepted into the project.
45-
* **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
45+
- For a **Major Feature**, first open an issue and outline your proposal so that it can be
46+
discussed. This will also allow us to better coordinate our efforts, prevent duplication of work,
47+
and help you to craft the change so that it is successfully accepted into the project.
48+
- **Small Features** can be crafted and directly [submitted as a Pull Request](#submit-pr).
4649

4750
## <a name="submit"></a> Submission Guidelines
4851

@@ -64,41 +67,42 @@ Unfortunately we are not able to investigate / fix bugs without a minimal reprod
6467

6568
You can file new issues by filling out our [new issue form](https://github.com/NG-ZORRO/ng-zorro-antd/issues/new).
6669

67-
6870
### <a name="submit-pr"></a> Submitting a Pull Request (PR)
71+
6972
Before you submit your Pull Request (PR) consider the following guidelines:
7073

71-
* Search [GitHub](https://github.com/NG-ZORRO/ng-zorro-antd/pulls) for an open or closed PR
74+
- Search [GitHub](https://github.com/NG-ZORRO/ng-zorro-antd/pulls) for an open or closed PR
7275
that relates to your submission. You don't want to duplicate effort.
73-
* Make your changes in a new git branch:
76+
- Make your changes in a new git branch:
7477

75-
```shell
76-
git checkout -b my-fix-branch master
77-
```
78+
```shell
79+
git checkout -b my-fix-branch master
80+
```
7881

79-
* Create your patch, **including appropriate test cases**.
80-
* Follow our [Coding Rules](#rules).
81-
* Run the full test suite, and ensure that all tests pass.
82-
* Commit your changes using a descriptive commit message that follows our
82+
- Create your patch, **including appropriate test cases**.
83+
- Follow our [Coding Rules](#rules).
84+
- Run the full test suite, and ensure that all tests pass.
85+
- Commit your changes using a descriptive commit message that follows our
8386
[commit message conventions](#commit). Adherence to these conventions
8487
is necessary because release notes are automatically generated from these messages.
8588

86-
```shell
87-
git commit -a
88-
```
89+
```shell
90+
git commit -a
91+
```
92+
8993
Note: the optional commit `-a` command line option will automatically "add" and "rm" edited files.
9094

91-
* Push your branch to GitHub:
95+
- Push your branch to GitHub:
9296

93-
```shell
94-
git push origin my-fix-branch
95-
```
97+
```shell
98+
git push origin my-fix-branch
99+
```
96100

97-
* In GitHub, send a pull request to `ng-zorro-antd:master`.
98-
* If we suggest changes then:
99-
* Make the required updates.
100-
* Re-run the NG-ZORRO test suites to ensure tests are still passing.
101-
* Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
101+
- In GitHub, send a pull request to `ng-zorro-antd:master`.
102+
- If we suggest changes then:
103+
- Make the required updates.
104+
- Re-run the NG-ZORRO test suites to ensure tests are still passing.
105+
- Rebase your branch and force push to your GitHub repository (this will update your Pull Request):
102106

103107
```shell
104108
git rebase master -i
@@ -112,44 +116,46 @@ That's it! Thank you for your contribution!
112116
After your pull request is merged, you can safely delete your branch and pull the changes
113117
from the main (upstream) repository:
114118
115-
* Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
119+
- Delete the remote branch on GitHub either through the GitHub web UI or your local shell as follows:
116120
117-
```shell
118-
git push origin --delete my-fix-branch
119-
```
121+
```shell
122+
git push origin --delete my-fix-branch
123+
```
120124
121-
* Check out the master branch:
125+
- Check out the master branch:
122126
123-
```shell
124-
git checkout master -f
125-
```
127+
```shell
128+
git checkout master -f
129+
```
126130
127-
* Delete the local branch:
131+
- Delete the local branch:
128132
129-
```shell
130-
git branch -D my-fix-branch
131-
```
133+
```shell
134+
git branch -D my-fix-branch
135+
```
132136
133-
* Update your master with the latest upstream version:
137+
- Update your master with the latest upstream version:
134138
135-
```shell
136-
git pull --ff upstream master
137-
```
139+
```shell
140+
git pull --ff upstream master
141+
```
138142
139143
## <a name="rules"></a> Coding Rules
144+
140145
To ensure consistency throughout the source code, keep these rules in mind as you are working:
141146
142-
* All features or bug fixes **must be tested** by one or more specs (unit-tests).
143-
* All public API methods **must be documented**.
147+
- All features or bug fixes **must be tested** by one or more specs (unit-tests).
148+
- All public API methods **must be documented**.
144149
145150
## <a name="commit"></a> Commit Message Guidelines
146151
147-
We have very precise rules over how our git commit messages can be formatted. This leads to **more
148-
readable messages** that are easy to follow when looking through the **project history**. But also,
152+
We have very precise rules over how our git commit messages can be formatted. This leads to **more
153+
readable messages** that are easy to follow when looking through the **project history**. But also,
149154
we use the git commit messages to **generate the NG-ZORRO change log**.
150155
151156
### Commit Message Format
152-
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
157+
158+
Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
153159
format that includes a **type**, a **scope** and a **subject**:
154160
155161
```txt
@@ -172,57 +178,64 @@ Samples: (even more [samples](https://github.com/NG-ZORRO/ng-zorro-antd/commits/
172178
```txt
173179
docs(changelog): update change log to beta.5
174180
```
181+
175182
```txt
176183
fix(release): need to depend on latest rxjs and zone.js
177184
178185
The version in our package.json gets copied to the one we publish, and users need the latest of these.
179186
```
180187
181188
### Revert
189+
182190
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>.`, where the hash is the SHA of the commit being reverted.
183191
184192
### Type
193+
185194
Must be one of the following:
186195
187-
* **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
188-
* **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
189-
* **docs**: Documentation only changes
190-
* **feat**: A new feature
191-
* **fix**: A bug fix
192-
* **perf**: A code change that improves performance
193-
* **refactor**: A code change that neither fixes a bug nor adds a feature
194-
* **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
195-
* **test**: Adding missing tests or correcting existing tests
196+
- **build**: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
197+
- **ci**: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
198+
- **docs**: Documentation only changes
199+
- **feat**: A new feature
200+
- **fix**: A bug fix
201+
- **perf**: A code change that improves performance
202+
- **refactor**: A code change that neither fixes a bug nor adds a feature
203+
- **style**: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
204+
- **test**: Adding missing tests or correcting existing tests
196205
197206
### Scope
198-
The scope should be the name of the module affected (folder name or other meaningful words), and should prefix with *module:* (as perceived by person reading changelog generated from commit messages.
207+
208+
The scope should be the name of the module affected (folder name or other meaningful words), and should prefix with _module:_ (as perceived by person reading changelog generated from commit messages.
199209
200210
The following are some examples:
201211
202-
* **module:alert**
203-
* **module:badge**
204-
* **module:breadcrumb**
205-
* **module:OTHER_COMPONENT_NAME**
212+
- **module:alert**
213+
- **module:badge**
214+
- **module:breadcrumb**
215+
- **module:OTHER_COMPONENT_NAME**
206216
207217
There are currently a few exceptions to the "use module name" rule:
208218
209-
* **packaging**: used for changes that change the npm package layout, e.g. public path changes, package.json changes, d.ts file/format changes, changes to bundles, etc.
210-
* **changelog**: used for updating the release notes in CHANGELOG.md
211-
* **showcase**: used for docs-app (ng.ant.design) related changes within the /showcase directory of the repo
212-
* none/empty string: useful for `style`, `test` and `refactor` changes that are done across all packages (e.g. `style: add missing semicolons`)
219+
- **packaging**: used for changes that change the npm package layout, e.g. public path changes, package.json changes, d.ts file/format changes, changes to bundles, etc.
220+
- **changelog**: used for updating the release notes in CHANGELOG.md
221+
- **showcase**: used for docs-app (ng.ant.design) related changes within the /showcase directory of the repo
222+
- none/empty string: useful for `style`, `test` and `refactor` changes that are done across all packages (e.g. `style: add missing semicolons`)
213223
214224
### Subject
225+
215226
The subject contains succinct description of the change:
216227
217-
* use the imperative, present tense: "change" not "changed" nor "changes"
218-
* don't capitalize first letter
219-
* no dot (.) at the end
228+
- use the imperative, present tense: "change" not "changed" nor "changes"
229+
- don't capitalize first letter
230+
- no dot (.) at the end
220231

221232
### Body
233+
222234
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
223235
The body should include the motivation for the change and contrast this with previous behavior.
224236

225237
### Footer
238+
226239
The footer should contain any information about **Breaking Changes** and is also the place to
227240
reference GitHub issues that this commit **Closes**.
228241

README-zh_CN.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ NG-ZORRO
4343
[![GitHub license](https://img.shields.io/github/license/mashape/apistatus.svg?style=flat-square)](https://github.com/NG-ZORRO/ng-zorro-antd/blob/master/LICENSE)
4444
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FNG-ZORRO%2Fng-zorro-antd.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FNG-ZORRO%2Fng-zorro-antd?ref=badge_shield)
4545

46-
4746
## 🖥 支持环境
4847

4948
- Angular `^20.0.0` [![npm package](https://img.shields.io/npm/v/ng-zorro-antd.svg?style=flat-square)](https://www.npmjs.org/package/ng-zorro-antd)
@@ -52,7 +51,7 @@ NG-ZORRO
5251
- [Electron](http://electron.atom.io/)
5352

5453
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Opera | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/electron/electron_48x48.png" alt="Electron" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Electron |
55-
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
54+
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
5655
| last 2 versions | last 2 versions | last 2 versions | last 2 versions | last 2 versions | last 2 versions |
5756

5857
## 🎨 设计规范
@@ -71,7 +70,6 @@ $ ng add ng-zorro-antd
7170

7271
> 如果你想了解更多CLI工具链的功能和命令,建议访问 [Angular CLI](https://github.com/angular/angular-cli) 了解更多
7372
74-
7573
## 🔨 使用
7674

7775
将想要使用的组件模块引入到你的组件中。
@@ -80,7 +78,7 @@ $ ng add ng-zorro-antd
8078
import { NzButtonModule } from 'ng-zorro-antd/button';
8179

8280
@Component({
83-
imports: [ NzButtonModule ]
81+
imports: [NzButtonModule]
8482
})
8583
export class AppComponent {}
8684
```
@@ -108,9 +106,9 @@ export class AppComponent {}
108106

109107
## 🔗 链接
110108

111-
* [ng-zorro-antd-mobile](https://github.com/NG-ZORRO/ng-zorro-antd-mobile)
112-
* [ng-alain](https://github.com/ng-alain/ng-alain)
113-
* [VSCode 的 snippet 扩展](https://marketplace.visualstudio.com/items?itemName=cipchk.ng-zorro-vscode)
109+
- [ng-zorro-antd-mobile](https://github.com/NG-ZORRO/ng-zorro-antd-mobile)
110+
- [ng-alain](https://github.com/ng-alain/ng-alain)
111+
- [VSCode 的 snippet 扩展](https://marketplace.visualstudio.com/items?itemName=cipchk.ng-zorro-vscode)
114112

115113
## ⌨️ 开发
116114

0 commit comments

Comments
 (0)