Skip to content

ericyang321/babel-plugin-transform-rtag-to-jsx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

babel-plugin-transform-react-createelement-to-jsx

Overview

Turn rtag calls back into JSX syntax. Uses decaffeinate, jsx-control-statements, esformatter, esformatter-jsx, react-codemod. Note we use a specific version of react-codemod so that we don't depend on es7 stage1 class-property-initializers.

BUILD

npm install
npm run build:lib
npm run build:mod

TEST

npm test

Running

npm run convert -- <src> [dst] --prettier --classify --inplace --eslintrc
npm run convert -- <src> [dst] -p -c -i -e

prettier makes things prettier
classify convert to es5 classes, but also uses unsupported es-next properties.
inplace reuse src file name, but change extension to jsx.
eslintrc file to use for auto fixes.

About

↩️ Transforms rtag calls to JSX syntax

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%