astro-eslint-parser 0.16.0 → 0.16.1

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
@@ -249,43 +249,7 @@ type index_Range = Range;
249
249
  type index_SourceLocation = SourceLocation;
250
250
  type index_Token = Token;
251
251
  declare namespace index {
252
- export {
253
- index_AstroChild as AstroChild,
254
- index_AstroDoctype as AstroDoctype,
255
- index_AstroFragment as AstroFragment,
256
- index_AstroHTMLComment as AstroHTMLComment,
257
- index_AstroNode as AstroNode,
258
- index_AstroParentNode as AstroParentNode,
259
- index_AstroProgram as AstroProgram,
260
- index_AstroRawText as AstroRawText,
261
- index_AstroShorthandAttribute as AstroShorthandAttribute,
262
- index_AstroTemplateLiteralAttribute as AstroTemplateLiteralAttribute,
263
- index_Comment as Comment,
264
- index_JSXAttribute as JSXAttribute,
265
- index_JSXChild as JSXChild,
266
- index_JSXClosingElement as JSXClosingElement,
267
- index_JSXClosingFragment as JSXClosingFragment,
268
- index_JSXElement as JSXElement,
269
- index_JSXEmptyExpression as JSXEmptyExpression,
270
- index_JSXExpression as JSXExpression,
271
- index_JSXExpressionContainer as JSXExpressionContainer,
272
- index_JSXFragment as JSXFragment,
273
- index_JSXIdentifier as JSXIdentifier,
274
- index_JSXMemberExpression as JSXMemberExpression,
275
- index_JSXNamespacedName as JSXNamespacedName,
276
- index_JSXNode as JSXNode,
277
- index_JSXOpeningElement as JSXOpeningElement,
278
- index_JSXOpeningFragment as JSXOpeningFragment,
279
- index_JSXParentNode as JSXParentNode,
280
- index_JSXSpreadAttribute as JSXSpreadAttribute,
281
- index_JSXSpreadChild as JSXSpreadChild,
282
- index_JSXTagNameExpression as JSXTagNameExpression,
283
- index_JSXText as JSXText,
284
- index_Position as Position,
285
- index_Range as Range,
286
- index_SourceLocation as SourceLocation,
287
- index_Token as Token,
288
- };
252
+ export type { index_AstroChild as AstroChild, index_AstroDoctype as AstroDoctype, index_AstroFragment as AstroFragment, index_AstroHTMLComment as AstroHTMLComment, index_AstroNode as AstroNode, index_AstroParentNode as AstroParentNode, index_AstroProgram as AstroProgram, index_AstroRawText as AstroRawText, index_AstroShorthandAttribute as AstroShorthandAttribute, index_AstroTemplateLiteralAttribute as AstroTemplateLiteralAttribute, index_Comment as Comment, index_JSXAttribute as JSXAttribute, index_JSXChild as JSXChild, index_JSXClosingElement as JSXClosingElement, index_JSXClosingFragment as JSXClosingFragment, index_JSXElement as JSXElement, index_JSXEmptyExpression as JSXEmptyExpression, index_JSXExpression as JSXExpression, index_JSXExpressionContainer as JSXExpressionContainer, index_JSXFragment as JSXFragment, index_JSXIdentifier as JSXIdentifier, index_JSXMemberExpression as JSXMemberExpression, index_JSXNamespacedName as JSXNamespacedName, index_JSXNode as JSXNode, index_JSXOpeningElement as JSXOpeningElement, index_JSXOpeningFragment as JSXOpeningFragment, index_JSXParentNode as JSXParentNode, index_JSXSpreadAttribute as JSXSpreadAttribute, index_JSXSpreadChild as JSXSpreadChild, index_JSXTagNameExpression as JSXTagNameExpression, index_JSXText as JSXText, index_Position as Position, index_Range as Range, index_SourceLocation as SourceLocation, index_Token as Token };
289
253
  }
290
254
 
