From 5199a65088b60eea9451a92370b9b9db581a37bd Mon Sep 17 00:00:00 2001 From: xiaoxian521 <1923740402@qq.com> Date: Fri, 10 Nov 2023 14:01:49 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=9B=B4=E6=96=B0`commitlint.config.j?= =?UTF-8?q?s`=E6=96=87=E4=BB=B6=E4=B8=BA`esm`=E8=AF=AD=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintignore | 2 +- commitlint.config.cjs => commitlint.config.js | 5 +++- package.json | 1 + pnpm-lock.yaml | 29 ++++++++++--------- 4 files changed, 22 insertions(+), 15 deletions(-) rename commitlint.config.cjs => commitlint.config.js (88%) diff --git a/.eslintignore b/.eslintignore index ca64a1441a..d975bb3f5a 100644 --- a/.eslintignore +++ b/.eslintignore @@ -5,7 +5,7 @@ dist package.json .eslintrc.cjs .prettierrc.js -commitlint.config.cjs +commitlint.config.js postcss.config.cjs tailwind.config.ts stylelint.config.cjs diff --git a/commitlint.config.cjs b/commitlint.config.js similarity index 88% rename from commitlint.config.cjs rename to commitlint.config.js index 71bc3731ba..eea755d0ed 100644 --- a/commitlint.config.cjs +++ b/commitlint.config.js @@ -1,4 +1,7 @@ -module.exports = { +// @ts-check + +/** @type {import("@commitlint/types").UserConfig} */ +export default { ignores: [commit => commit.includes("init")], extends: ["@commitlint/config-conventional"], rules: { diff --git a/package.json b/package.json index 28b944f433..fb1c448ac7 100644 --- a/package.json +++ b/package.json @@ -105,6 +105,7 @@ "devDependencies": { "@commitlint/cli": "^18.2.0", "@commitlint/config-conventional": "^18.1.0", + "@commitlint/types": "^18.4.0", "@faker-js/faker": "^8.2.0", "@iconify-icons/ep": "^1.2.12", "@iconify-icons/ri": "^1.2.10", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 0054f96fb2..ba50a6d094 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -175,6 +175,9 @@ devDependencies: '@commitlint/config-conventional': specifier: ^18.1.0 version: 18.1.0 + '@commitlint/types': + specifier: ^18.4.0 + version: 18.4.0 '@faker-js/faker': specifier: ^8.2.0 version: 8.2.0 @@ -779,7 +782,7 @@ packages: '@commitlint/lint': 18.1.0 '@commitlint/load': 18.2.0(typescript@5.2.2) '@commitlint/read': 18.1.0 - '@commitlint/types': 18.1.0 + '@commitlint/types': 18.4.0 execa: 5.1.1 lodash.isfunction: 3.0.9 resolve-from: 5.0.0 @@ -800,7 +803,7 @@ packages: resolution: {integrity: sha512-kbHkIuItXn93o2NmTdwi5Mk1ujyuSIysRE/XHtrcps/27GuUKEIqBJp6TdJ4Sq+ze59RlzYSHMKuDKZbfg9+uQ==} engines: {node: '>=v18'} dependencies: - '@commitlint/types': 18.1.0 + '@commitlint/types': 18.4.0 ajv: 8.12.0 dev: true @@ -808,7 +811,7 @@ packages: resolution: {integrity: sha512-CkPzJ9UBumIo54VDcpmBlaVX81J++wzEhN3DJH9+6PaLeiIG+gkSx8t7C2gfwG7PaiW4HzQtdQlBN5ab+c4vFQ==} engines: {node: '>=v18'} dependencies: - '@commitlint/types': 18.1.0 + '@commitlint/types': 18.4.0 lodash.camelcase: 4.3.0 lodash.kebabcase: 4.1.1 lodash.snakecase: 4.1.1 @@ -825,7 +828,7 @@ packages: resolution: {integrity: sha512-So/w217tGWMZZb1yXcUFNF2qFLyYtSVqbnGoMbX8a+JKcG4oB11Gc1adS0ssUOMivtiNpaLtkSHFynyiwtJtiQ==} engines: {node: '>=v18'} dependencies: - '@commitlint/types': 18.1.0 + '@commitlint/types': 18.4.0 chalk: 4.1.2 dev: true @@ -833,7 +836,7 @@ packages: resolution: {integrity: sha512-fa1fY93J/Nx2GH6r6WOLdBOiL7x9Uc1N7wcpmaJ1C5Qs6P+rPSUTkofe2IOhSJIJoboHfAH6W0ru4xtK689t0Q==} engines: {node: '>=v18'} dependencies: - '@commitlint/types': 18.1.0 + '@commitlint/types': 18.4.0 semver: 7.5.4 dev: true @@ -844,7 +847,7 @@ packages: '@commitlint/is-ignored': 18.1.0 '@commitlint/parse': 18.1.0 '@commitlint/rules': 18.1.0 - '@commitlint/types': 18.1.0 + '@commitlint/types': 18.4.0 dev: true /@commitlint/load@18.2.0(typescript@5.2.2): @@ -854,7 +857,7 @@ packages: '@commitlint/config-validator': 18.1.0 '@commitlint/execute-rule': 18.1.0 '@commitlint/resolve-extends': 18.1.0 - '@commitlint/types': 18.1.0 + '@commitlint/types': 18.4.0 '@types/node': 18.18.9 chalk: 4.1.2 cosmiconfig: 8.3.6(typescript@5.2.2) @@ -876,7 +879,7 @@ packages: resolution: {integrity: sha512-23yv8uBweXWYn8bXk4PjHIsmVA+RkbqPh2h7irupBo2LthVlzMRc4LM6UStasScJ4OlXYYaWOmuP7jcExUF50Q==} engines: {node: '>=v18'} dependencies: - '@commitlint/types': 18.1.0 + '@commitlint/types': 18.4.0 conventional-changelog-angular: 6.0.0 conventional-commits-parser: 5.0.0 dev: true @@ -886,7 +889,7 @@ packages: engines: {node: '>=v18'} dependencies: '@commitlint/top-level': 18.1.0 - '@commitlint/types': 18.1.0 + '@commitlint/types': 18.4.0 fs-extra: 11.1.1 git-raw-commits: 2.0.11 minimist: 1.2.8 @@ -897,7 +900,7 @@ packages: engines: {node: '>=v18'} dependencies: '@commitlint/config-validator': 18.1.0 - '@commitlint/types': 18.1.0 + '@commitlint/types': 18.4.0 import-fresh: 3.3.0 lodash.mergewith: 4.6.2 resolve-from: 5.0.0 @@ -911,7 +914,7 @@ packages: '@commitlint/ensure': 18.1.0 '@commitlint/message': 18.1.0 '@commitlint/to-lines': 18.1.0 - '@commitlint/types': 18.1.0 + '@commitlint/types': 18.4.0 execa: 5.1.1 dev: true @@ -927,8 +930,8 @@ packages: find-up: 5.0.0 dev: true - /@commitlint/types@18.1.0: - resolution: {integrity: sha512-65vGxZmbs+2OVwEItxhp3Ul7X2m2LyLfifYI/NdPwRqblmuES2w2aIRhIjb7cwUIBHHSTT8WXj4ixVHQibmvLQ==} + /@commitlint/types@18.4.0: + resolution: {integrity: sha512-MKeaFxt0I9fhqUb2E+YIzX/gZtmkuodJET/XKiZIMvXUff8Ee4Ih86eLg+yAm2jf1pwGBmU02uNOp0y094w2Uw==} engines: {node: '>=v18'} dependencies: chalk: 4.1.2