diff --git a/.changeset/stale-seahorses-draw.md b/.changeset/stale-seahorses-draw.md new file mode 100644 index 00000000..ede697b5 --- /dev/null +++ b/.changeset/stale-seahorses-draw.md @@ -0,0 +1,5 @@ +--- +"@intlify/eslint-plugin-vue-i18n": major +--- + +Change parser dependencies to peerDependencies diff --git a/lib/types/vue-parser-services.ts b/lib/types/vue-parser-services.ts index f2a703f4..f9950a70 100644 --- a/lib/types/vue-parser-services.ts +++ b/lib/types/vue-parser-services.ts @@ -2,7 +2,7 @@ import type { Rule } from 'eslint' import type { RuleContext, SourceCode } from './eslint' import type { AST as VAST } from 'vue-eslint-parser' import type { TokenStore } from './types' -import type { VElement } from 'vue-eslint-parser/ast' +import type { VElement } from 'vue-eslint-parser/ast/index' export interface TemplateListener { [key: string]: ((node: never) => void) | undefined diff --git a/package.json b/package.json index 334b3771..34a082f5 100644 --- a/package.json +++ b/package.json @@ -72,13 +72,10 @@ "is-language-code": "^3.1.0", "js-yaml": "^4.1.0", "json5": "^2.2.3", - "jsonc-eslint-parser": "^2.3.0", "lodash": "^4.17.21", "parse5": "^7.1.2", "semver": "^7.5.4", - "synckit": "^0.9.0", - "vue-eslint-parser": "^9.3.1", - "yaml-eslint-parser": "^1.2.2" + "synckit": "^0.9.0" }, "devDependencies": { "@changesets/changelog-github": "^0.5.0", @@ -107,6 +104,7 @@ "esquery": "^1.5.0", "jiti": "^1.21.0", "json-schema": "^0.4.0", + "jsonc-eslint-parser": "^2.3.0", "lint-staged": "^15.0.0", "mocha": "^11.0.0", "monaco-editor": "^0.52.0", @@ -120,10 +118,15 @@ "typescript-eslint": "^7.11.0", "vitepress": "^1.0.2", "vue-eslint-editor": "^1.1.0", - "vue-github-button": "^3.1.0" + "vue-eslint-parser": "^10.0.0", + "vue-github-button": "^3.1.0", + "yaml-eslint-parser": "^1.2.2" }, "peerDependencies": { - "eslint": "^8.0.0 || ^9.0.0-0" + "eslint": "^8.0.0 || ^9.0.0-0", + "jsonc-eslint-parser": "^2.3.0", + "vue-eslint-parser": "^9.3.1", + "yaml-eslint-parser": "^1.2.2" }, "publishConfig": { "access": "public" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 522b2e21..3f155741 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,9 +44,6 @@ importers: json5: specifier: ^2.2.3 version: 2.2.3 - jsonc-eslint-parser: - specifier: ^2.3.0 - version: 2.3.0 lodash: specifier: ^4.17.21 version: 4.17.21 @@ -59,12 +56,6 @@ importers: synckit: specifier: ^0.9.0 version: 0.9.0 - vue-eslint-parser: - specifier: ^9.3.1 - version: 9.3.1(eslint@9.4.0) - yaml-eslint-parser: - specifier: ^1.2.2 - version: 1.2.2 devDependencies: '@changesets/changelog-github': specifier: ^0.5.0 @@ -144,6 +135,9 @@ importers: json-schema: specifier: ^0.4.0 version: 0.4.0 + jsonc-eslint-parser: + specifier: ^2.3.0 + version: 2.3.0 lint-staged: specifier: ^15.0.0 version: 15.2.2 @@ -183,9 +177,15 @@ importers: vue-eslint-editor: specifier: ^1.1.0 version: 1.1.0 + vue-eslint-parser: + specifier: ^10.0.0 + version: 10.0.0(eslint@9.4.0) vue-github-button: specifier: ^3.1.0 version: 3.1.0 + yaml-eslint-parser: + specifier: ^1.2.2 + version: 1.2.2 packages: @@ -1081,6 +1081,11 @@ packages: engines: {node: '>=0.4.0'} hasBin: true + acorn@8.14.0: + resolution: {integrity: sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==} + engines: {node: '>=0.4.0'} + hasBin: true + aggregate-error@3.1.0: resolution: {integrity: sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==} engines: {node: '>=8'} @@ -1373,6 +1378,15 @@ packages: supports-color: optional: true + debug@4.4.0: + resolution: {integrity: sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + decamelize-keys@1.1.1: resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} engines: {node: '>=0.10.0'} @@ -1539,10 +1553,6 @@ packages: resolution: {integrity: sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==} engines: {node: '>=8.0.0'} - eslint-scope@7.2.1: - resolution: {integrity: sha512-CvefSOsDdaYYvxChovdrPo/ZGt8d5lrJWleAc1diXRKhHGiTYEI26cvo8Kle/wGnsizoCJjK73FMg1/IkIwiNA==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint-scope@7.2.2: resolution: {integrity: sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} @@ -1551,6 +1561,10 @@ packages: resolution: {integrity: sha512-pL8XjgP4ZOmmwfFE8mEhSxA7ZY4C+LWyqjQ3o4yWkkmD0qcMT9kkW3zWHOczhWcjTSgqycYAgwSlXvZltv65og==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-scope@8.2.0: + resolution: {integrity: sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-utils@2.1.0: resolution: {integrity: sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==} engines: {node: '>=6'} @@ -1575,6 +1589,10 @@ packages: resolution: {integrity: sha512-OtIRv/2GyiF6o/d8K7MYKKbXrOUBIK6SfkIRM4Z0dY3w+LiQ0vy3F57m0Z71bjbyeiWFiHJ8brqnmE6H6/jEuw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-visitor-keys@4.2.0: + resolution: {integrity: sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint4b@7.32.0: resolution: {integrity: sha512-b7WugntTQ87VupqHxLOk4OoxLLPZbvpl/6K2FP5TvGbp5FmT6hyZUZjhR22xqGEOMCLdPEQeAmCRW2FAkfr4+Q==} engines: {node: ^10.12.0 || >=12.0.0} @@ -1588,6 +1606,10 @@ packages: resolution: {integrity: sha512-MWkrWZbJsL2UwnjxTX3gG8FneachS/Mwg7tdGXce011sJd5b0JG54vat5KHnfSBODZ3Wvzd2WnjxyzsRoVv+ww==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@10.3.0: + resolution: {integrity: sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + espree@7.3.1: resolution: {integrity: sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==} engines: {node: ^10.12.0 || >=12.0.0} @@ -1605,6 +1627,10 @@ packages: resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} engines: {node: '>=0.10'} + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + engines: {node: '>=0.10'} + esrecurse@4.3.0: resolution: {integrity: sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==} engines: {node: '>=4.0'} @@ -2728,6 +2754,11 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.7.1: + resolution: {integrity: sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==} + engines: {node: '>=10'} + hasBin: true + serialize-javascript@6.0.2: resolution: {integrity: sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g==} @@ -3105,11 +3136,11 @@ packages: resolution: {integrity: sha512-LAnb83COow880jrxkinvy6MTxS3Ozzb3BnkwN+UVz1OabDHhObfhU+LnXa/ZY1PnUht8rnAlxcR89V+utYKgGA==} engines: {node: '>=10.0.0'} - vue-eslint-parser@9.3.1: - resolution: {integrity: sha512-Clr85iD2XFZ3lJ52/ppmUDG/spxQu6+MAeHXjjyI4I1NUYZ9xmenQp4N0oaHJhrA8OOxltCVxMRfANGa70vU0g==} - engines: {node: ^14.17.0 || >=16.0.0} + vue-eslint-parser@10.0.0: + resolution: {integrity: sha512-xGtmOQJzWUIi6opA7CfJTJsJyCRjibJKHNzq39yqJ/f4AJ+N7Ngr7lDZMl/9ePaobBnsZgifu+7G6bST+gaYJA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: '>=6.0.0' + eslint: ^8.57.0 || ^9.0.0 vue-eslint-parser@9.4.2: resolution: {integrity: sha512-Ry9oiGmCAK91HrKMtCrKFWmSFWvYkpGglCeFAIqDdr9zdXmMMpJOmUJS7WWsW7fX81h6mwHmUZCQQ1E0PkSwYQ==} @@ -4270,6 +4301,10 @@ snapshots: dependencies: acorn: 8.11.3 + acorn-jsx@5.3.2(acorn@8.14.0): + dependencies: + acorn: 8.14.0 + acorn-walk@8.3.2: {} acorn@7.4.1: {} @@ -4278,6 +4313,8 @@ snapshots: acorn@8.11.3: {} + acorn@8.14.0: {} + aggregate-error@3.1.0: dependencies: clean-stack: 2.2.0 @@ -4574,6 +4611,10 @@ snapshots: optionalDependencies: supports-color: 8.1.1 + debug@4.4.0: + dependencies: + ms: 2.1.3 + decamelize-keys@1.1.1: dependencies: decamelize: 1.2.0 @@ -4780,17 +4821,17 @@ snapshots: esrecurse: 4.3.0 estraverse: 4.3.0 - eslint-scope@7.2.1: + eslint-scope@7.2.2: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 - eslint-scope@7.2.2: + eslint-scope@8.0.1: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 - eslint-scope@8.0.1: + eslint-scope@8.2.0: dependencies: esrecurse: 4.3.0 estraverse: 5.3.0 @@ -4809,6 +4850,8 @@ snapshots: eslint-visitor-keys@4.0.0: {} + eslint-visitor-keys@4.2.0: {} + eslint4b@7.32.0: dependencies: debug: 4.3.4 @@ -4875,6 +4918,12 @@ snapshots: acorn-jsx: 5.3.2(acorn@8.11.3) eslint-visitor-keys: 4.0.0 + espree@10.3.0: + dependencies: + acorn: 8.14.0 + acorn-jsx: 5.3.2(acorn@8.14.0) + eslint-visitor-keys: 4.2.0 + espree@7.3.1: dependencies: acorn: 7.4.1 @@ -4893,6 +4942,10 @@ snapshots: dependencies: estraverse: 5.3.0 + esquery@1.6.0: + dependencies: + estraverse: 5.3.0 + esrecurse@4.3.0: dependencies: estraverse: 5.3.0 @@ -6044,6 +6097,8 @@ snapshots: dependencies: lru-cache: 6.0.0 + semver@7.7.1: {} + serialize-javascript@6.0.2: dependencies: randombytes: 2.1.0 @@ -6435,16 +6490,16 @@ snapshots: vue-eslint-editor@1.1.0: {} - vue-eslint-parser@9.3.1(eslint@9.4.0): + vue-eslint-parser@10.0.0(eslint@9.4.0): dependencies: - debug: 4.3.4 + debug: 4.4.0 eslint: 9.4.0 - eslint-scope: 7.2.1 - eslint-visitor-keys: 3.4.1 - espree: 9.6.1 - esquery: 1.5.0 + eslint-scope: 8.2.0 + eslint-visitor-keys: 4.2.0 + espree: 10.3.0 + esquery: 1.6.0 lodash: 4.17.21 - semver: 7.5.4 + semver: 7.7.1 transitivePeerDependencies: - supports-color