From b4e67fa2722d54556897bf847c4b8c08056ebf9b Mon Sep 17 00:00:00 2001 From: Joakim Olsson Date: Tue, 18 Jun 2024 07:41:56 +0200 Subject: [PATCH] chore: update commitlint config to use .mjs file extension --- .github/{commitlint.config.js => commitlint.config.mjs} | 6 +----- .github/workflows/commitlint.yaml | 2 +- template-repo/template/.github/commitlint.config.js | 1 - template-repo/template/.github/commitlint.config.mjs | 1 + 4 files changed, 3 insertions(+), 7 deletions(-) rename .github/{commitlint.config.js => commitlint.config.mjs} (78%) delete mode 120000 template-repo/template/.github/commitlint.config.js create mode 120000 template-repo/template/.github/commitlint.config.mjs diff --git a/.github/commitlint.config.js b/.github/commitlint.config.mjs similarity index 78% rename from .github/commitlint.config.js rename to .github/commitlint.config.mjs index c50801f..c5433ce 100644 --- a/.github/commitlint.config.js +++ b/.github/commitlint.config.mjs @@ -1,7 +1,5 @@ -const Configuration = { - +export default { extends: ['@commitlint/config-conventional'], - /* * Any rules defined here will override rules from @commitlint/config-conventional */ @@ -9,5 +7,3 @@ const Configuration = { 'body-max-line-length': [2, 'always', 200], }, }; - -module.exports = Configuration; diff --git a/.github/workflows/commitlint.yaml b/.github/workflows/commitlint.yaml index ff89eae..447cd8f 100644 --- a/.github/workflows/commitlint.yaml +++ b/.github/workflows/commitlint.yaml @@ -11,4 +11,4 @@ jobs: fetch-depth: 0 - uses: wagoid/commitlint-github-action@v6 with: - configFile: "./.github/commitlint.config.js" + configFile: "./.github/commitlint.config.mjs" diff --git a/template-repo/template/.github/commitlint.config.js b/template-repo/template/.github/commitlint.config.js deleted file mode 120000 index c37c1a8..0000000 --- a/template-repo/template/.github/commitlint.config.js +++ /dev/null @@ -1 +0,0 @@ -../../../.github/commitlint.config.js \ No newline at end of file diff --git a/template-repo/template/.github/commitlint.config.mjs b/template-repo/template/.github/commitlint.config.mjs new file mode 120000 index 0000000..d5d954a --- /dev/null +++ b/template-repo/template/.github/commitlint.config.mjs @@ -0,0 +1 @@ +../../../.github/commitlint.config.mjs \ No newline at end of file