@@ -54,16 +54,15 @@ const DUMMY_PARENT: any = {}
54
54
// Like Vue, it judges whether it is a function expression or not.
55
55
// https://github.com/vuejs/vue/blob/0948d999f2fddf9f90991956493f976273c5da1f/src/compiler/codegen/events.js#L3
56
56
const IS_FUNCTION_EXPRESSION = / ^ \s * ( [ \w $ _ ] + | \( [ ^ ) ] * ?\) ) \s * = > | ^ f u n c t i o n \s * \( / u
57
- const IS_SIMPLE_PATH = / ^ [ A - Z a - z _ $ ] [ \w $ ] * (?: \. [ A - Z a - z _ $ ] [ \w $ ] * | \[ ' [ ^ ' ] * ?' \] | \[ " [ ^ " ] * ?" \] | \[ \d + \] | \[ [ A - Z a - z _ $ ] [ \w $ ] * \] ) * $ / u
57
+ const IS_SIMPLE_PATH =
58
+ / ^ [ A - Z a - z _ $ ] [ \w $ ] * (?: \. [ A - Z a - z _ $ ] [ \w $ ] * | \[ ' [ ^ ' ] * ?' \] | \[ " [ ^ " ] * ?" \] | \[ \d + \] | \[ [ A - Z a - z _ $ ] [ \w $ ] * \] ) * $ / u
58
59
59
60
/**
60
61
* Parse the alias and iterator of 'v-for' directive values.
61
62
* @param code The code to parse.
62
63
* @returns The parsed result.
63
64
*/
64
- function processVForAliasAndIterator (
65
- code : string ,
66
- ) : {
65
+ function processVForAliasAndIterator ( code : string ) : {
67
66
aliases : string
68
67
hasParens : boolean
69
68
delimiter : string
@@ -555,9 +554,8 @@ export function parseScriptElement(
555
554
? text . range [ 0 ]
556
555
: node . startTag . range [ 1 ]
557
556
const code = text != null && text . type === "VText" ? text . value : ""
558
- const locationCalculator = globalLocationCalculator . getSubCalculatorAfter (
559
- offset ,
560
- )
557
+ const locationCalculator =
558
+ globalLocationCalculator . getSubCalculatorAfter ( offset )
561
559
const result = parseScriptFragment ( code , locationCalculator , parserOptions )
562
560
563
561
// Needs the tokens of start/end tags for `lines-around-*` rules to work
@@ -624,7 +622,8 @@ export function parseExpression(
624
622
if ( ! retB . expression ) {
625
623
return retB
626
624
}
627
- const ret = ( retB as unknown ) as ExpressionParseResult < VFilterSequenceExpression >
625
+ const ret =
626
+ retB as unknown as ExpressionParseResult < VFilterSequenceExpression >
628
627
629
628
ret . expression = {
630
629
type : "VFilterSequenceExpression" ,
@@ -1012,8 +1011,9 @@ function parseVOnExpressionBody(
1012
1011
) . ast
1013
1012
const references = analyzeExternalReferences ( ast , parserOptions )
1014
1013
const outermostStatement = ast . body [ 0 ] as ESLintExpressionStatement
1015
- const functionDecl = ( outermostStatement . expression as ESLintUnaryExpression )
1016
- . argument as ESLintFunctionExpression
1014
+ const functionDecl = (
1015
+ outermostStatement . expression as ESLintUnaryExpression
1016
+ ) . argument as ESLintFunctionExpression
1017
1017
const block = functionDecl . body
1018
1018
const body = block . body
1019
1019
const firstStatement = first ( body )
0 commit comments