Skip to content

ci: move commitlint config to .mjs β€” the lint gate has been asserting nothing - #60

Open
CSOAI-ORG wants to merge 1 commit into
mainfrom
fix/commitlint-mjs-config
Open

ci: move commitlint config to .mjs β€” the lint gate has been asserting nothing#60
CSOAI-ORG wants to merge 1 commit into
mainfrom
fix/commitlint-mjs-config

Conversation

@CSOAI-ORG

Copy link
Copy Markdown
Owner

The failure

The Conventional commits / lint job fails on every pull request. Latest example: run 33709989136.

##[error]You have commit messages with errors

error running commitlint
.js extension is not allowed for the `configFile`, please use .mjs instead
Error: .js extension is not allowed for the `configFile`, please use .mjs instead
    at showLintResults (file:///run.mjs:155:11)

Why this matters more than a red tick

The error message says "You have commit messages with errors" β€” but commitlint never linted anything. wagoid/commitlint-github-action@v6 (6.2.1) refuses to load a .js config file, bails out, and the action reports it as a commit-message failure.

So the gate has been red for a reason unrelated to commit messages, and green for nobody β€” it has not actually validated a single commit message since the action started rejecting .js. A permanently-red check that asserts nothing is worse than no check: it trains everyone to ignore it.

The change

  • .github/commitlint.config.js -> .github/commitlint.config.mjs
  • module.exports = {...} -> export default {...}
  • workflow configFile: updated to the new path

The rule set is unchanged β€” still @commitlint/config-conventional. This is not a relaxation; it makes an existing gate actually execute. Expect it to start failing PRs with genuinely non-conventional commit messages, which is the point.

Separate, not fixed here

dependency-review also fails on every PR:

##[error]Dependency review is not supported on this repository.
Please ensure that Dependency graph is enabled

That is a repository setting, not code β€” Dependency graph is off. It cannot be fixed by a PR. (Org-wide: Dependabot alerts are disabled on 285 of 297 non-archived repos, so this is not an isolated case.)

πŸ€– Generated with Claude Code

wagoid/commitlint-github-action v6.2.1 refuses a .js configFile:

  error running commitlint
  .js extension is not allowed for the configFile, please use .mjs instead
  ##[error]You have commit messages with errors

So the Conventional commits job has been failing on every pull request
regardless of what the commit messages actually say. It reports a commit
message error that is really a config-loader error, which means the gate has
been asserting nothing while looking red.

Renames .github/commitlint.config.js to .mjs, converts module.exports to an
ESM default export, and points the workflow at the new path. The rule set is
unchanged: @commitlint/config-conventional.

Signed-off-by: CSOAI-ORG <nicholas@csoai.org>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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