Skip to content

Commit 70a50fd

Browse files
Merge pull request #81 from oliviertassinari/revert-warning
fix(react-native): revert warning
2 parents 3a1789f + 79c66d1 commit 70a50fd

File tree

5 files changed

+0
-52
lines changed

5 files changed

+0
-52
lines changed

src/index.js

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -216,27 +216,6 @@ export default function ({ template, types }) {
216216
});
217217
}
218218
},
219-
MemberExpression(path) {
220-
const {
221-
node,
222-
scope,
223-
} = path;
224-
225-
if (node.property.name === 'propTypes') {
226-
const binding = scope.getBinding(node.object.name);
227-
228-
if (!binding) {
229-
return;
230-
}
231-
232-
if (['ImportDefaultSpecifier', 'ImportSpecifier'].indexOf(binding.path.node.type) !== -1) {
233-
throw path.buildCodeFrameError(
234-
'You are accessing the propTypes from an imported Identifier.\n' +
235-
'It\'s likely to break at runtime. Instead, import the propTypes.\n' +
236-
'For more details, have a look at this issue: https://goo.gl/sHDdUk.');
237-
}
238-
}
239-
},
240219
});
241220
},
242221
},

test/fixtures/wrong-pattern-1/actual.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

test/fixtures/wrong-pattern-1/options.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

test/fixtures/wrong-pattern-2/actual.js

Lines changed: 0 additions & 12 deletions
This file was deleted.

test/fixtures/wrong-pattern-2/options.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)