Skip to content

Commit 0d49b24

Browse files
authored
Merge branch 'master' into refactor/cycle
2 parents 1fda8c2 + 76c51ac commit 0d49b24

File tree

109 files changed

+216
-242
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+216
-242
lines changed

.changeset/rich-bags-turn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"eslint-plugin-vue": patch
3+
---
4+
5+
Fixed false positives for `TSImportType` in `vue/script-indent` rule

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# eslint-plugin-vue
22

3+
## 10.6.1
4+
5+
### Patch Changes
6+
7+
- Fixed false positives for comments outside `<template>` in [`vue/no-multiple-template-root`](https://eslint.vuejs.org/rules/no-multiple-template-root.html) rule ([#2964](https://github.com/vuejs/eslint-plugin-vue/pull/2964))
8+
39
## 10.6.0
410

511
### Minor Changes

docs/.vitepress/build-system/build.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ build(
2323
'node:fs',
2424
'semver',
2525
'fast-glob',
26+
'tinyglobby',
2627
'debug'
2728
]
2829
)

docs/.vitepress/config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ export default async () => {
162162
tslib: path.join(dirname, '../../node_modules/tslib/tslib.es6.js'),
163163
globby: path.join(dirname, './build-system/shim/empty.mjs'),
164164
'fast-glob': path.join(dirname, './build-system/shim/empty.mjs'),
165+
tinyglobby: path.join(dirname, './build-system/shim/empty.mjs'),
165166
module: path.join(dirname, './build-system/shim/empty.mjs')
166167
}
167168
},

lib/rules/attribute-hyphenation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ module.exports = {
7575
},
7676
/** @param {RuleContext} context */
7777
create(context) {
78-
const sourceCode = context.getSourceCode()
78+
const sourceCode = context.sourceCode
7979
const option = context.options[0]
8080
const optionsPayload = context.options[1]
8181
const useHyphenated = option !== 'never'

lib/rules/attributes-order.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ function isAlphabetical(prevNode, currNode, sourceCode) {
222222
* @returns {RuleListener} AST event handlers.
223223
*/
224224
function create(context) {
225-
const sourceCode = context.getSourceCode()
225+
const sourceCode = context.sourceCode
226226
const otherAttrs = [
227227
ATTRS.ATTR_DYNAMIC,
228228
ATTRS.ATTR_STATIC,

lib/rules/block-order.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ module.exports = {
106106
function getOrderElement(element) {
107107
return orders.find((o) => o.selector.test(element))
108108
}
109-
const sourceCode = context.getSourceCode()
109+
const sourceCode = context.sourceCode
110110
const documentFragment =
111111
sourceCode.parserServices.getDocumentFragment &&
112112
sourceCode.parserServices.getDocumentFragment()
@@ -129,7 +129,6 @@ module.exports = {
129129
const order = getOrderElement(element)
130130
return order ? [{ order, element }] : []
131131
})
132-
const sourceCode = context.getSourceCode()
133132
for (const [index, elementWithOrders] of elementsWithOrder.entries()) {
134133
const { order: expected, element } = elementWithOrders
135134
const firstUnordered = elementsWithOrder

lib/rules/block-tag-newline.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ module.exports = {
8484
},
8585
/** @param {RuleContext} context */
8686
create(context) {
87-
const sourceCode = context.getSourceCode()
87+
const sourceCode = context.sourceCode
8888
const df =
8989
sourceCode.parserServices.getDocumentFragment &&
9090
sourceCode.parserServices.getDocumentFragment()

lib/rules/comment-directive.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ function reportUnused(context, comment, kind) {
214214
* @returns { { ruleId: string, key: string }[] }
215215
*/
216216
function reportUnusedRules(context, comment, kind, rules) {
217-
const sourceCode = context.getSourceCode()
217+
const sourceCode = context.sourceCode
218218
const commentStart = comment.range[0] + 4 /* <!-- */
219219

220220
return rules.map((rule) => {
@@ -313,7 +313,7 @@ module.exports = {
313313
const options = context.options[0] || {}
314314
/** @type {boolean} */
315315
const reportUnusedDisableDirectives = options.reportUnusedDisableDirectives
316-
const sourceCode = context.getSourceCode()
316+
const sourceCode = context.sourceCode
317317
const documentFragment =
318318
sourceCode.parserServices.getDocumentFragment &&
319319
sourceCode.parserServices.getDocumentFragment()

lib/rules/component-name-in-template-casing.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ module.exports = {
9595

9696
const isGlobalPattern = toRegExpGroupMatcher(globalPatterns)
9797
const registeredComponentsOnly = options.registeredComponentsOnly !== false
98-
const sourceCode = context.getSourceCode()
98+
const sourceCode = context.sourceCode
9999
const tokens =
100100
sourceCode.parserServices.getTemplateBodyTokenStore &&
101101
sourceCode.parserServices.getTemplateBodyTokenStore()
@@ -105,7 +105,7 @@ module.exports = {
105105

106106
if (utils.isScriptSetup(context)) {
107107
// For <script setup>
108-
const globalScope = context.getSourceCode().scopeManager.globalScope
108+
const globalScope = context.sourceCode.scopeManager.globalScope
109109
if (globalScope) {
110110
// Only check find the import module
111111
const moduleScope = globalScope.childScopes.find(

0 commit comments

Comments
 (0)