babel-plugin-transform-react-remove-prop-types
Advanced tools
Comparing version 0.2.9 to 0.2.10
@@ -154,3 +154,2 @@ 'use strict'; | ||
var types = options.types; | ||
var pathClassDeclaration = options.pathClassDeclaration; | ||
@@ -176,2 +175,3 @@ | ||
var ref = void 0; | ||
var pathClassDeclaration = options.pathClassDeclaration; | ||
@@ -187,3 +187,8 @@ if (!pathClassDeclaration.isClassExpression() && pathClassDeclaration.node.id) { | ||
// We need to append the node at the parent level in this case. | ||
if (pathClassDeclaration.parentPath.isExportDeclaration()) { | ||
pathClassDeclaration = pathClassDeclaration.parentPath; | ||
} | ||
pathClassDeclaration.insertAfter(node); | ||
path.remove(); | ||
@@ -190,0 +195,0 @@ break; |
{ | ||
"name": "babel-plugin-transform-react-remove-prop-types", | ||
"version": "0.2.9", | ||
"version": "0.2.10", | ||
"description": "Remove unnecessary React propTypes from the production build", | ||
@@ -32,22 +32,25 @@ "main": "lib/index.js", | ||
}, | ||
"files": [ | ||
"lib", | ||
"src" | ||
], | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"babel-cli": "^6.11.4", | ||
"babel-core": "^6.11.4", | ||
"babel-eslint": "^6.1.2", | ||
"babel-preset-es2015": "^6.6.0", | ||
"babel-cli": "^6.14.0", | ||
"babel-core": "^6.14.0", | ||
"babel-eslint": "^7.0.0", | ||
"babel-preset-es2015": "^6.14.0", | ||
"babel-preset-react": "^6.11.1", | ||
"babel-preset-stage-0": "^6.3.13", | ||
"eslint": "^3.1.1", | ||
"eslint-plugin-flowtype": "^2.4.0", | ||
"eslint-plugin-mocha": "^4.2.0", | ||
"eslint-plugin-react": "^5.0.1", | ||
"flow": "^0.2.3", | ||
"flow-bin": "^0.30.0", | ||
"glob": "^7.0.5", | ||
"istanbul": "^0.4.2", | ||
"eslint": "^3.4.0", | ||
"eslint-plugin-flowtype": "^2.14.3", | ||
"eslint-plugin-import": "^2.0.0", | ||
"eslint-plugin-mocha": "^4.5.1", | ||
"eslint-plugin-react": "^6.2.0", | ||
"flow-bin": "^0.33.0", | ||
"glob": "^7.0.6", | ||
"minimist": "^1.2.0", | ||
"mocha": "^2.2.5", | ||
"nodemon": "^1.10.0" | ||
"mocha": "^3.0.2", | ||
"nodemon": "^1.10.2" | ||
} | ||
} |
@@ -46,3 +46,2 @@ // @flow weak | ||
types, | ||
pathClassDeclaration, | ||
} = options; | ||
@@ -68,2 +67,3 @@ | ||
let ref; | ||
let pathClassDeclaration = options.pathClassDeclaration; | ||
@@ -81,3 +81,8 @@ if (!pathClassDeclaration.isClassExpression() && pathClassDeclaration.node.id) { | ||
// We need to append the node at the parent level in this case. | ||
if (pathClassDeclaration.parentPath.isExportDeclaration()) { | ||
pathClassDeclaration = pathClassDeclaration.parentPath; | ||
} | ||
pathClassDeclaration.insertAfter(node); | ||
path.remove(); | ||
@@ -84,0 +89,0 @@ break; |
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
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
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
16
17848
7
473
1
0