added immutable propTypes

This commit is contained in:
Ritesh Kumar committed 2017-08-31 18:39:39 +05:30
1 parent 4d768c77c9
commit 6a8290bbfc
2 files changed
+13

No files matched your search

@@ -68,6 +68,12 @@ export default function({ types: t }) {
path.replaceWith(t.identifier("PropTypes.bool"));
},
VariableDeclaration(path) {
path.insertBefore(t.identifier(`import ImmutablePropTypes from 'react-immutable-proptypes'
import PropTypes from 'prop-types
`))
},
Program(path) {
path.traverse({
enter(path) {
+7
View File
@@ -76,6 +76,13 @@ export default function({ types: t }) {
});
},
VariableDeclaration(path) {
path.insertBefore(t.identifier(
`import PropTypes from 'prop-types'
`))
},
ObjectExpression(path) {
if (
t.isVariableDeclarator(path.parent) ||