File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed
Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,15 @@ module.exports = {
2727 // Public
2828 // --------------------------------------------------------------------------
2929
30+ let calleeObjectName = / ^ R e a c t D O M $ / ;
31+ if ( versionUtil . testReactVersion ( context , '15.0.0' ) ) {
32+ calleeObjectName = / ^ R e a c t D O M $ / ;
33+ } else if ( versionUtil . testReactVersion ( context , '0.14.0' ) ) {
34+ calleeObjectName = / ^ R e a c t ( D O M ) ? $ / ;
35+ } else if ( versionUtil . testReactVersion ( context , '0.13.0' ) ) {
36+ calleeObjectName = / ^ R e a c t $ / ;
37+ }
38+
3039 return {
3140
3241 CallExpression : function ( node ) {
@@ -36,15 +45,6 @@ module.exports = {
3645 return ;
3746 }
3847
39- let calleeObjectName = / ^ R e a c t D O M $ / ;
40- if ( versionUtil . testReactVersion ( context , '15.0.0' ) ) {
41- calleeObjectName = / ^ R e a c t D O M $ / ;
42- } else if ( versionUtil . testReactVersion ( context , '0.14.0' ) ) {
43- calleeObjectName = / ^ R e a c t ( D O M ) ? $ / ;
44- } else if ( versionUtil . testReactVersion ( context , '0.13.0' ) ) {
45- calleeObjectName = / ^ R e a c t $ / ;
46- }
47-
4848 if (
4949 callee . object . type !== 'Identifier' ||
5050 ! calleeObjectName . test ( callee . object . name ) ||
You can’t perform that action at this time.
0 commit comments