Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: RangeError: Found invalid rule names: header-trim #236

Open
maninak opened this issue Jan 31, 2024 · 2 comments
Open

Error: RangeError: Found invalid rule names: header-trim #236

maninak opened this issue Jan 31, 2024 · 2 comments

Comments

@maninak
Copy link

maninak commented Jan 31, 2024

A CI job for my PR started suddenly failing with the error:

Run JulienKode/[email protected]
Error: RangeError: Found invalid rule names: header-trim. Supported rule names are: body-case, body-empty, body-full-stop, body-leading-blank, body-max-length, body-max-line-length, body-min-length, footer-empty, footer-leading-blank, footer-max-length, footer-max-line-length, footer-min-length, header-case, header-full-stop, header-max-length, header-min-length, references-empty, scope-case, scope-empty, scope-enum, scope-max-length, scope-min-length, signed-off-by, subject-case, subject-empty, subject-full-stop, subject-max-length, subject-min-length, subject-exclamation-mark, trailer-exists, type-case, type-empty, type-enum, type-max-length, type-min-length
Error: Found invalid rule names: header-trim. Supported rule names are: body-case, body-empty, body-full-stop, body-leading-blank, body-max-length, body-max-line-length, body-min-length, footer-empty, footer-leading-blank, footer-max-length, footer-max-line-length, footer-min-length, header-case, header-full-stop, header-max-length, header-min-length, references-empty, scope-case, scope-empty, scope-enum, scope-max-length, scope-min-length, signed-off-by, subject-case, subject-empty, subject-full-stop, subject-max-length, subject-min-length, subject-exclamation-mark, trailer-exists, type-case, type-empty, type-enum, type-max-length, type-min-length

I hadn't changed my PR's title before and it's been passing for weeks. Then it started failing for no apparent reason. (I at first tried to shorten my PR title thinking that that was the issue but after reading the error better I realized there's more to it...)

here's my pr-linting.yaml

name: PR linting
on:
  pull_request:
    types: ['opened', 'edited', 'reopened', 'synchronize']

jobs:
  lint-pr-title:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Install Dependencies
      run: npm install @commitlint/config-conventional
    - uses: JulienKode/[email protected]

and my PR title is

feat(patch-detail): implement new view with in-depth patch info
maninak added a commit to cytechmobile/radicle-vscode-extension that referenced this issue Jan 31, 2024
@maninak
Copy link
Author

maninak commented Jan 31, 2024

The following workaround fixed it for me:

name: PR linting
on:
  pull_request:
    types: ['opened', 'edited', 'reopened', 'synchronize']

jobs:
  lint-pr-title:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v3
    - name: Install Dependencies
-      run: npm install @commitlint/config-conventional
+      run: npm install @commitlint/config-conventional@v17
    - uses: JulienKode/[email protected]

maninak added a commit to cytechmobile/radicle-vscode-extension that referenced this issue Jan 31, 2024
@iustin-nita
Copy link

A new rule was introduced in v18.6
https://github.com/conventional-changelog/commitlint/blob/master/CHANGELOG.md#1860-2024-01-25

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

No branches or pull requests

2 participants