Browse Source

fix(config): 修复 eslint 在 win10 系统无法校验的问题

1. 明确安装 eslint 所需的部分依赖
wangcong 3 tháng trước cách đây
mục cha
commit
283890039f
2 tập tin đã thay đổi với 12 bổ sung0 xóa
  1. 3 0
      package.json
  2. 9 0
      pnpm-lock.yaml

+ 3 - 0
package.json

@@ -32,6 +32,7 @@
   "devDependencies": {
     "@commitlint/cli": "^19.7.1",
     "@commitlint/config-conventional": "^19.7.1",
+    "@eslint/js": "9.17.0",
     "@iconify-json/mdi": "^1.2.2",
     "@intlify/unplugin-vue-i18n": "^6.0.3",
     "@tsconfig/node22": "^22.0.0",
@@ -57,6 +58,7 @@
     "globals": "^15.14.0",
     "husky": "^9.1.7",
     "jsdom": "^25.0.1",
+    "jsonc-eslint-parser": "2.4.0",
     "lint-staged": "^15.4.3",
     "npm-run-all2": "^7.0.2",
     "prettier": "^3.3.3",
@@ -69,6 +71,7 @@
     "stylelint-config-standard-scss": "^14.0.0",
     "stylelint-config-standard-vue": "^1.0.0",
     "typescript": "~5.6.3",
+    "typescript-eslint": "8.19.0",
     "unocss": "^0.65.4",
     "unplugin-auto-import": "^19.0.0",
     "unplugin-vue-components": "^28.0.0",

+ 9 - 0
pnpm-lock.yaml

@@ -42,6 +42,9 @@ importers:
       '@commitlint/config-conventional':
         specifier: ^19.7.1
         version: 19.7.1
+      '@eslint/js':
+        specifier: 9.17.0
+        version: 9.17.0
       '@iconify-json/mdi':
         specifier: ^1.2.2
         version: 1.2.2
@@ -117,6 +120,9 @@ importers:
       jsdom:
         specifier: ^25.0.1
         version: 25.0.1
+      jsonc-eslint-parser:
+        specifier: 2.4.0
+        version: 2.4.0
       lint-staged:
         specifier: ^15.4.3
         version: 15.4.3
@@ -153,6 +159,9 @@ importers:
       typescript:
         specifier: ~5.6.3
         version: 5.6.3
+      typescript-eslint:
+        specifier: 8.19.0
+        version: 8.19.0(eslint@9.17.0(jiti@2.4.2))(typescript@5.6.3)
       unocss:
         specifier: ^0.65.4
         version: 0.65.4(postcss@8.4.49)(rollup@4.29.1)(vite@6.0.7(@types/node@22.10.4)(jiti@2.4.2)(sass@1.83.0)(tsx@4.19.2)(yaml@2.7.0))(vue@3.5.13(typescript@5.6.3))