astro-eslint-parser 0.7.4 → 0.9.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.ts CHANGED
@@ -3,7 +3,7 @@ import { TSESTree } from '@typescript-eslint/types';
3
3
  import { ScopeManager } from 'eslint-scope';
4
4
  import { ParseResult } from '@astrojs/compiler';
5
5
  import { Node, AttributeNode, ParentNode } from '@astrojs/compiler/types';
6
- import { VisitorKeys as VisitorKeys$1 } from 'eslint-visitor-keys';
6
+ import { VisitorKeys as VisitorKeys$1 } from '@typescript-eslint/visitor-keys';
7
7
 
8
8
  declare type RangeAndLoc = {
9
9
  range: TSESTree.Range;
@@ -11,10 +11,11 @@ declare type RangeAndLoc = {
11
11
  };
12
12
  declare class Context {
13
13
  readonly code: string;
14
+ readonly filePath?: string;
14
15
  readonly locs: LinesAndColumns;
15
16
  private readonly locsMap;
16
17
  private readonly state;
17
- constructor(code: string);
18
+ constructor(code: string, filePath?: string);
18
19
  getLocFromIndex(index: number): {
19
20
  line: number;
20
21
  column: number;
@@ -293,7 +294,8 @@ declare function parseForESLint$1(code: string, options?: any): {
293
294
  ast: AstroProgram;
294
295
  services: Record<string, any> & {
295
296
  isAstro: true;
296
- getAstroAst: () => ParseResult;
297
+ getAstroAst: () => ParseResult["ast"];
298
+ getAstroResult: () => ParseResult;
297
299
  };
298
300
  visitorKeys: {
299
301
  [type: string]: string[];