Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Commit

Permalink
Dont treat PropertyAssignments -> Indentifier as Flux Identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
jukben committed May 9, 2019
1 parent 47ba8b6 commit e74dac5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/rules/checkUnusedFluxDependenciesRule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ class NoUnusedDependenciesWalker extends Lint.RuleWalker {
if (
ts.isIdentifier(startNode) &&
!ts.isTypeReferenceNode(startNode.parent) &&
!ts.isPropertyAssignment(startNode.parent) &&
!ts.isPropertyAccessExpression(startNode.parent)
) {
const identifier = startNode.text;
Expand Down
7 changes: 7 additions & 0 deletions test/rules/check-unused-flux-dependencies/test.8.tsx.lint
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,10 @@ export default select([anotherSelect], () => {
magic: anotherSelect(),
}
})

export default select([anotherSelect], () => {
return {
show: "must go on",
magic: anotherSelect(),
}
})

0 comments on commit e74dac5

Please sign in to comment.