Skip to content

Commit a480150

Browse files
authored
✨ lint markdown and add CI (#382)
1 parent 87956b1 commit a480150

17 files changed

+292
-81
lines changed

.github/workflows/lintyMcLintface.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: 'Lint Markdown'
2+
3+
on: [pull_request, push]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
lint:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
- run: npm i
15+
- run: npm test

.gitignore

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
lerna-debug.log*
8+
.pnpm-debug.log*
9+
10+
# Diagnostic reports (https://nodejs.org/api/report.html)
11+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
12+
13+
# Runtime data
14+
pids
15+
*.pid
16+
*.seed
17+
*.pid.lock
18+
19+
# Directory for instrumented libs generated by jscoverage/JSCover
20+
lib-cov
21+
22+
# Coverage directory used by tools like istanbul
23+
coverage
24+
*.lcov
25+
26+
# nyc test coverage
27+
.nyc_output
28+
29+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30+
.grunt
31+
32+
# Bower dependency directory (https://bower.io/)
33+
bower_components
34+
35+
# node-waf configuration
36+
.lock-wscript
37+
38+
# Compiled binary addons (https://nodejs.org/api/addons.html)
39+
build/Release
40+
41+
# Dependency directories
42+
node_modules/
43+
jspm_packages/
44+
45+
# Snowpack dependency directory (https://snowpack.dev/)
46+
web_modules/
47+
48+
# TypeScript cache
49+
*.tsbuildinfo
50+
51+
# Optional npm cache directory
52+
.npm
53+
54+
# Optional eslint cache
55+
.eslintcache
56+
57+
# Optional stylelint cache
58+
.stylelintcache
59+
60+
# Microbundle cache
61+
.rpt2_cache/
62+
.rts2_cache_cjs/
63+
.rts2_cache_es/
64+
.rts2_cache_umd/
65+
66+
# Optional REPL history
67+
.node_repl_history
68+
69+
# Output of 'npm pack'
70+
*.tgz
71+
72+
# Yarn Integrity file
73+
.yarn-integrity
74+
75+
# dotenv environment variable files
76+
.env
77+
.env.development.local
78+
.env.test.local
79+
.env.production.local
80+
.env.local
81+
82+
# parcel-bundler cache (https://parceljs.org/)
83+
.cache
84+
.parcel-cache
85+
86+
# Next.js build output
87+
.next
88+
out
89+
90+
# Nuxt.js build / generate output
91+
.nuxt
92+
dist
93+
94+
# Gatsby files
95+
.cache/
96+
# Comment in the public line in if your project uses Gatsby and not Next.js
97+
# https://nextjs.org/blog/next-9-1#public-directory-support
98+
# public
99+
100+
# vuepress build output
101+
.vuepress/dist
102+
103+
# vuepress v2.x temp and cache directory
104+
.temp
105+
.cache
106+
107+
# vitepress build output
108+
**/.vitepress/dist
109+
110+
# vitepress cache directory
111+
**/.vitepress/cache
112+
113+
# Docusaurus cache and generated files
114+
.docusaurus
115+
116+
# Serverless directories
117+
.serverless/
118+
119+
# FuseBox cache
120+
.fusebox/
121+
122+
# DynamoDB Local files
123+
.dynamodb/
124+
125+
# TernJS port file
126+
.tern-port
127+
128+
# Stores VSCode versions used for testing VSCode extensions
129+
.vscode-test
130+
131+
# yarn v2
132+
.yarn/cache
133+
.yarn/unplugged
134+
.yarn/build-state.yml
135+
.yarn/install-state.gz
136+
.pnp.*

.markdownlint-cli2.jsonc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"globs": [
3+
"**/*.md"
4+
],
5+
"ignores": [
6+
".github/**",
7+
"node_modules/**"
8+
]
9+
}

.markdownlint.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# for reference, see https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml
2+
3+
# Default state for all rules
4+
default: true
5+
6+
# MD013/line-length - Line length
7+
MD013: false
8+
9+
# MD033/no-inline-html - Inline HTML
10+
MD033:
11+
allowed_elements: ['kbd', 'sup']

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

docs/CHARTER.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Express is made of many modules spread between three GitHub Orgs:
3030

3131
Section Intentionally Left Blank
3232

33-
## Section 2: Relationship with OpenJS Foundation CPC.
33+
## Section 2: Relationship with OpenJS Foundation CPC
3434

