Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.
This repository was 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

@milahu

Description

@milahu

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions