Skip to content

Commit 8bef6fc

Browse files
authored
update @ota-meshi/ast-token-store to v0.3.0 (#484)
1 parent 64a85fc commit 8bef6fc

3 files changed

Lines changed: 20 additions & 15 deletions

File tree

.changeset/sixty-lamps-press.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-jsonc": patch
3+
---
4+
5+
update `@ota-meshi/ast-token-store` to v0.3.0

lib/language/jsonc-source-code.ts

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ export class JSONCSourceCode extends TextSourceCodeBase<{
378378
| CursorWithSkipOptionsWithFilter<JSONCToken>
379379
| CursorWithSkipOptionsWithComment<JSONCToken, JSONCComment>,
380380
): JSONCToken | JSONCComment | null {
381-
return this.tokenStore.getFirstToken(node, options as never);
381+
return this.tokenStore.getFirstToken(node, options);
382382
}
383383

384384
/**
@@ -412,7 +412,7 @@ export class JSONCSourceCode extends TextSourceCodeBase<{
412412
| CursorWithCountOptionsWithFilter<JSONCToken>
413413
| CursorWithCountOptionsWithComment<JSONCToken, JSONCComment>,
414414
): (JSONCToken | JSONCComment)[] {
415-
return this.tokenStore.getFirstTokens(node, options as never);
415+
return this.tokenStore.getFirstTokens(node, options);
416416
}
417417

418418
/**
@@ -451,7 +451,7 @@ export class JSONCSourceCode extends TextSourceCodeBase<{
451451
| CursorWithSkipOptionsWithFilter<JSONCToken>
452452
| CursorWithSkipOptionsWithComment<JSONCToken, JSONCComment>,
453453
): (JSONCToken | JSONCComment) | null {
454-
return this.tokenStore.getLastToken(node, options as never);
454+
return this.tokenStore.getLastToken(node, options);
455455
}
456456

457457
/**
@@ -485,7 +485,7 @@ export class JSONCSourceCode extends TextSourceCodeBase<{
485485
| CursorWithCountOptionsWithFilter<JSONCToken>
486486
| CursorWithCountOptionsWithComment<JSONCToken, JSONCComment>,
487487
): (JSONCToken | JSONCComment)[] {
488-
return this.tokenStore.getLastTokens(node, options as never);
488+
return this.tokenStore.getLastTokens(node, options);
489489
}
490490

491491
/**
@@ -519,7 +519,7 @@ export class JSONCSourceCode extends TextSourceCodeBase<{
519519
| CursorWithSkipOptionsWithFilter<JSONCToken>
520520
| CursorWithSkipOptionsWithComment<JSONCToken, JSONCComment>,
521521
): JSONCToken | JSONCComment | null {
522-
return this.tokenStore.getTokenBefore(node, options as never);
522+
return this.tokenStore.getTokenBefore(node, options);
523523
}
524524

525525
/**
@@ -553,7 +553,7 @@ export class JSONCSourceCode extends TextSourceCodeBase<{
553553
| CursorWithCountOptionsWithFilter<JSONCToken>
554554
| CursorWithCountOptionsWithComment<JSONCToken, JSONCComment>,
555555
): (JSONCToken | JSONCComment)[] {
556-
return this.tokenStore.getTokensBefore(node, options as never);
556+
return this.tokenStore.getTokensBefore(node, options);
557557
}
558558

559559
/**
@@ -587,7 +587,7 @@ export class JSONCSourceCode extends TextSourceCodeBase<{
587587
| CursorWithSkipOptionsWithFilter<JSONCToken>
588588
| CursorWithSkipOptionsWithComment<JSONCToken, JSONCComment>,
589589
): JSONCToken | JSONCComment | null {
590-
return this.tokenStore.getTokenAfter(node, options as never);
590+
return this.tokenStore.getTokenAfter(node, options);
591591
}
592592

593593
/**
@@ -621,7 +621,7 @@ export class JSONCSourceCode extends TextSourceCodeBase<{
621621
| CursorWithCountOptionsWithFilter<JSONCToken>
622622
| CursorWithCountOptionsWithComment<JSONCToken, JSONCComment>,
623623
): (JSONCToken | JSONCComment)[] {
624-
return this.tokenStore.getTokensAfter(node, options as never);
624+
return this.tokenStore.getTokensAfter(node, options);
625625
}
626626

627627
/**
@@ -659,7 +659,7 @@ export class JSONCSourceCode extends TextSourceCodeBase<{
659659
| CursorWithSkipOptionsWithFilter<JSONCToken>
660660
| CursorWithSkipOptionsWithComment<JSONCToken, JSONCComment>,
661661
): JSONCToken | JSONCComment | null {
662-
return this.tokenStore.getFirstTokenBetween(left, right, options as never);
662+
return this.tokenStore.getFirstTokenBetween(left, right, options);
663663
}
664664

665665
/**
@@ -697,7 +697,7 @@ export class JSONCSourceCode extends TextSourceCodeBase<{
697697
| CursorWithCountOptionsWithFilter<JSONCToken>
698698
| CursorWithCountOptionsWithComment<JSONCToken, JSONCComment>,
699699
): (JSONCToken | JSONCComment)[] {
700-
return this.tokenStore.getFirstTokensBetween(left, right, options as never);
700+
return this.tokenStore.getFirstTokensBetween(left, right, options);
701701
}
702702

703703
/**
@@ -735,7 +735,7 @@ export class JSONCSourceCode extends TextSourceCodeBase<{
735735
| CursorWithSkipOptionsWithFilter<JSONCToken>
736736
| CursorWithSkipOptionsWithComment<JSONCToken, JSONCComment>,
737737
): JSONCToken | JSONCComment | null {
738-
return this.tokenStore.getLastTokenBetween(left, right, options as never);
738+
return this.tokenStore.getLastTokenBetween(left, right, options);
739739
}
740740

741741
/**
@@ -773,7 +773,7 @@ export class JSONCSourceCode extends TextSourceCodeBase<{
773773
| CursorWithCountOptionsWithFilter<JSONCToken>
774774
| CursorWithCountOptionsWithComment<JSONCToken, JSONCComment>,
775775
): (JSONCToken | JSONCComment)[] {
776-
return this.tokenStore.getLastTokensBetween(left, right, options as never);
776+
return this.tokenStore.getLastTokensBetween(left, right, options);
777777
}
778778

779779
/**
@@ -807,7 +807,7 @@ export class JSONCSourceCode extends TextSourceCodeBase<{
807807
| CursorWithCountOptionsWithFilter<JSONCToken>
808808
| CursorWithCountOptionsWithComment<JSONCToken, JSONCComment>,
809809
): (JSONCToken | JSONCComment)[] {
810-
return this.tokenStore.getTokens(node, options as never);
810+
return this.tokenStore.getTokens(node, options);
811811
}
812812

813813
/**
@@ -845,7 +845,7 @@ export class JSONCSourceCode extends TextSourceCodeBase<{
845845
| CursorWithCountOptionsWithFilter<JSONCToken>
846846
| CursorWithCountOptionsWithComment<JSONCToken, JSONCComment>,
847847
): (JSONCToken | JSONCComment)[] {
848-
return this.tokenStore.getTokensBetween(left, right, options as never);
848+
return this.tokenStore.getTokensBetween(left, right, options);
849849
}
850850

851851
public getCommentsInside(nodeOrToken: JSONCSyntaxElement): JSONCComment[] {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"@eslint-community/eslint-utils": "^4.5.1",
6969
"@eslint/core": "^1.0.1",
7070
"@eslint/plugin-kit": "^0.6.0",
71-
"@ota-meshi/ast-token-store": "^0.2.1",
71+
"@ota-meshi/ast-token-store": "^0.3.0",
7272
"diff-sequences": "^29.6.3",
7373
"eslint-json-compat-utils": "^0.2.1",
7474
"jsonc-eslint-parser": "^3.1.0",

0 commit comments

Comments
 (0)