Skip to content

Commit 9ed7aa9

Browse files
committed
exclude variables in .vue files form js/unused-local-variable
1 parent 3bacb18 commit 9ed7aa9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

javascript/ql/src/Declarations/UnusedVariable.ql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,9 @@ predicate whitelisted(UnusedLocal v) {
144144
// exclude variables mentioned in JSDoc comments in externs
145145
mentionedInJSDocComment(v)
146146
or
147+
// the attributes in .vue files are not extracted, so we can get false positives in those.
148+
v.getADeclaration().getFile().getExtension() = "vue"
149+
or
147150
// exclude variables used to filter out unwanted properties
148151
isPropertyFilter(v)
149152
or

0 commit comments

Comments
 (0)