astro-eslint-parser 1.0.3 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.d.mts CHANGED
@@ -314,7 +314,7 @@ declare class ParseError extends SyntaxError {
314
314
  }
315
315
 
316
316
  var name = "astro-eslint-parser";
317
- var version = "1.0.3";
317
+ var version = "1.1.0";
318
318
 
319
319
  declare const meta_name: typeof name;
320
320
  declare const meta_version: typeof version;
package/lib/index.d.ts CHANGED
@@ -314,7 +314,7 @@ declare class ParseError extends SyntaxError {
314
314
  }
315
315
 
316
316
  var name = "astro-eslint-parser";
317
- var version = "1.0.3";
317
+ var version = "1.1.0";
318
318
 
319
319
  declare const meta_name: typeof name;
320
320
  declare const meta_version: typeof version;
package/lib/index.js CHANGED
@@ -887,6 +887,14 @@ function parseScriptInternal(code, _ctx, parserOptionsCtx) {
887
887
  const parserOptions = parserOptionsCtx.parserOptions;
888
888
  if (parserOptionsCtx.isTypeScript() && parserOptions.filePath && parserOptions.project) {
889
889
  patchResult = tsPatch(parserOptions, parserOptionsCtx.getTSParserName());
890
+ } else if (parserOptionsCtx.isTypeScript() && parserOptions.filePath && parserOptions.projectService) {
891
+ console.warn(
892
+ "`astro-eslint-parser` does not support the `projectService` option, it will parse it as `project: true` instead."
893
+ );
894
+ patchResult = tsPatch(
895
+ { ...parserOptions, project: true },
896
+ parserOptionsCtx.getTSParserName()
897
+ );
890
898
  }
891
899
  const result = isEnhancedParserObject(parser) ? patchResult?.parse ? patchResult.parse(code, parser) : parser.parseForESLint(code, parserOptions) : parser.parse(code, parserOptions);
892
900
  if ("ast" in result && result.ast != null) {
@@ -2810,7 +2818,7 @@ __export(meta_exports, {
2810
2818
 
2811
2819
  // package.json
2812
2820
  var name = "astro-eslint-parser";
2813
- var version = "1.0.3";
2821
+ var version = "1.1.0";
2814
2822
 
2815
2823
  // src/index.ts
2816
2824
  function parseForESLint2(code, options) {
package/lib/index.mjs CHANGED
@@ -865,6 +865,14 @@ function parseScriptInternal(code, _ctx, parserOptionsCtx) {
865
865
  const parserOptions = parserOptionsCtx.parserOptions;
866
866
  if (parserOptionsCtx.isTypeScript() && parserOptions.filePath && parserOptions.project) {
867
867
  patchResult = tsPatch(parserOptions, parserOptionsCtx.getTSParserName());
868
+ } else if (parserOptionsCtx.isTypeScript() && parserOptions.filePath && parserOptions.projectService) {
869
+ console.warn(
870
+ "`astro-eslint-parser` does not support the `projectService` option, it will parse it as `project: true` instead."
871
+ );
872
+ patchResult = tsPatch(
873
+ { ...parserOptions, project: true },
874
+ parserOptionsCtx.getTSParserName()
875
+ );
868
876
  }
869
877
  const result = isEnhancedParserObject(parser) ? patchResult?.parse ? patchResult.parse(code, parser) : parser.parseForESLint(code, parserOptions) : parser.parse(code, parserOptions);
870
878
  if ("ast" in result && result.ast != null) {
@@ -2792,7 +2800,7 @@ __export(meta_exports, {
2792
2800
 
2793
2801
  // package.json
2794
2802
  var name = "astro-eslint-parser";
2795
- var version = "1.0.3";
2803
+ var version = "1.1.0";
2796
2804
 
2797
2805
  // src/index.ts
2798
2806
  function parseForESLint2(code, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-eslint-parser",
3
- "version": "1.0.3",
3
+ "version": "1.1.0",
4
4
  "description": "Astro component parser for ESLint",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.mjs",
@@ -67,14 +67,14 @@
67
67
  "@changesets/cli": "^2.24.2",
68
68
  "@ota-meshi/eslint-plugin": "^0.15.0",
69
69
  "@types/benchmark": "^2.1.1",
70
- "@types/chai": "^4.3.0",
70
+ "@types/chai": "^5.0.0",
71
71
  "@types/debug": "^4.1.7",
72
72
  "@types/eslint": "^9.0.0",
73
73
  "@types/eslint-scope": "^3.7.0",
74
74
  "@types/eslint-visitor-keys": "^3.0.0",
75
75
  "@types/is-glob": "^4.0.4",
76
76
  "@types/mocha": "^10.0.0",
77
- "@types/node": "^20.0.0",
77
+ "@types/node": "^22.0.0",
78
78
  "@types/semver": "^7.3.9",
79
79
  "@typescript-eslint/eslint-plugin": "^8.0.0",
80
80
  "@typescript-eslint/parser": "^8.0.0",
@@ -83,7 +83,7 @@
83
83
  "benchmark": "^2.1.4",
84
84
  "chai": "^5.0.0",
85
85
  "env-cmd": "^10.1.0",
86
- "esbuild": "^0.23.0",
86
+ "esbuild": "^0.24.0",
87
87
  "esbuild-register": "^3.3.3",
88
88
  "eslint": "^8.15.0",
89
89
  "eslint-config-prettier": "^9.0.0",