You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore: migrate to package.json-based linting package management
Move version definition of npm packages to
package.json & package-lock.json:
- doctoc
- markdown-link-check
- prettier
Update linting workflows.
Enable npm updating through Dependabot.
Add scripts and documentation to aid local linting.
-[Adding dependencies to the base images](#adding-dependencies-to-the-base-images)
20
+
21
+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
22
+
<!-- prettier-ignore-end -->
4
23
5
24
## Governance and decision making
6
25
@@ -24,6 +43,71 @@ You can use Node.js channels (prefixed by `#nodejs-`) in the [OpenJSF Slack](htt
24
43
25
44
-[#nodejs-release](https://openjs-foundation.slack.com/archives/C019MGJQ8RH) is linked to the [Node.js Release Working Group](https://github.com/nodejs/release#readme) responsible for the upstream releases of Node.js used by this repo.
-[Node.js](https://nodejs.org/en/download) LTS version as specified in [.node-version](./.node-version)
53
+
54
+
[fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo) and [clone](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) this repo, then install npm dependencies.
55
+
Replace `<my-github-username>` with the username of your fork in the instructions below:
Contributions are handled through GitHub pull requests. Branch from the default branch `main` and create a new branch, for example:
68
+
69
+
```shell
70
+
git checkout main
71
+
git checkout -b my-branch
72
+
```
73
+
74
+
Make changes in your branch and then submit your contribution as a [pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) (PR), targeting the branch `main`.
75
+
76
+
## Linting
77
+
78
+
After making changes, execute the following to check for correct formatting.
79
+
This runs the linting scripts `format:toc:check` and `format:prettier:check`.
80
+
81
+
```shell
82
+
npm run lint
83
+
```
84
+
85
+
To fix any linting issues that are automatically fixable, execute:
86
+
87
+
```shell
88
+
npm run lint:fix
89
+
```
90
+
91
+
Alternatively use any of the following commands to call one of the underlying linting utilities:
|`npm run format:toc`| Reformats any Table of Contents |
96
+
|`npm run format:toc:check`| Read-only Table of Contents check |
97
+
|`npm run format:prettier`| Reformats multiple types of source code |
98
+
|`npm run format:prettier:check`| Read-only prettier check |
99
+
100
+
## Link checks
101
+
102
+
Execute the following to check links in Markdown files:
103
+
104
+
```shell
105
+
npm run check:markdown-links
106
+
```
107
+
108
+
If you are running on Microsoft Windows, run the above command in a Git Bash terminal window.
109
+
[Git for Windows](https://gitforwindows.org/) includes Git Bash.
110
+
27
111
## Version Updates
28
112
29
113
New **Node.js** releases are released as soon as possible.
@@ -59,14 +143,12 @@ If you believe there is a need for a manual PR, and you are not a member of the
59
143
please first open an issue to describe the update problem
60
144
and your suggestion to resolve it.
61
145
62
-
To set up a version update PR, follow these instructions:
146
+
To set up a version update pull request, see the [Pull Requests](#pull-requests) section above and follow these instructions:
63
147
64
-
1.[Fork this project.](https://docs.github.com/en/get-started/quickstart/fork-a-repo)
65
-
1.[Clone the forked repository.](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository)
66
-
1. Create a branch for the update PR. For example, `git checkout main; git checkout -b version-update`.
148
+
1. Create a `version-update` branch
67
149
1. Run `./update.sh`. You can see additional options by using the built-in help documentation with `./update.sh -h`. This script will automatically update the appropriate files with the latest versions and checksums.
68
150
1. Commit the modified files to the `version-update` branch and push the branch to your fork.
69
-
1.[Create a PR to merge the branch from your fork into this project's default branch.](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork).
151
+
1. Create a pullrequest.
70
152
71
153
When a new Node.js release line is expected, additional preparation is necessary, including updates to the
72
154
[versions.json](./versions.json) file and creation of a major version directory, populated with generated files.
0 commit comments