Skip to content

Commit

Permalink
Fix jsx-no-undef with babel-eslint (fixes #30)
Browse files Browse the repository at this point in the history
  • Loading branch information
yannickcr committed Mar 25, 2015
1 parent 7e510e5 commit 7c004d3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/rules/jsx-no-undef.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ module.exports = function(context) {
}
if (scope.childScopes.length) {
variables = scope.childScopes[0].variables.concat(variables);
// Temporary fix for babel-eslint
if (scope.childScopes[0].childScopes.length) {
variables = scope.childScopes[0].childScopes[0].variables.concat(variables);
}
}

for (i = 0, len = variables.length; i < len; i++) {
Expand Down

0 comments on commit 7c004d3

Please sign in to comment.