Skip to content

Commit 7c9ab9c

Browse files
committed
Replace context.getSourceCode() with context.sourceCode
1 parent b41f03a commit 7c9ab9c

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

lib/rules/no-deprecated-v-bind-sync.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ module.exports = {
4141
return null
4242
}
4343

44-
const bindArgument = context
45-
.getSourceCode()
46-
.getText(node.key.argument)
44+
const bindArgument = context.sourceCode.getText(node.key.argument)
4745
return fixer.replaceText(node.key, `v-model:${bindArgument}`)
4846
}
4947
})

tests/lib/utils/selector.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ function extractElements(code, inputSelector) {
4545
VElement(node) {
4646
if (parsed.test(node)) {
4747
matches.push(
48-
context
49-
.getSourceCode()
50-
.text.slice(...node.startTag.range)
48+
context.sourceCode.text.slice(...node.startTag.range)
5149
)
5250
}
5351
}

0 commit comments

Comments
 (0)