291
255
  /**
@@ -350,15 +314,12 @@ declare class ParseError extends SyntaxError {
350
314
  }
351
315
 
352
316
  var name = "astro-eslint-parser";
353
- var version = "0.16.0";
317
+ var version = "0.16.1";
354
318
 
355
319
  declare const meta_name: typeof name;
356
320
  declare const meta_version: typeof version;
357
321
  declare namespace meta {
358
- export {
359
- meta_name as name,
360
- meta_version as version,
361
- };
322
+ export { meta_name as name, meta_version as version };
362
323
  }
363
324
 
364
325
  /**
@@ -367,4 +328,4 @@ declare namespace meta {
367
328
  declare function parseForESLint(code: string, options?: any): ReturnType<typeof parseForESLint$1>;
368
329
  declare const VisitorKeys: eslint.SourceCode.VisitorKeys;
369
330
 
370
- export { index as AST, ParseError, ParseTemplateResult, VisitorKeys, meta, name, parseForESLint, parseTemplate, traverseNodes };
331
+ export { index as AST, ParseError, type ParseTemplateResult, VisitorKeys, meta, name, parseForESLint, parseTemplate, traverseNodes };
package/lib/index.d.ts CHANGED
@@ -249,43 +249,7 @@ type index_Range = Range;
249
249
  type index_SourceLocation = SourceLocation;
250
250
  type index_Token = Token;
251
251
  declare namespace index {
252
- export {
253
- index_AstroChild as AstroChild,
254
- index_AstroDoctype as AstroDoctype,
255
- index_AstroFragment as AstroFragment,
256
- index_AstroHTMLComment as AstroHTMLComment,
257
- index_AstroNode as AstroNode,
258
- index_AstroParentNode as AstroParentNode,
259
- index_AstroProgram as AstroProgram,
260
- index_AstroRawText as AstroRawText,
261
- index_AstroShorthandAttribute as AstroShorthandAttribute,
262
- index_AstroTemplateLiteralAttribute as AstroTemplateLiteralAttribute,
263
- index_Comment as Comment,
264
- index_JSXAttribute as JSXAttribute,
265
- index_JSXChild as JSXChild,
266
- index_JSXClosingElement as JSXClosingElement,
267
- index_JSXClosingFragment as JSXClosingFragment,
268
- index_JSXElement as JSXElement,
269
- index_JSXEmptyExpression as JSXEmptyExpression,
270
- index_JSXExpression as JSXExpression,
271
- index_JSXExpressionContainer as JSXExpressionContainer,
272
- index_JSXFragment as JSXFragment,
273
- index_JSXIdentifier as JSXIdentifier,
274
- index_JSXMemberExpression as JSXMemberExpression,
275
- index_JSXNamespacedName as JSXNamespacedName,
276
- index_JSXNode as JSXNode,
277
- index_JSXOpeningElement as JSXOpeningElement,
278
- index_JSXOpeningFragment as JSXOpeningFragment,
279
- index_JSXParentNode as JSXParentNode,
280
- index_JSXSpreadAttribute as JSXSpreadAttribute,
281
- index_JSXSpreadChild as JSXSpreadChild,
282
- index_JSXTagNameExpression as JSXTagNameExpression,
283
- index_JSXText as JSXText,
284
- index_Position as Position,
285
- index_Range as Range,
286
- index_SourceLocation as SourceLocation,
287
- index_Token as Token,
288
- };
252
+ export type { index_AstroChild as AstroChild, index_AstroDoctype as AstroDoctype, index_AstroFragment as AstroFragment, index_AstroHTMLComment as AstroHTMLComment, index_AstroNode as AstroNode, index_AstroParentNode as AstroParentNode, index_AstroProgram as AstroProgram, index_AstroRawText as AstroRawText, index_AstroShorthandAttribute as AstroShorthandAttribute, index_AstroTemplateLiteralAttribute as AstroTemplateLiteralAttribute, index_Comment as Comment, index_JSXAttribute as JSXAttribute, index_JSXChild as JSXChild, index_JSXClosingElement as JSXClosingElement, index_JSXClosingFragment as JSXClosingFragment, index_JSXElement as JSXElement, index_JSXEmptyExpression as JSXEmptyExpression, index_JSXExpression as JSXExpression, index_JSXExpressionContainer as JSXExpressionContainer, index_JSXFragment as JSXFragment, index_JSXIdentifier as JSXIdentifier, index_JSXMemberExpression as JSXMemberExpression, index_JSXNamespacedName as JSXNamespacedName, index_JSXNode as JSXNode, index_JSXOpeningElement as JSXOpeningElement, index_JSXOpeningFragment as JSXOpeningFragment, index_JSXParentNode as JSXParentNode, index_JSXSpreadAttribute as JSXSpreadAttribute, index_JSXSpreadChild as JSXSpreadChild, index_JSXTagNameExpression as JSXTagNameExpression, index_JSXText as JSXText, index_Position as Position, index_Range as Range, index_SourceLocation as SourceLocation, index_Token as Token };
289
253
  }
290
254
 
291
255
  /**
@@ -350,15 +314,12 @@ declare class ParseError extends SyntaxError {
350
314
  }
351
315
 
352
316
  var name = "astro-eslint-parser";
353
- var version = "0.16.0";
317
+ var version = "0.16.1";
354
318
 
355
319
  declare const meta_name: typeof name;
356
320
  declare const meta_version: typeof version;
357
321
  declare namespace meta {
358
- export {
359
- meta_name as name,
360
- meta_version as version,
361
- };
322
+ export { meta_name as name, meta_version as version };
362
323
  }
363
324
 
364
325
  /**
@@ -367,4 +328,4 @@ declare namespace meta {
367
328
  declare function parseForESLint(code: string, options?: any): ReturnType<typeof parseForESLint$1>;
368
329
  declare const VisitorKeys: eslint.SourceCode.VisitorKeys;
369
330
 
370
- export { index as AST, ParseError, ParseTemplateResult, VisitorKeys, meta, name, parseForESLint, parseTemplate, traverseNodes };
331
+ export { index as AST, ParseError, type ParseTemplateResult, VisitorKeys, meta, name, parseForESLint, parseTemplate, traverseNodes };
package/lib/index.js CHANGED
@@ -496,6 +496,9 @@ function sort(tokens) {
496
496
  // src/parser/process-template.ts
497
497
  var import_types = require("@typescript-eslint/types");
498
498
 
499
+ // src/astro/index.ts
500
+ var import_decode = require("entities/lib/decode.js");
501
+
499
502
  // src/errors.ts
500
503
  var ParseError = class extends SyntaxError {
501
504
  /**
@@ -575,7 +578,22 @@ function calcAttributeEndOffset(node, ctx) {
575
578
  } else if (node.kind === "quoted") {
576
579
  info = getTokenInfo(
577
580
  ctx,
578
- [[`"${node.value}"`, `'${node.value}'`, node.value]],
581
+ [
582
+ [
583
+ {
584
+ token: `"${node.value}"`,
585
+ htmlEntityDecode: true
586
+ },
587
+ {
588
+ token: `'${node.value}'`,
589
+ htmlEntityDecode: true
590
+ },
591
+ {
592
+ token: node.value,
593
+ htmlEntityDecode: true
594
+ }
595
+ ]
596
+ ],
579
597
  calcAttributeValueStartOffset(node, ctx)
580
598
  );
581
599
  } else if (node.kind === "expression") {
@@ -616,7 +634,11 @@ function calcAttributeValueStartOffset(node, ctx) {
616
634
  if (node.kind === "quoted") {
617
635
  info = getTokenInfo(
618
636
  ctx,
619
- [node.name, "=", [`"`, `'`, node.value]],
637
+ [
638
+ node.name,
639
+ "=",
640
+ [`"`, `'`, { token: node.value, htmlEntityDecode: true }]
641
+ ],
620
642
  node.position.start.offset
621
643
  );
622
644
  } else if (node.kind === "expression") {
@@ -766,7 +788,7 @@ function getTokenInfo(ctx, tokens, position) {
766
788
  let lastMatch;
767
789
  for (const t of tokens) {
768
790
  const index = lastMatch ? lastMatch.index + lastMatch.match.length : position;
769
- const m = typeof t === "string" ? matchOfStr(t, index) : matchOfForMulti(t, index);
791
+ const m = Array.isArray(t) ? matchOfForMulti(t, index) : match(t, index);
770
792
  if (m == null) {
771
793
  throw new ParseError(
772
794
  `Unknown token at ${index}, expected: ${JSON.stringify(
@@ -779,7 +801,8 @@ function getTokenInfo(ctx, tokens, position) {
779
801
  lastMatch = m;
780
802
  }
781
803
  return lastMatch;
782
- function matchOfStr(search, position2) {
804
+ function match(token, position2) {
805
+ const search = typeof token === "string" ? token : token.token;
783
806
  const index = search.trim() === search ? skipSpaces(ctx.code, position2) : position2;
784
807
  if (ctx.code.startsWith(search, index)) {
785
808
  return {
@@ -787,17 +810,66 @@ function getTokenInfo(ctx, tokens, position) {
787
810
  index
788
811
  };
789
812
  }
813
+ if (typeof token !== "string") {
814
+ return matchWithHTMLEntity(token, index);
815
+ }
790
816
  return null;
791
817
  }
792
818
  function matchOfForMulti(search, position2) {
793
819
  for (const s of search) {
794
- const m = matchOfStr(s, position2);
820
+ const m = match(s, position2);
795
821
  if (m) {
796
822
  return m;
797
823
  }
798
824
  }
799
825
  return null;
800
826
  }
827
+ function matchWithHTMLEntity(token, position2) {
828
+ const search = token.token;
829
+ let codeOffset = position2;
830
+ let searchOffset = 0;
831
+ while (searchOffset < search.length) {
832
+ const searchChar = search[searchOffset];
833
+ if (ctx.code[codeOffset] === searchChar) {
834
+ codeOffset++;
835
+ searchOffset++;
836
+ continue;
837
+ }
838
+ const entity = getHTMLEntity(codeOffset);
839
+ if (entity?.entity === searchChar) {
840
+ codeOffset += entity.length;
841
+ searchOffset++;
842
+ continue;
843
+ }
844
+ return null;
845
+ }
846
+ return {
847
+ match: ctx.code.slice(position2, codeOffset),
848
+ index: position2
849
+ };
850
+ function getHTMLEntity(position3) {
851
+ let codeOffset2 = position3;
852
+ if (ctx.code[codeOffset2++] !== "&")
853
+ return null;
854
+ let entity = "";
855
+ const entityDecoder = new import_decode.EntityDecoder(
856
+ import_decode.htmlDecodeTree,
857
+ (cp) => entity += String.fromCodePoint(cp)
858
+ );
859
+ entityDecoder.startEntity(import_decode.DecodingMode.Attribute);
860
+ const length = entityDecoder.write(ctx.code, codeOffset2);
861
+ if (length < 0) {
862
+ return null;
863
+ }
864
+ if (length === 0) {
865
+ return null;
866
+ }
867
+ return {
868
+ entity,
869
+ length
870
+ };
871
+ }
872
+ }
801
873
  }
802
874
  function skipSpaces(string, position) {
803
875
  const re = /\s*/g;
