From 1b0a92e865f1b720088e597640f6557444953053 Mon Sep 17 00:00:00 2001 From: David Bernard Date: Thu, 8 Aug 2024 20:46:24 +0200 Subject: [PATCH] chore: update configuration of commitlint Signed-off-by: David Bernard --- .github/workflows/linter.yml | 24 +++++++++---------- commitlint.config.js => commitlint.config.mjs | 8 +++---- 2 files changed, 15 insertions(+), 17 deletions(-) rename commitlint.config.js => commitlint.config.mjs (83%) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index cb636ef..a05e923 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -7,9 +7,9 @@ permissions: on: push: - branches: [ "main" ] + branches: ["main"] pull_request: - branches: [ "main" ] + branches: ["main"] workflow_dispatch: inputs: commit_sha: @@ -29,9 +29,7 @@ jobs: with: fetch-depth: 0 - name: Check Commit Lint - with: - configFile: "./.commitlint.config.js" - uses: wagoid/commitlint-github-action@v6.0.1 + uses: wagoid/commitlint-github-action@v6 lint_check: name: Rust - lint_${{ matrix.lint_projects }} @@ -63,14 +61,14 @@ jobs: uses: actions/cache@v4 continue-on-error: false with: - path: | - ~/.cargo/bin - ~/.cargo/registry - ~/.cargo/git/db/ - key: ${{ runner.os }}-sdk-rust-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-sdk-rust- + path: | + ~/.cargo/bin + ~/.cargo/registry + ~/.cargo/git/db/ + key: ${{ runner.os }}-sdk-rust-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-sdk-rust- - name: Check cargo version run: cargo --version - name: Run ${{ matrix.lint_projects }} - run: make -f Makefile lint_${{ matrix.lint_projects }} + run: make -f Makefile lint_${{ matrix.lint_projects }} diff --git a/commitlint.config.js b/commitlint.config.mjs similarity index 83% rename from commitlint.config.js rename to commitlint.config.mjs index 37ace7a..5f9d0b7 100644 --- a/commitlint.config.js +++ b/commitlint.config.mjs @@ -1,11 +1,11 @@ -module.exports = { +export default { parserPreset: 'conventional-changelog-conventionalcommits', rules: { 'body-leading-blank': [1, 'always'], - 'body-max-line-length': [2, 'always', 100], + 'body-max-line-length': [2, 'always', 140], 'footer-leading-blank': [1, 'always'], - 'footer-max-line-length': [2, 'always', 100], - 'header-max-length': [2, 'always', 100], + 'footer-max-line-length': [2, 'always', 140], + 'header-max-length': [2, 'always', 140], 'subject-case': [ 2, 'never',