7
7
//------------------------------------------------------------------------------
8
8
9
9
import type { ESLint , Rule } from "eslint"
10
- import type { VElement } from "../src/ast"
10
+ import type { Location , VElement } from "../src/ast"
11
11
import type { CustomBlockContext } from "../src/sfc/custom-block"
12
12
import { assert , describe , it } from "vitest"
13
13
import { Linter } from "eslint"
14
14
import { builtinRules } from "eslint/use-at-your-own-risk"
15
15
import jsonParser from "jsonc-eslint-parser"
16
- // @ts -expect-error -- ignore
17
16
import * as espree from "espree"
18
17
import * as parser from "../src"
19
18
import type { Program } from "estree"
@@ -55,7 +54,7 @@ const noParsingErrorRule: Rule.RuleModule = {
55
54
create ( context ) {
56
55
const parseError = context . getSourceCode ( ) . parserServices . parseError
57
56
if ( parseError ) {
58
- let loc = undefined
57
+ let loc : Location | undefined = undefined
59
58
if ( "column" in parseError && "lineNumber" in parseError ) {
60
59
loc = {
61
60
line : parseError . lineNumber ,
@@ -79,7 +78,7 @@ const noParsingErrorRule2: Rule.RuleModule = {
79
78
create ( context : any ) {
80
79
const parseError = context . parserServices . parseError
81
80
if ( parseError ) {
82
- let loc = undefined
81
+ let loc : Location | undefined = undefined
83
82
if ( "column" in parseError && "lineNumber" in parseError ) {
84
83
loc = {
85
84
line : parseError . lineNumber ,
0 commit comments