feat(eslint): 添加 jsonc 插件并启用 JSON 文件键排序规则
新增 `eslint-plugin-jsonc` 插件,并在 `.json` 文件中启用 `jsonc/sort-keys` 规则, 以确保本地化文件中的键名按字母顺序排列。此举有助于减少多人协作时的合并冲突, 同时提升代码一致性和可维护性。 此外,调整了 VS Code 配置项顺序以优化读写逻辑,并更新相关依赖版本。
This commit is contained in:
69
pnpm-lock.yaml
generated
69
pnpm-lock.yaml
generated
@@ -38,6 +38,9 @@ importers:
|
||||
highlight.js:
|
||||
specifier: ^11.11.1
|
||||
version: 11.11.1
|
||||
jsonc-eslint-parser:
|
||||
specifier: ^2.4.1
|
||||
version: 2.4.1
|
||||
lodash-es:
|
||||
specifier: ^4.17.21
|
||||
version: 4.17.21
|
||||
@@ -162,6 +165,9 @@ importers:
|
||||
eslint-plugin-import:
|
||||
specifier: ^2.32.0
|
||||
version: 2.32.0(@typescript-eslint/parser@8.43.0(eslint@9.38.0(jiti@2.6.1))(typescript@5.9.2))(eslint@9.38.0(jiti@2.6.1))
|
||||
eslint-plugin-jsonc:
|
||||
specifier: ^2.21.0
|
||||
version: 2.21.0(eslint@9.38.0(jiti@2.6.1))
|
||||
eslint-plugin-oxlint:
|
||||
specifier: ~1.23.0
|
||||
version: 1.23.0
|
||||
@@ -3261,6 +3267,10 @@ packages:
|
||||
resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
diff-sequences@27.5.1:
|
||||
resolution: {integrity: sha512-k1gCAXAsNgLwEL+Y8Wvl+M6oEFj5bgazfZULpS5CneoPPXRaCCW7dm+q21Ky2VEE5X+VeRDBVg1Pcvvsr4TtNQ==}
|
||||
engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0}
|
||||
|
||||
dir-glob@3.0.1:
|
||||
resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==}
|
||||
engines: {node: '>=8'}
|
||||
@@ -3405,6 +3415,12 @@ packages:
|
||||
engines: {node: '>=6.0'}
|
||||
hasBin: true
|
||||
|
||||
eslint-compat-utils@0.6.5:
|
||||
resolution: {integrity: sha512-vAUHYzue4YAa2hNACjB8HvUQj5yehAZgiClyFVVom9cP8z5NSFq3PwB/TtJslN2zAMgRX6FCFCjYBbQh71g5RQ==}
|
||||
engines: {node: '>=12'}
|
||||
peerDependencies:
|
||||
eslint: '>=6.0.0'
|
||||
|
||||
eslint-config-prettier@10.1.8:
|
||||
resolution: {integrity: sha512-82GZUjRS0p/jganf6q1rEO25VSoHH0hKPCTrgillPjdI/3bgBhAE1QzHrHTizjpRvy6pGAvKjDJtk2pF9NDq8w==}
|
||||
hasBin: true
|
||||
@@ -3414,6 +3430,17 @@ packages:
|
||||
eslint-import-resolver-node@0.3.9:
|
||||
resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==}
|
||||
|
||||
eslint-json-compat-utils@0.2.1:
|
||||
resolution: {integrity: sha512-YzEodbDyW8DX8bImKhAcCeu/L31Dd/70Bidx2Qex9OFUtgzXLqtfWL4Hr5fM/aCCB8QUZLuJur0S9k6UfgFkfg==}
|
||||
engines: {node: '>=12'}
|
||||
peerDependencies:
|
||||
'@eslint/json': '*'
|
||||
eslint: '*'
|
||||
jsonc-eslint-parser: ^2.4.0
|
||||
peerDependenciesMeta:
|
||||
'@eslint/json':
|
||||
optional: true
|
||||
|
||||
eslint-module-utils@2.12.1:
|
||||
resolution: {integrity: sha512-L8jSWTze7K2mTg0vos/RuLRS5soomksDPoJLXIslC7c8Wmut3bx7CPpJijDcBZtxQ5lrbUdM+s0OlNbz0DCDNw==}
|
||||
engines: {node: '>=4'}
|
||||
@@ -3445,6 +3472,12 @@ packages:
|
||||
'@typescript-eslint/parser':
|
||||
optional: true
|
||||
|
||||
eslint-plugin-jsonc@2.21.0:
|
||||
resolution: {integrity: sha512-HttlxdNG5ly3YjP1cFMP62R4qKLxJURfBZo2gnMY+yQojZxkLyOpY1H1KRTKBmvQeSG9pIpSGEhDjE17vvYosg==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
peerDependencies:
|
||||
eslint: '>=6.0.0'
|
||||
|
||||
eslint-plugin-oxlint@1.23.0:
|
||||
resolution: {integrity: sha512-YT/ObCQMluSHVEqDJPwrVLERkUUQnmcRYYQbB7h6t2P4243WE3Z1UmUcPy1Q6vSVP/U7vw5affptlGV2RizDuw==}
|
||||
|
||||
@@ -4148,8 +4181,8 @@ packages:
|
||||
engines: {node: '>=6'}
|
||||
hasBin: true
|
||||
|
||||
jsonc-eslint-parser@2.4.0:
|
||||
resolution: {integrity: sha512-WYDyuc/uFcGp6YtM2H0uKmUwieOuzeE/5YocFJLnLfclZ4inf3mRn8ZVy1s7Hxji7Jxm6Ss8gqpexD/GlKoGgg==}
|
||||
jsonc-eslint-parser@2.4.1:
|
||||
resolution: {integrity: sha512-uuPNLJkKN8NXAlZlQ6kmUF9qO+T6Kyd7oV4+/7yy8Jz6+MZNyhPq8EdLpdfnPVzUC8qSf1b4j1azKaGnFsjmsw==}
|
||||
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
|
||||
|
||||
jsonc-parser@3.3.1:
|
||||
@@ -7104,7 +7137,7 @@ snapshots:
|
||||
esbuild: 0.25.12
|
||||
escodegen: 2.1.0
|
||||
estree-walker: 2.0.2
|
||||
jsonc-eslint-parser: 2.4.0
|
||||
jsonc-eslint-parser: 2.4.1
|
||||
source-map-js: 1.2.1
|
||||
yaml-eslint-parser: 1.3.0
|
||||
optionalDependencies:
|
||||
@@ -9006,6 +9039,8 @@ snapshots:
|
||||
|
||||
detect-libc@2.1.2: {}
|
||||
|
||||
diff-sequences@27.5.1: {}
|
||||
|
||||
dir-glob@3.0.1:
|
||||
dependencies:
|
||||
path-type: 4.0.0
|
||||
@@ -9268,6 +9303,11 @@ snapshots:
|
||||
optionalDependencies:
|
||||
source-map: 0.6.1
|
||||
|
||||
eslint-compat-utils@0.6.5(eslint@9.38.0(jiti@2.6.1)):
|
||||
dependencies:
|
||||
eslint: 9.38.0(jiti@2.6.1)
|
||||
semver: 7.7.3
|
||||
|
||||
eslint-config-prettier@10.1.8(eslint@9.38.0(jiti@2.6.1)):
|
||||
dependencies:
|
||||
eslint: 9.38.0(jiti@2.6.1)
|
||||
@@ -9280,6 +9320,12 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
eslint-json-compat-utils@0.2.1(eslint@9.38.0(jiti@2.6.1))(jsonc-eslint-parser@2.4.1):
|
||||
dependencies:
|
||||
eslint: 9.38.0(jiti@2.6.1)
|
||||
esquery: 1.6.0
|
||||
jsonc-eslint-parser: 2.4.1
|
||||
|
||||
eslint-module-utils@2.12.1(@typescript-eslint/parser@8.43.0(eslint@9.38.0(jiti@2.6.1))(typescript@5.9.2))(eslint-import-resolver-node@0.3.9)(eslint@9.38.0(jiti@2.6.1)):
|
||||
dependencies:
|
||||
debug: 3.2.7
|
||||
@@ -9319,6 +9365,21 @@ snapshots:
|
||||
- eslint-import-resolver-webpack
|
||||
- supports-color
|
||||
|
||||
eslint-plugin-jsonc@2.21.0(eslint@9.38.0(jiti@2.6.1)):
|
||||
dependencies:
|
||||
'@eslint-community/eslint-utils': 4.9.0(eslint@9.38.0(jiti@2.6.1))
|
||||
diff-sequences: 27.5.1
|
||||
eslint: 9.38.0(jiti@2.6.1)
|
||||
eslint-compat-utils: 0.6.5(eslint@9.38.0(jiti@2.6.1))
|
||||
eslint-json-compat-utils: 0.2.1(eslint@9.38.0(jiti@2.6.1))(jsonc-eslint-parser@2.4.1)
|
||||
espree: 10.4.0
|
||||
graphemer: 1.4.0
|
||||
jsonc-eslint-parser: 2.4.1
|
||||
natural-compare: 1.4.0
|
||||
synckit: 0.11.11
|
||||
transitivePeerDependencies:
|
||||
- '@eslint/json'
|
||||
|
||||
eslint-plugin-oxlint@1.23.0:
|
||||
dependencies:
|
||||
jsonc-parser: 3.3.1
|
||||
@@ -10033,7 +10094,7 @@ snapshots:
|
||||
|
||||
json5@2.2.3: {}
|
||||
|
||||
jsonc-eslint-parser@2.4.0:
|
||||
jsonc-eslint-parser@2.4.1:
|
||||
dependencies:
|
||||
acorn: 8.15.0
|
||||
eslint-visitor-keys: 3.4.3
|
||||
|
||||
Reference in New Issue
Block a user