Browse Source

chore: 更新`commitlint.config.js`文件为`esm`语法

xiaoxian521 1 year ago
parent
commit
5199a65088
4 changed files with 22 additions and 15 deletions
  1. 1 1
      .eslintignore
  2. 4 1
      commitlint.config.js
  3. 1 0
      package.json
  4. 16 13
      pnpm-lock.yaml

+ 1 - 1
.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

+ 4 - 1
commitlint.config.cjs → 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: {

+ 1 - 0
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",

+ 16 - 13
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