exclude variables in .vue files form js/unused-local-variable

This commit is contained in:
Erik Krogh Kristensen
2022-07-11 12:52:23 +02:00
parent 3bacb18315
commit 9ed7aa9fae

View File

@@ -144,6 +144,9 @@ predicate whitelisted(UnusedLocal v) {
// exclude variables mentioned in JSDoc comments in externs
mentionedInJSDocComment(v)
or
// the attributes in .vue files are not extracted, so we can get false positives in those.
v.getADeclaration().getFile().getExtension() = "vue"
or
// exclude variables used to filter out unwanted properties
isPropertyFilter(v)
or