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/eslint-plugin-vue
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v9.20.0
Choose a base ref
...
head repository: vuejs/eslint-plugin-vue
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v9.20.1
Choose a head ref
  • 4 commits
  • 6 files changed
  • 2 contributors

Commits on Jan 11, 2024

  1. Copy the full SHA
    8ffcfb0 View commit details

Commits on Jan 12, 2024

  1. Copy the full SHA
    af7de76 View commit details

Commits on Jan 13, 2024

  1. Copy the full SHA
    ad2ffda View commit details
  2. 9.20.1

    ota-meshi committed Jan 13, 2024
    Copy the full SHA
    e7b87ff View commit details
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -26,6 +26,7 @@ about: Create a report to help us improve

- **ESLint version:**
- **eslint-plugin-vue version:**
- **Vue version:**
- **Node version:**
- **Operating System:**

1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/change.md
Original file line number Diff line number Diff line change
@@ -13,6 +13,7 @@ about: Request a change that is not a bug fix, rule change, or new rule

- **ESLint version:**
- **eslint-plugin-vue version:**
- **Vue version:**
- **Node version:**

**The problem you want to solve.**
15 changes: 1 addition & 14 deletions lib/rules/no-undef-properties.js
Original file line number Diff line number Diff line change
@@ -322,25 +322,12 @@ module.exports = {
propertyReferenceExtractor.extractFromPattern(pattern)
ctx.verifyReferences(propertyReferences)
},
onDefineModelEnter(node, model) {
onDefineModelEnter(_node, model) {
const ctx = getVueComponentContext(programNode)

ctx.defineProperties.set(model.name.modelName, {
isProps: true
})

if (
!node.parent ||
node.parent.type !== 'VariableDeclarator' ||
node.parent.init !== node
) {
return
}

const pattern = node.parent.id
const propertyReferences =
propertyReferenceExtractor.extractFromPattern(pattern)
ctx.verifyReferences(propertyReferences)
}
}),
utils.defineVueVisitor(context, {
11 changes: 0 additions & 11 deletions lib/utils/ref-object-references.js
Original file line number Diff line number Diff line change
@@ -147,17 +147,6 @@ function* iterateDefineModels(globalScope) {
}
}
}
const tracker = new ReferenceTracker(globalScope)
for (const { node } of tracker.iterateGlobalReferences({
defineModel: {
[ReferenceTracker.CALL]: true
}
})) {
const expr = /** @type {CallExpression} */ (node)
yield {
node: expr
}
}
}

/**
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-plugin-vue",
"version": "9.20.0",
"version": "9.20.1",
"description": "Official ESLint plugin for Vue.js",
"main": "lib/index.js",
"scripts": {
11 changes: 10 additions & 1 deletion tests/lib/rules/no-undef-properties.js
Original file line number Diff line number Diff line change
@@ -558,7 +558,16 @@ tester.run('no-undef-properties', rule, {
parserOptions: {
parser: require.resolve('@typescript-eslint/parser')
}
}
},

`
<script setup>
const model = defineModel();
const woof = computed(() => model.value);
</script>
<template>
<div id="app">Woof: {{ woof }}</div>
</template>`
],

invalid: [