4
4
<summary >Table of Contents</summary >
5
5
6
6
- [ Test] ( #test )
7
+ - [ Fork] ( #fork )
7
8
- [ Lint] ( #lint )
8
9
- [ Release] ( #release )
9
10
12
13
All pull requests are welcome! By participating in this project, you
13
14
agree to abide by our ** [ code of conduct] ** .
14
15
15
- [ code of conduct ] : https://github.com/remarkablemark/html-react-parser/blob/master/.github/CODE_OF_CONDUCT.md
16
+ [ code of conduct ] : https://github.com/remarkablemark/.github/blob/master/CODE_OF_CONDUCT.md
17
+
18
+ ## Fork
16
19
17
20
[ Fork] , then clone the repository:
18
21
19
22
[ fork ] : https://github.com/remarkablemark/html-react-parser/fork
20
23
21
24
``` sh
22
- # replace `<user>` with your username
23
- git clone git@github.com:< user> /html-react-parser.git && cd html-react-parser
25
+ # replace <USER> with your username
26
+ git clone git@github.com:< USER> /html-react-parser.git
27
+ cd html-react-parser
24
28
```
25
29
26
- Install package dependencies:
30
+ Install the package dependencies:
27
31
28
32
``` sh
29
33
npm install
30
34
```
31
35
32
- Make your change . Add tests and/or documentation. Ensure all tests and lint pass:
36
+ Make your changes . Add tests and/or documentation. Ensure all tests and lint pass:
33
37
34
38
``` sh
35
39
npm test
36
40
npm run lint
37
41
npm run lint:dts
38
42
```
39
43
40
- Write a commit message that follows the [ Conventional Commits] [ commit ] specification.
44
+ Write a commit message that follows the [ Conventional Commits] [ commit ] specification:
45
+
46
+ - ** feat** : A new feature
47
+ - ** fix** : A bug fix
48
+ - ** perf** : A code change that improves performance
49
+ - ** refactor** : A code change that neither fixes a bug nor adds a feature
50
+ - ** test** : Adding missing tests or correcting existing tests
51
+ - ** docs** : Documentation only changes
41
52
42
53
The commit message will be linted during the pre-commit Git hook.
43
54
To manually lint the most recent commit message:
@@ -46,13 +57,12 @@ To manually lint the most recent commit message:
46
57
git log -1 --pretty=format:" %s" | npx commitlint
47
58
```
48
59
49
- Push to your fork and [ submit a pull request] [ pr ] .
60
+ Push to your fork and [ create a pull request] [ pr ] .
50
61
51
62
[ pr ] : https://github.com/remarkablemark/html-react-parser/compare/
52
63
53
- At this point you're waiting on us. We like to comment on pull requests
54
- within three business days (and, typically, one business day). We may suggest
55
- changes, improvements, or alternatives.
64
+ At this point you're waiting on us. We'll try to review pull requests within
65
+ 1-3 business days. We may suggest changes, improvements, and/or alternatives.
56
66
57
67
Things that will improve the chance that your pull request will be accepted:
58
68
@@ -61,7 +71,7 @@ Things that will improve the chance that your pull request will be accepted:
61
71
- [ ] Write a [ good commit message] [ commit ] .
62
72
63
73
[ ci ] : https://github.com/remarkablemark/html-react-parser/actions/workflows/build.yml
64
- [ commit ] : https://www.conventionalcommits.org/
74
+ [ commit ] : https://github.com/angular/angular/blob/main/CONTRIBUTING.md#commit
65
75
66
76
## Test
67
77
@@ -71,15 +81,21 @@ Run tests with coverage:
71
81
npm test
72
82
```
73
83
74
- View coverage report in your browser:
84
+ Run tests in watch mode:
85
+
86
+ ``` sh
87
+ npm run test:watch
88
+ ```
89
+
90
+ View the coverage report in your browser:
75
91
76
92
``` sh
77
93
open coverage/lcov-report/index.html
78
94
```
79
95
80
96
## Lint
81
97
82
- Lint codebase :
98
+ Run ESLint :
83
99
84
100
``` sh
85
101
npm run lint
@@ -91,7 +107,7 @@ Fix lint errors:
91
107
npm run lint:fix
92
108
```
93
109
94
- Test TypeScript declaration files for style and correctness :
110
+ Type check TypeScript declaration files:
95
111
96
112
``` sh
97
113
npm run lint:dts
0 commit comments