Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

detect jsx code in *.coffee file and convert to *.jsx file #28

Open
milahu opened this issue Aug 17, 2020 · 0 comments
Open

detect jsx code in *.coffee file and convert to *.jsx file #28

milahu opened this issue Aug 17, 2020 · 0 comments

Comments

@milahu
Copy link

milahu commented Aug 17, 2020

Expected behavior

when jsx code is present in a *.coffee file (yes it should be a *.cjsx file)
depercolate should write a *.jsx file

Observed behavior

*.coffee -> *.js
*.cjsx -> *.jsx

Steps to reproduce

depercolate file.coffee
the output is valid jsx code, just the file extension is wrong

file.coffee:

f = () ->
        <br/>

file.js (should be file.jsx):

const f = () => <br />;

Version

$ pnpm list -g depercolator
depercolator 0.5.0

Quickfix

node --check file.js || mv file.js file.jsx

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant