Merge pull request #9794 from erik-krogh/unusedVue

JS: exclude variables in .vue files form js/unused-local-variable
This commit is contained in:
Erik Krogh Kristensen
2022-07-14 10:57:06 +02:00
committed by GitHub

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