babel-plugin-react-test-id
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -7,3 +7,3 @@ 'use strict'; | ||
exports.default = babelPluginReactTestID; | ||
var DEFAULT_PROPS = ['testID']; | ||
const DEFAULT_PROPS = ['testID']; | ||
@@ -14,7 +14,4 @@ function babelPluginReactTestID() { | ||
visitor: { | ||
JSXAttribute(path, _ref) { | ||
var _ref$opts$props = _ref.opts.props, | ||
props = _ref$opts$props === undefined ? DEFAULT_PROPS : _ref$opts$props; | ||
var name = path.get('name'); | ||
JSXAttribute(path, { opts: { props = DEFAULT_PROPS } }) { | ||
const name = path.get('name'); | ||
if (name.isJSXIdentifier() && props.includes(name.node.name)) { | ||
@@ -21,0 +18,0 @@ path.remove(); |
{ | ||
"name": "babel-plugin-react-test-id", | ||
"description": "Babel plugin for dealing with test ID props in your components", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"main": "lib/index.js", | ||
@@ -32,3 +32,3 @@ "author": "Chris Sauve <chrismsauve@gmail.com>", | ||
{ | ||
"version": "4.0.0" | ||
"version": "6.0.0" | ||
} | ||
@@ -35,0 +35,0 @@ ] |
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
2762
4
20