mirror of
https://github.com/ritz078/transform.git
synced 2026-11-28 03:44:22 +03:00
updated UI
This commit is contained in:
1 parent
8265bae04d
commit
a8733f83c8
8 files changed
+443
-200
No files matched your search
+6
-1
@@ -1,5 +1,10 @@
|
||||
import {uniqBy, isEmpty} from 'lodash'
|
||||
|
||||
/**
|
||||
* This is a babel plugin that converts an object to PropTypes
|
||||
* @param t
|
||||
* @returns {{visitor: {ArrayExpression: (function(*)), NullLiteral: (function(*)), StringLiteral: (function(*)), NumericLiteral: (function(*)), ArrowFunctionExpression: (function(*)), FunctionExpression: (function(*)), BooleanLiteral: (function(*)), Program: (function(*, *)), ObjectExpression: (function(*))}}}
|
||||
*/
|
||||
export default function ({types: t}) {
|
||||
return {
|
||||
visitor: {
|
||||
@@ -46,7 +51,7 @@ export default function ({types: t}) {
|
||||
path.replaceWith(t.identifier('PropTypes.bool'))
|
||||
},
|
||||
|
||||
Program(path, state) {
|
||||
Program(path) {
|
||||
path.traverse({
|
||||
enter(path) {
|
||||
t.removeComments(path.node);
|
||||
|
||||
Reference in new issue
Block a user