Skip to content

Commit 8dcdf8d

Browse files
sir-sigurdclaude
andcommitted
Freeze the linter via lockfile and ignore vendored trees
- Move the markdownlint-cli2 pin into package.json + package-lock.json and run `npm ci` in CI: a bare `npx <pkg>@<version>` still resolves deep transitive deps fresh on every run, while the lockfile freezes the whole tree and makes the pin visible to update tooling. - Add `ignores` for .terraform/ and node_modules/: markdownlint-cli2 has no default exclusions, and `terraform init` vendors registry modules whose READMEs would fail local runs. - Ignore node_modules in .gitignore. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent f2e97e0 commit 8dcdf8d

5 files changed

Lines changed: 1365 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- uses: actions/checkout@v6
26-
# Globs and rules come from .markdownlint-cli2.yaml. The version is pinned
27-
# so a new markdownlint release can't change rules and break CI without a
28-
# repo change; bump it deliberately.
29-
- run: npx --yes markdownlint-cli2@0.22.1
26+
# Globs and rules come from .markdownlint-cli2.yaml. npm ci installs the
27+
# exact tree from package-lock.json, so no markdownlint (or transitive)
28+
# release can change rules or break CI without a repo change; bump the
29+
# version deliberately via package.json.
30+
- run: npm ci
31+
- run: npx --no-install markdownlint-cli2
3032

3133
validate:
3234
runs-on: ubuntu-latest

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
.terraform
33
.terraform.lock.hcl
44
tfplan
5+
node_modules

.markdownlint-cli2.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,9 @@ config:
1818
# truth for which files are linted.
1919
globs:
2020
- "**/*.{md,markdown}"
21+
# markdownlint-cli2 has no default exclusions, so vendored trees must be
22+
# ignored explicitly: `terraform init` vendors registry modules (and their
23+
# READMEs) under .terraform/, and npm installs under node_modules/.
24+
ignores:
25+
- "**/.terraform/**"
26+
- "**/node_modules/**"

0 commit comments

Comments
 (0)