3535
Technical leadership for the projects within the OpenJS Foundation is
3636
delegated to the projects through their project charters by the OpenJS
@@ -89,4 +89,4 @@ Section Intentionally Left Blank
8989

9090
## Section 5: Definitions
9191

92-
Section Intentionally Left Blank
92+
Section Intentionally Left Blank

docs/GOVERNANCE.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,16 +135,17 @@ project for at least 6 months as a committer prior to the request. They should h
135135
helped with code contributions as well as triaging issues. They are also required to
136136
have 2FA enabled on both their GitHub and npm accounts.
137137

138-
Any TC member or an existing captain on the **same** repo can nominate another committer
139-
to the captain role. To do so, they should submit a PR to this document, updating the
140-
**Active Project Captains** section (while maintaining the sort order) with the project
138+
Any TC member or an existing captain on the **same** repo can nominate another committer
139+
to the captain role. To do so, they should submit a PR to this document, updating the
140+
**Active Project Captains** section (while maintaining the sort order) with the project
141141
name, the nominee's GitHub handle, and their npm username (if different).
142-
- Repos can have as many captains as make sense for the scope of work.
143-
- A TC member or an existing repo captain **on the same project** can nominate a new captain.
142+
143+
* Repos can have as many captains as make sense for the scope of work.
144+
* A TC member or an existing repo captain **on the same project** can nominate a new captain.
144145
Repo captains from other projects should not nominate captains for a different project.
145146

146-
The PR will require at least 2 approvals from TC members and 2 weeks hold time to allow
147-
for comment and/or dissent. When the PR is merged, a TC member will add them to the
147+
The PR will require at least 2 approvals from TC members and 2 weeks hold time to allow
148+
for comment and/or dissent. When the PR is merged, a TC member will add them to the
148149
proper GitHub/npm groups.
149150

150151
### Active Projects and Captains
@@ -181,4 +182,4 @@ By making a contribution to this project, I certify that:
181182
personal information I submit with it, including my sign-off) is
182183
maintained indefinitely and may be redistributed consistent with
183184
this project or the open source license(s) involved.
184-
```
185+
```

docs/LTS-strategy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,4 @@
3939

4040
### Release calendar
4141

42-
* There is a regular cadence of semver major releases (details TBD). However, if no breaking changes were introduced between the last semver major and the scheduled date of the release of the new one, the new semver major release is skipped.
42+
* There is a regular cadence of semver major releases (details TBD). However, if no breaking changes were introduced between the last semver major and the scheduled date of the release of the new one, the new semver major release is skipped.

docs/adr/290-using-caret-with-dependencies.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ Accepted
1313
- Express TC (@expressjs/express-tc)
1414

1515
## Context
16+
1617
Historically, the Express project has avoided using the caret (`^`) in the `package.json` files for its own dependencies. This proposal aims to review whether this practice should continue or if adjustments are needed.
1718

1819
**Why do we need this decision?**
@@ -22,36 +23,44 @@ Clarifying the policy on using caret (`^`) helps to ensure consistency across th
2223
This decision aims to reduce the maintenance burden of frequently updating pinned dependencies.
2324

