@wordpress/babel-plugin-import-jsx-pragma
Advanced tools
Comparing version 2.4.0 to 2.5.0
19
index.js
@@ -51,3 +51,5 @@ /** | ||
const { scopeVariable } = getOptions( state ); | ||
state.hasUndeclaredScopeVariable = ! path.scope.hasBinding( scopeVariable ); | ||
state.hasUndeclaredScopeVariable = ! path.scope.hasBinding( | ||
scopeVariable | ||
); | ||
}, | ||
@@ -64,7 +66,14 @@ JSXFragment( path, state ) { | ||
state.hasUndeclaredScopeVariableFrag = ! path.scope.hasBinding( scopeVariableFrag ); | ||
state.hasUndeclaredScopeVariableFrag = ! path.scope.hasBinding( | ||
scopeVariableFrag | ||
); | ||
}, | ||
Program: { | ||
exit( path, state ) { | ||
const { scopeVariable, scopeVariableFrag, source, isDefault } = getOptions( state ); | ||
const { | ||
scopeVariable, | ||
scopeVariableFrag, | ||
source, | ||
isDefault, | ||
} = getOptions( state ); | ||
@@ -76,3 +85,5 @@ let scopeVariableSpecifier; | ||
if ( isDefault ) { | ||
scopeVariableSpecifier = t.importDefaultSpecifier( t.identifier( scopeVariable ) ); | ||
scopeVariableSpecifier = t.importDefaultSpecifier( | ||
t.identifier( scopeVariable ) | ||
); | ||
} else { | ||
@@ -79,0 +90,0 @@ scopeVariableSpecifier = t.importSpecifier( |
{ | ||
"name": "@wordpress/babel-plugin-import-jsx-pragma", | ||
"version": "2.4.0", | ||
"version": "2.5.0", | ||
"description": "Babel transform plugin for automatically injecting an import to be used as the pragma for the React JSX Transform plugin.", | ||
@@ -36,3 +36,3 @@ "author": "The WordPress Contributors", | ||
}, | ||
"gitHead": "3e867dd7c6560e4b2cb9a59cc02856e055be6142" | ||
"gitHead": "41fc84af285da696c65c235331ee245dfe23971d" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27346
105