Skip to content

chore: add markdownlint peer dependency and drop unknown rule - #1120

Merged
viceice merged 1 commit into
mainfrom
viceice/markdownlint-peer
Dec 1, 2026
Merged

viceice merged 1 commit into
mainfrom
viceice/markdownlint-peer

Conversation

@viceice

@viceice viceice commented Dec 1, 2026

Copy link
Copy Markdown
Member

Changes

  • Add markdownlint as a peer dependency, like containerbase/base, so editor integrations such as the VS Code extension resolve the markdownlint/style/prettier extends.
  • Remove no-emphasis-as-header from .markdownlint-cli2.jsonc: markdownlint doesn't know that name, MD036 is already disabled as no-emphasis-as-heading (chore: drop the unknown no-emphasis-as-header markdownlint rule base#8536).

Context

Please select one of the following:

  • This closes an existing Issue, Closes: #
  • This doesn't close an Issue, but I accept the risk that this PR may be closed if maintainers disagree with its opening or implementation

AI assistance disclosure

Did you use AI tools to create any part of this pull request?

Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI-generated non‑trivial portions of code, tests, or documentation).
  • Yes — other (please describe):

Use of AI in replying to PR comments

Who answers review comments:

  • @viceice will read and reply directly. Name the account.
  • An agent will draft replies and @username will read them before they are posted. Name the account.
  • An agent will draft replies and reply autonomously. This is heavily discouraged, and we prefer that there are humans in the loop
  • Nobody has explicitly committed to replying.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified tests

Drafted by Claude Code (Claude Opus 5.5, low effort) on behalf of @viceice.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <michael.kriese+claude-code@mend.io>
@qodo-code-review

qodo-code-review Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

PR Summary by Qodo

chore: add markdownlint peer dependency and drop unknown rule

⚙️ Configuration changes 🕐 Less than 5 minutes

Grey Divider

AI Description

• Declares markdownlint as a peer dependency so editor extensions resolve the
 markdownlint/style/prettier extends.
• Removes the unknown no-emphasis-as-header rule from .markdownlint-cli2.jsonc; MD036 is already
 disabled under its real name.
Merge Risk 🟢 Low

Blast radius 🟢 Low 💥 0 capabilities

  • No production behavior changes identified.
Behavioral complexity 🟢 Low 🧩 Assessed behavior

  • No production behavior changes identified.
Potential damage 🟢 Low 🩹 Assessed behavior

  • No production behavior changes identified.
Assessed commit c13b094
Diagram

graph TD
  A["package.json"] --> B["markdownlint peer dep"] --> C["Editor extends resolution"]
  D[".markdownlint-cli2.jsonc"] --> E["Drop no-emphasis-as-header"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Pin markdownlint as a devDependency
  • ➕ Reproducible version shared by CLI and editor via the lockfile
  • ➕ Avoids an unbounded "*" range
  • ➖ Does not declare the package as a consumer requirement the way a peer dependency does
  • ➖ Diverges from the containerbase/base precedent cited in the PR

Recommendation: The peer dependency approach works, and it matches the containerbase/base precedent. The version range "*" is loose, though. A devDependency pinned to a specific markdownlint version would make the editor and CLI resolve the same build reproducibly. Keeping the peer entry is still reasonable if the goal is only to let tooling find the package. The rule removal is a clear fix with no alternative worth considering.

Files changed (3) +7 / -1

Other (3) +7 / -1
package.jsonAdd markdownlint as a peer dependency +3/-0

Add markdownlint as a peer dependency

• Adds a peerDependencies block with markdownlint set to "*". This lets editor integrations resolve the markdownlint/style/prettier extends, following the same pattern as containerbase/base.

package.json

.markdownlint-cli2.jsoncRemove unknown no-emphasis-as-header rule +0/-1

Remove unknown no-emphasis-as-header rule

• Deletes the no-emphasis-as-header entry. markdownlint does not recognise this name, and MD036 is already disabled as no-emphasis-as-heading, so behaviour is unchanged.

.markdownlint-cli2.jsonc

pnpm-lock.yamlRecord markdownlint peer dependency in lockfile +4/-0

Record markdownlint peer dependency in lockfile

• Adds 4 lines at lines 187-190 for the new markdownlint peer dependency. The lockfile change is generated by pnpm and has no hand-written logic.

pnpm-lock.yaml

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (1)

Grey Divider


Remediation recommended

1. Private repo gains a runtime markdownlint dependency 🐞 Bug
Description
The new peerDependencies entry "markdownlint": "*" in the private root package.json makes pnpm
auto-install markdownlint, and the lockfile records it under the root importer's dependencies (not
devDependencies) with an unbounded '*' specifier. Since this package is private and has no
consumers, a peer declaration has no meaning here; the only effect is a production-scoped, unbounded
dependency that a future pnpm install with --prod or a changed lockfile will resolve differently.
Code

package.json[R22-24]

+  "peerDependencies": {
+    "markdownlint": "*"
+  },
Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The root `package.json` of this private repository declares `markdownlint` as `peerDependencies` with range `*`. The lockfile therefore records it as an unbounded production dependency of the root importer. The package is only needed so editors resolve `markdownlint/style/prettier` from the workspace.

## Fix Focus Areas
- package.json[22-24]
- pnpm-lock.yaml[187-190]

## Recommended Fix
Remove the `peerDependencies` block from `package.json` and add `"markdownlint": "<version>"` (pinned to the version resolved in the lockfile, e.g. 0.42.2, or a caret range) under `devDependencies`. Then regenerate `pnpm-lock.yaml` with pnpm so the entry moves under the root importer's `devDependencies` with a matching specifier. Verify with `pnpm install --frozen-lockfile` and `pnpm lint:markdown`.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools

Dismiss ↗ | View ↗


Grey Divider

Tip of the day
💡 Did you know, you can pick a display mode instead of tweaking every Display option by hand

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@viceice
viceice enabled auto-merge December 1, 2026 11:45
@viceice
viceice added this pull request to the merge queue Dec 1, 2026
Merged via the queue into main with commit 80ce473 Dec 1, 2026
7 checks passed
@viceice
viceice deleted the viceice/markdownlint-peer branch December 1, 2026 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant