Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: vuejs/vue-eslint-parser
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v10.1.1
Choose a base ref
...
head repository: vuejs/vue-eslint-parser
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v10.1.2
Choose a head ref
  • 3 commits
  • 7 files changed
  • 4 contributors

Commits on Apr 1, 2025

  1. Update README.md (#259)

    javag97 authored Apr 1, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    5712b7f View commit details

Commits on Apr 4, 2025

  1. fix: reset vExpressionScriptState when ending mustache (#256)

    Co-authored-by: Woongsik Choi <[email protected]>
    woongsikchoi and ws807 authored Apr 4, 2025
    Copy the full SHA
    32056bc View commit details
  2. 10.1.2

    ota-meshi committed Apr 4, 2025
    Copy the full SHA
    4ddeeef View commit details
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -260,6 +260,7 @@ See [implementing-custom-template-tokenizers.md](./docs/implementing-custom-temp
- `defineDocumentVisitor(documentVisitor, options)` ... returns ESLint visitor to traverses the document.
- [ast.md](./docs/ast.md) is `<template>` AST specification.
- [mustache-interpolation-spacing.js](https://github.com/vuejs/eslint-plugin-vue/blob/b434ff99d37f35570fa351681e43ba2cf5746db3/lib/rules/mustache-interpolation-spacing.js) is an example.
- Check your version of ESLint as the location of `defineTemplateBodyVisitor` was moved from `context` to `context.sourceCode` after major version `9.x`

### `defineTemplateBodyVisitor(templateBodyVisitor, scriptVisitor, options)`

@@ -274,7 +275,7 @@ See [implementing-custom-template-tokenizers.md](./docs/implementing-custom-temp
import { AST } from "vue-eslint-parser"

export function create(context) {
return context.parserServices.defineTemplateBodyVisitor(
return context.sourceCode.parserServices.defineTemplateBodyVisitor(
// Event handlers for <template>.
{
VElement(node: AST.VElement): void {
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-eslint-parser",
"version": "10.1.1",
"version": "10.1.2",
"description": "The ESLint custom parser for `.vue` files.",
"main": "index.js",
"files": [
9 changes: 6 additions & 3 deletions src/html/tokenizer.ts
Original file line number Diff line number Diff line change
@@ -1942,9 +1942,12 @@ export class Tokenizer {
this.startToken("VExpressionEnd")
this.appendTokenValue(RIGHT_CURLY_BRACKET, null)
this.appendTokenValue(RIGHT_CURLY_BRACKET, null)
return this.vExpressionScriptState
? this.vExpressionScriptState.state
: this.returnState
if (this.vExpressionScriptState) {
const state = this.vExpressionScriptState.state
this.vExpressionScriptState = null
return state
}
return this.returnState
}

this.appendTokenValue(RIGHT_CURLY_BRACKET, null)
Loading