@@ -894,6 +966,10 @@ var RestoreNodeProcessContext = class {
894
966
  getParent(node) {
895
967
  return this.nodeMap.get(node) || null;
896
968
  }
969
+ findToken(startIndex) {
970
+ const tokens = this.result.ast.tokens || [];
971
+ return tokens.find((t) => t.range[0] === startIndex) || null;
972
+ }
897
973
  };
898
974
  var RestoreContext = class {
899
975
  constructor(ctx) {
@@ -1201,7 +1277,31 @@ function processTemplate(ctx, resultTemplate) {
1201
1277
  processAttributePunctuators(attr);
1202
1278
  }
1203
1279
  }
1204
- if (attr.kind === "shorthand") {
1280
+ if (attr.kind === "quoted") {
1281
+ if (attr.raw && !attr.raw.startsWith('"') && !attr.raw.startsWith("'")) {
1282
+ const attrStart = attr.position.start.offset;
1283
+ const start2 = calcAttributeValueStartOffset(attr, ctx);
1284
+ const end = calcAttributeEndOffset(attr, ctx);
1285
+ script.appendOriginal(start2);
1286
+ script.appendVirtualScript('"');
1287
+ script.appendOriginal(end);
1288
+ script.appendVirtualScript('"');
1289
+ script.restoreContext.addRestoreNodeProcess(
1290
+ (scriptNode, context) => {
1291
+ if (scriptNode.type === import_types.AST_NODE_TYPES.JSXAttribute && scriptNode.range[0] === attrStart) {
1292
+ const attrNode = scriptNode;
1293
+ if (attrNode.value?.type === "Literal" && typeof attrNode.value.value === "string") {
1294
+ const raw = ctx.code.slice(start2, end);
1295
+ attrNode.value.raw = raw;
1296
+ context.findToken(start2).value = raw;
1297
+ return true;
1298
+ }
1299
+ }
1300
+ return false;
1301
+ }
1302
+ );
1303
+ }
1304
+ } else if (attr.kind === "shorthand") {
1205
1305
  const start2 = attr.position.start.offset;
1206
1306
  script.appendOriginal(start2);
1207
1307
  const jsxName = /[\s"'[\]{}]/u.test(attr.name) ? generateUniqueId(attr.name) : attr.name;
@@ -2561,7 +2661,7 @@ __export(meta_exports, {
2561
2661
 
2562
2662
  // package.json
2563
2663
  var name = "astro-eslint-parser";
2564
- var version = "0.16.0";
2664
+ var version = "0.16.1";
2565
2665
 
2566
2666
  // src/index.ts
2567
2667
  function parseForESLint2(code, options) {
package/lib/index.mjs CHANGED
@@ -466,6 +466,13 @@ function sort(tokens) {
466
466
  // src/parser/process-template.ts
467
467
  import { AST_TOKEN_TYPES, AST_NODE_TYPES } from "@typescript-eslint/types";
468
468
 
469
+ // src/astro/index.ts
470
+ import {
471
+ EntityDecoder,
472
+ DecodingMode,
473
+ htmlDecodeTree
474
+ } from "entities/lib/decode.js";
475
+
469
476
  // src/errors.ts
470
477
  var ParseError = class extends SyntaxError {
471
478
  /**
@@ -545,7 +552,22 @@ function calcAttributeEndOffset(node, ctx) {
545
552
  } else if (node.kind === "quoted") {
546
553
  info = getTokenInfo(
547
554
  ctx,
548
- [[`"${node.value}"`, `'${node.value}'`, node.value]],
555
+ [
556
+ [
557
+ {
558
+ token: `"${node.value}"`,
559
+ htmlEntityDecode: true
560
+ },
561
+ {
562
+ token: `'${node.value}'`,
563
+ htmlEntityDecode: true
564
+ },
565
+ {
566
+ token: node.value,
567
+ htmlEntityDecode: true
568
+ }
569
+ ]
570
+ ],
549
571
  calcAttributeValueStartOffset(node, ctx)
550
572
  );
551
573
  } else if (node.kind === "expression") {
@@ -586,7 +608,11 @@ function calcAttributeValueStartOffset(node, ctx) {
586
608
  if (node.kind === "quoted") {
587
609
  info = getTokenInfo(
588
610
  ctx,
589
- [node.name, "=", [`"`, `'`, node.value]],
611
+ [
612
+ node.name,
613
+ "=",
614
+ [`"`, `'`, { token: node.value, htmlEntityDecode: true }]
615
+ ],
590
616
  node.position.start.offset
591
617
  );
592
618
  } else if (node.kind === "expression") {
@@ -736,7 +762,7 @@ function getTokenInfo(ctx, tokens, position) {
736
762
  let lastMatch;
737
763
  for (const t of tokens) {
738
764
  const index = lastMatch ? lastMatch.index + lastMatch.match.length : position;
739
- const m = typeof t === "string" ? matchOfStr(t, index) : matchOfForMulti(t, index);
765
+ const m = Array.isArray(t) ? matchOfForMulti(t, index) : match(t, index);
740
766
  if (m == null) {
741
767
  throw new ParseError(
742
768
  `Unknown token at ${index}, expected: ${JSON.stringify(
@@ -749,7 +775,8 @@ function getTokenInfo(ctx, tokens, position) {
749
775
  lastMatch = m;
750
776
  }
751
777
  return lastMatch;
752
- function matchOfStr(search, position2) {
778
+ function match(token, position2) {
779
+ const search = typeof token === "string" ? token : token.token;
753
780
  const index = search.trim() === search ? skipSpaces(ctx.code, position2) : position2;
754
781
  if (ctx.code.startsWith(search, index)) {
755
782
  return {
@@ -757,17 +784,66 @@ function getTokenInfo(ctx, tokens, position) {
757
784
  index
758
785
  };
759
786
  }
787
+ if (typeof token !== "string") {
788
+ return matchWithHTMLEntity(token, index);
789
+ }
760
790
  return null;
761
791
  }
762
792
  function matchOfForMulti(search, position2) {
763
793
  for (const s of search) {
764
- const m = matchOfStr(s, position2);
794
+ const m = match(s, position2);
765
795
  if (m) {
766
796
  return m;
767
797
  }
768
798
  }
769
799
  return null;
770
800
  }
801
+ function matchWithHTMLEntity(token, position2) {
802
+ const search = token.token;
803
+ let codeOffset = position2;
804
+ let searchOffset = 0;
805
+ while (searchOffset < search.length) {
806
+ const searchChar = search[searchOffset];
807
+ if (ctx.code[codeOffset] === searchChar) {
808
+ codeOffset++;
809
+ searchOffset++;
810
+ continue;
811
+ }
812
+ const entity = getHTMLEntity(codeOffset);
813
+ if (entity?.entity === searchChar) {
814
+ codeOffset += entity.length;
815
+ searchOffset++;
816
+ continue;
817
+ }
818
+ return null;
819
+ }
820
+ return {
821
+ match: ctx.code.slice(position2, codeOffset),
822
+ index: position2
823
+ };
824
+ function getHTMLEntity(position3) {
825
+ let codeOffset2 = position3;
826
+ if (ctx.code[codeOffset2++] !== "&")
827
+ return null;
828
+ let entity = "";
829
+ const entityDecoder = new EntityDecoder(
830
+ htmlDecodeTree,
831
+ (cp) => entity += String.fromCodePoint(cp)
832
+ );
833
+ entityDecoder.startEntity(DecodingMode.Attribute);
834
+ const length = entityDecoder.write(ctx.code, codeOffset2);
835
+ if (length < 0) {
836
+ return null;
837
+ }
838
+ if (length === 0) {
839
+ return null;
840
+ }
841
+ return {
842
+ entity,
843
+ length
844
+ };
845
+ }
846
+ }
771
847
  }
772
848
  function skipSpaces(string, position) {
773
849
  const re = /\s*/g;
@@ -864,6 +940,10 @@ var RestoreNodeProcessContext = class {
864
940
  getParent(node) {
865
941
  return this.nodeMap.get(node) || null;
866
942
  }
943
+ findToken(startIndex) {
944
+ const tokens = this.result.ast.tokens || [];
945
+ return tokens.find((t) => t.range[0] === startIndex) || null;
946
+ }
867
947
  };
868
948
  var RestoreContext = class {
869
949
  constructor(ctx) {
@@ -1171,7 +1251,31 @@ function processTemplate(ctx, resultTemplate) {
1171
1251
  processAttributePunctuators(attr);
1172
1252
  }
1173
1253
  }
1174
- if (attr.kind === "shorthand") {
1254
+ if (attr.kind === "quoted") {
1255
+ if (attr.raw && !attr.raw.startsWith('"') && !attr.raw.startsWith("'")) {
1256
+ const attrStart = attr.position.start.offset;
1257
+ const start2 = calcAttributeValueStartOffset(attr, ctx);
1258
+ const end = calcAttributeEndOffset(attr, ctx);
1259
+ script.appendOriginal(start2);
1260
+ script.appendVirtualScript('"');
1261
+ script.appendOriginal(end);
1262
+ script.appendVirtualScript('"');
1263
+ script.restoreContext.addRestoreNodeProcess(
1264
+ (scriptNode, context) => {
1265
+ if (scriptNode.type === AST_NODE_TYPES.JSXAttribute && scriptNode.range[0] === attrStart) {
1266
+ const attrNode = scriptNode;
1267
+ if (attrNode.value?.type === "Literal" && typeof attrNode.value.value === "string") {
1268
+ const raw = ctx.code.slice(start2, end);
1269
+ attrNode.value.raw = raw;
1270
+ context.findToken(start2).value = raw;
1271
+ return true;
1272
+ }
1273
+ }
1274
+ return false;
1275
+ }
1276
+ );
1277
+ }
1278
+ } else if (attr.kind === "shorthand") {
1175
1279
  const start2 = attr.position.start.offset;
1176
1280
  script.appendOriginal(start2);
1177
1281
  const jsxName = /[\s"'[\]{}]/u.test(attr.name) ? generateUniqueId(attr.name) : attr.name;
@@ -2534,7 +2638,7 @@ __export(meta_exports, {
2534
2638
 
2535
2639
  // package.json
2536
2640
  var name = "astro-eslint-parser";
2537
- var version = "0.16.0";
2641
+ var version = "0.16.1";
2538
2642
 
2539
2643
  // src/index.ts
2540
2644
  function parseForESLint2(code, options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "astro-eslint-parser",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "Astro component parser for ESLint",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.mjs",
@@ -53,12 +53,13 @@
53
53
  "@typescript-eslint/types": "^5.0.0",
54
54
  "astrojs-compiler-sync": "^0.3.0",
55
55
  "debug": "^4.3.4",
56
+ "entities": "^4.5.0",
56
57
  "eslint-visitor-keys": "^3.0.0",
57
58
  "espree": "^9.0.0",
58
59
  "semver": "^7.3.8"
59
60
  },
60
61
  "devDependencies": {
61
- "@changesets/changelog-github": "^0.4.6",
62
+ "@changesets/changelog-github": "^0.5.0",
62
63
  "@changesets/cli": "^2.24.2",
63
64
  "@ota-meshi/eslint-plugin": "^0.15.0",
64
65
  "@types/benchmark": "^2.1.1",
@@ -68,21 +69,21 @@
68
69
  "@types/eslint-scope": "^3.7.0",
69
70
  "@types/eslint-visitor-keys": "^1.0.0",
70
71
  "@types/mocha": "^10.0.0",
71
- "@types/node": "^18.0.0",
72
+ "@types/node": "^20.0.0",
72
73
  "@types/semver": "^7.3.9",
73
- "@typescript-eslint/eslint-plugin": "~6.7.0",
74
- "@typescript-eslint/parser": "~6.7.0",
75
- "astro": "^3.0.0",
74
+ "@typescript-eslint/eslint-plugin": "~6.18.0",
75
+ "@typescript-eslint/parser": "~6.18.0",
76
+ "astro": "^4.0.0",
76
77
  "astro-eslint-parser": ">=0.1.0",
77
78
  "benchmark": "^2.1.4",
78
- "chai": "^4.3.4",
79
+ "chai": "^5.0.0",
79
80
  "env-cmd": "^10.1.0",
80
81
  "esbuild": "^0.19.0",
81
82
  "esbuild-register": "^3.3.3",
82
83
  "eslint": "^8.15.0",
83
84
  "eslint-config-prettier": "^9.0.0",
84
85
  "eslint-formatter-codeframe": "^7.32.1",
85
- "eslint-plugin-astro": "^0.29.0",
86
+ "eslint-plugin-astro": "^0.31.0",
86
87
  "eslint-plugin-eslint-comments": "^3.2.0",
87
88
  "eslint-plugin-json-schema-validator": "^4.0.0",
88
89
  "eslint-plugin-jsonc": "^2.0.0",
@@ -91,7 +92,7 @@
91
92
  "eslint-plugin-node-dependencies": "^0.11.0",
92
93
  "eslint-plugin-prettier": "^5.0.0",
93
94
  "eslint-plugin-react": "^7.29.4",
94
- "eslint-plugin-regexp": "^1.5.0",
95
+ "eslint-plugin-regexp": "^2.0.0",
95
96
  "eslint-plugin-simple-import-sort": "^10.0.0",
96
97
  "eslint-plugin-svelte": "^2.0.0",
97
98
  "estree-walker": "^3.0.0",
@@ -106,8 +107,8 @@
106
107
  "prettier-plugin-svelte": "^3.0.0",
107
108
  "string-replace-loader": "^3.0.3",
108
109
  "svelte": "^4.0.0",
109
- "tsup": "^7.0.0",
110
- "typescript": "~5.2.0",
110
+ "tsup": "^8.0.0",
111
+ "typescript": "~5.3.0",
111
112
  "typescript-eslint-parser-for-extra-files": "^0.5.0"
112
113
  },
113
114
  "publishConfig": {