2425
**Are there any existing issues/discussions/pull requests related to this?**
26+
2527
- [Discussion: Using caret (^) with our own dependencies #279](https://github.com/expressjs/discussions/issues/279)
2628
- [expressjs/express#6017 (comment)](https://github.com/expressjs/express/issues/6017)
2729

2830
## Decision
31+
2932
We will adopt a policy where the caret (`^`) symbol is used for dependencies all dependencies.
3033

3134
**What will be done?**
35+
3236
- Update the `package.json` files to use `^` for all dependencies (both prod and dev).
3337

3438
**Note on `^` vs. `~`:**
39+
3540
- `^` allows updates to the most recent minor or patch version, offering greater flexibility and reducing the need for frequent manual updates. For example, `^1.2.3` will accept updates to `1.3.0`, `1.4.0`, but not `2.0.0`.
3641
- `~` is more conservative, only allowing updates to patch versions. For example, `~1.2.3` will accept updates to `1.2.4`, `1.2.5`, but not `1.3.0`. Some Node.js legacy versions only support this, like Node@0.8.
3742

3843
**What will not be done?**
44+
3945
- We won't force to use `^` or `~` for any dependency if there is a reason to use a pinned version and it is properly documented.
4046

4147
## Rationale
4248

4349
**Alternatives Considered:**
50+
4451
- **Alternative:** Continue pinning all dependencies, including internal ones, to specific versions.
4552
- **Reason for rejection:** This approach requires frequent updates and increases the maintenance burden, as each minor or patch update requires a new release.
4653

4754
**Pros and Cons**:
4855

4956
**Pros**:
57+
5058
- Reduces the number of PRs for updating our own dependencies.
5159
- Allows for quicker adoption of minor and patch updates within the Express ecosystem.
5260
- Users are still protected by lockfiles, mitigating the risk of regressions.
5361

5462
**Cons**:
63+
5564
- There is still a risk of minor regressions from updates, even within internally managed dependencies.
5665
- Requires discipline in maintaining lockfiles to ensure stability for end users.
5766

@@ -61,14 +70,17 @@ This decision strikes a balance between reducing maintenance effort and managing
6170
## Consequences
6271

6372
**Positive Impact**:
73+
6474
- Fewer manual updates required for internally managed dependencies.
6575
- Users benefit from improvements and fixes in internal packages more quickly.
6676

6777
**Negative Impact**:
78+
6879
- Potential risk of regressions if an internal dependency introduces a breaking change in a minor update.
6980
- Users relying on strict version control may need to adjust their expectations when using our own dependencies.
7081

7182
**Mitigations**:
83+
7284
- Strong test coverage and CI checks will help catch potential issues early.
7385
- Clear communication in documentation and release notes to inform users of the updated dependency policy.
7486
- Ensure that we are following strict semver when releasing our own libraries.
@@ -79,7 +91,9 @@ This decision strikes a balance between reducing maintenance effort and managing
7991
- **Phase 2**: Review and adjust documentation to include the new policy on dependency versioning.
8092

8193
## References
94+
8295
- [NPM semver documentation](https://docs.npmjs.com/cli/v6/using-npm/semver)
8396

8497
## Changelog
98+
8599
- **[2024-10-22]**: @UlisesGascon - Initial draft of ADR for using caret (`^`) or tilde (`~`) with our own dependencies.

docs/adr/306-performance-wg.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Express has traditionally taken a very lax approach to performance. Historically
1818
and lack of visibility around how changes impact performance. The goal of this working
1919
group is to centralize discussion so the whole ecosystem of packages can benefit from targeted performance work. The
2020
scope of this WG would be all active packages in the `expressjs`, `pillarjs` and `jshttp` orgs with an initial focus on
21-
the ones which are direct dependencies of `express` itself.
21+
the ones which are direct dependencies of `express` itself.
2222

2323
**Why do we need a working group?**
2424

@@ -52,24 +52,24 @@ We will need to take a few actions to get this started:
5252

5353
### Relation to STF
5454

55-
Lastly, this kicko-off work is being funded by the STF program. It is a part of our larger work around security
55+
Lastly, this kick-off work is being funded by the STF program. It is a part of our larger work around security
5656
improvements for the project. There are two parts of that program which fall under this WG's purview:
5757

5858
1. Milestone 6: Monitor performance across Express and direct dependencies
59-
- Owner: @wesleytodd
60-
- Delivery Date: Dec 31, 2025
61-
- Estimated Budget: €25,200
62-
2. Milestone 9: Improve performance for Express and critical dependencies
63-
- Owner: @wesleytodd & @blakeembrey
64-
- Delivery Date: Jun 30, 2026
65-
- Estimated Budget: €46,200
59+
- Owner: @wesleytodd
60+
- Delivery Date: Dec 31, 2025
61+
- Estimated Budget: €25,200
62+
1. Milestone 9: Improve performance for Express and critical dependencies
63+
- Owner: @wesleytodd & @blakeembrey
64+
- Delivery Date: Jun 30, 2026
65+
- Estimated Budget: €46,200
6666

6767
This funding does not mean the work can only be done by the owners, it just means that we are responsible for organizing
6868
and executing on the deliverables. This is our first attempt at doing a program like this, so feedback is welcome.
6969

7070
## References
7171

72-
- https://github.com/expressjs/express/pull/6129
73-
- https://github.com/expressjs/express/issues/5998
72+
- <https://github.com/expressjs/express/pull/6129>
73+
- <https://github.com/expressjs/express/issues/5998>
7474
- open-telemetry/opentelemetry-js-contrib#2437
7575
- openjs-foundation/infrastructure#5

0 commit comments

Comments
 (0)