Skip to content

docs: replace node-markdown-spellcheck with cspell#2015

Merged
cert-manager-prow[bot] merged 5 commits intocert-manager:masterfrom
IstvanCsVarga:replace-mdspell-with-cspell
Mar 26, 2026
Merged

docs: replace node-markdown-spellcheck with cspell#2015
cert-manager-prow[bot] merged 5 commits intocert-manager:masterfrom
IstvanCsVarga:replace-mdspell-with-cspell

Conversation

@IstvanCsVarga
Copy link
Contributor

@IstvanCsVarga IstvanCsVarga commented Mar 14, 2026

Summary

Replaces the unmaintained node-markdown-spellcheck (mdspell) with cspell, an actively maintained spell checker. The old tool has not been updated in 6+ years and is generating security alerts (#1985).

  • Swap markdown-spellcheck for cspell (v8.19.3) in devDependencies
  • Add cspell.json configuration (US English, ignores versioned/historical docs and auto-generated API references)
  • Extend .spelling dictionary for cspell compatibility
  • Fix 14 genuine typos in current docs caught by cspell
  • Add lodash as a direct dependency (previously only available as a transitive dependency of markdown-spellcheck, used by lib/serialize.js)

Notes

  • Historical versioned docs (content/v*-docs/**) are excluded from spellcheck per maintainer guidance
  • The existing .spelling allowlist is reused as a cspell custom dictionary
  • All checks pass locally (check:spelling, check:eslint, check:links, check:markdown)
  • Full site build verified locally with Node 20

Closes #1985

@cert-manager-prow cert-manager-prow bot added dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Mar 14, 2026
@netlify
Copy link

netlify bot commented Mar 14, 2026

Deploy Preview for cert-manager ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit e69388b
🔍 Latest deploy log https://app.netlify.com/projects/cert-manager/deploys/69c3f3f0ab9cc30008a66e8a
😎 Deploy Preview https://deploy-preview-2015--cert-manager.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@IstvanCsVarga
Copy link
Contributor Author

Friendly ping — would appreciate a review when anyone has a chance. Happy to address any feedback. Thanks!

@IstvanCsVarga
Copy link
Contributor Author

@hawksight, friendly ping. Could I please get a review on this PR? Thank you!

@hawksight
Copy link
Member

hawksight commented Mar 24, 2026

Hey @IstvanCsVarga thanks for taking the time upgrade this component. Front end isn't my forte, so let me verify I can run this locally with the same results as well just for some added confidence. I'll do my best to review it this week.

Copy link
Member

@hawksight hawksight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also update the readme to reflect the change please?

I ran make check locally and everything seemed to work well.
There was one other release-note change in content/docs/releases/release-notes/release-notes-1.0.md, it seemed fine to change, but also in line with excluding of docs versions, perhaps the release note should be excluded too?

@IstvanCsVarga
Copy link
Contributor Author

Hey @IstvanCsVarga thanks for taking the time upgrade this component. Front end isn't my forte, so let me verify I can run this locally with the same results as well just for some added confidence. I'll do my best to review it this week.

Updated the README to reference cspell.

@cert-manager-prow cert-manager-prow bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 24, 2026
@IstvanCsVarga IstvanCsVarga force-pushed the replace-mdspell-with-cspell branch from 61f8c8c to 36abba5 Compare March 24, 2026 17:44
@cert-manager-prow cert-manager-prow bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 24, 2026
Copy link
Member

@hawksight hawksight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

Thanks you for making those changes. I think this looks good.
I would like to get another maintainer just to check the change too. I'll see if I can find one with 10 minutes who isn't at kubecon!

@cert-manager-prow cert-manager-prow bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Mar 25, 2026
@SgtCoDFish SgtCoDFish requested a review from Copilot March 25, 2026 14:16
@SgtCoDFish
Copy link
Member

It looks like (unfortunately) a new page was added after this was raised, and the new spell checker correctly flags several issues on it: https://github.com/cert-manager/website/actions/runs/23504004282/job/68544921205?pr=2015#step:5:33

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR replaces the unmaintained markdown-spellcheck/mdspell workflow with cspell, adds repository spellchecking configuration, updates the project dictionary for cspell, fixes several documentation typos, and promotes lodash to a direct dependency (used by site code).

Changes:

  • Replace mdspell with cspell for check:spelling and add cspell.json configuration.
  • Extend .spelling to serve as a cspell custom dictionary and apply typo fixes across docs.
  • Add lodash as a direct dependency (used in lib/serialize.js).

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
package.json Switch check:spelling to cspell, add cspell, add lodash, remove markdown-spellcheck.
package-lock.json Lockfile updates for cspell and dependency graph changes; lodash becomes non-dev.
cspell.json New cspell configuration: locale, ignore paths, regex ignores, dictionary definition.
.spelling Expanded allowlist to be used as a cspell dictionary.
README.md Update contributor docs to reference cspell instead of mdspell.
content/docs/usage/certificaterequest.md Fix typo (“namespaced”).
content/docs/usage/certificate.md Fix typo (“overwritten”).
content/docs/tutorials/zerossl/zerossl.md Fix typo (“credentials”).
content/docs/tutorials/acme/dns-validation.md Fix typo (“tutorials”).
content/docs/releases/release-notes/release-notes-1.4.md Fix typo (“conversion”).
content/docs/releases/release-notes/release-notes-1.0.md Fix typo (“clouddns-account”).
content/docs/faq/README.md Fix typo (“CertificateRequest”).
content/docs/devops-tips/backup.md Fix typo (“cert-manager”).
content/docs/contributing/e2e.md Fix typo (“contributing”).
content/docs/contributing/crds.md Fix typo (“definitions”).
content/docs/configuration/venafi.md Fix typo (“Environment”).
content/docs/configuration/acme/dns01/azuredns.md Fix typo (“identities”).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cert-manager-prow cert-manager-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Mar 25, 2026
Replace the unmaintained markdown-spellcheck (mdspell) package with
cspell, an actively maintained spell checker. The old tool has not been
updated in over 6 years and is generating security alerts.

Changes:
- Swap markdown-spellcheck for cspell in devDependencies
- Add cspell.json configuration with US English locale
- Ignore historical versioned docs (content/v*-docs/**)
- Ignore auto-generated API reference docs
- Extend .spelling dictionary for cspell compatibility
- Fix 14 genuine typos in current docs caught by cspell

Closes cert-manager#1985

Signed-off-by: Istvan Csaba Varga <istvan.csaba.varga@accenture.com>
lodash/cloneDeep is used in lib/serialize.js but was previously only
available as a transitive dependency of markdown-spellcheck. Adding it
as a direct dependency so the build succeeds after the spellcheck tool
swap.

Signed-off-by: Istvan Csaba Varga <istvan.csaba.varga@accenture.com>
Signed-off-by: Istvan Csaba Varga <istvan.csaba.varga@accenture.com>
The release note documents a deprecation of the misspelled
util.UsageContentCommittment in favor of util.UsageContentCommitment.
The misspelling must be preserved as it refers to the actual config
option name. Add Committment to the spelling allowlist instead.

Signed-off-by: Istvan Csaba Varga <istvan.csaba.varga@accenture.com>
Add --no-must-find-files to cspell command so html globs do not cause
failures when no html files are present. Add dictionary words for the
newly added contribfest-kubecon-eu-2026 pages.

Signed-off-by: Istvan Csaba Varga <istvan.csaba.varga@accenture.com>
@IstvanCsVarga IstvanCsVarga force-pushed the replace-mdspell-with-cspell branch from 267b23a to e69388b Compare March 25, 2026 14:40
@IstvanCsVarga
Copy link
Contributor Author

Rebased on latest master and addressed both comments:

  • Added --no-must-find-files flag so html globs don't cause failures when no html files are present
  • Added dictionary words for the new contribfest-kubecon-eu-2026 pages (nolint, errname, bodyclose, keyrings, githubcli, dpkg, acmechallenges, requestgen, yourname)

All checks and full build pass locally with Node 20.

Copy link
Member

@hawksight hawksight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@SgtCoDFish looks like @IstvanCsVarga has resolved all those already. Nice work Istvan!

@cert-manager-prow cert-manager-prow bot added the lgtm Indicates that a PR is ready to be merged. label Mar 26, 2026
@cert-manager-prow
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hawksight

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@cert-manager-prow cert-manager-prow bot merged commit c5db397 into cert-manager:master Mar 26, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates that all commits in the pull request have the valid DCO sign-off message. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace github.com/lukeapage/node-markdown-spellcheck

4 participants