royriojas / esformatter-jsx

esformatter plugin: format jsx files (or js files with Facebook React JSX Syntax)
MIT License
142 stars 25 forks source link

">>> undefined" appears in CLI output when using this plugin #92

Closed bigfish closed 7 years ago

bigfish commented 7 years ago

having installed esformatter and esformatter-jsx globally, when I run the command

esformatter --plugins esformatter-jsx Foo.js

It formats appropriately, except I get output:

undefined undefined import React, { PropTypes } from 'react'; import { reduxForm, change } from 'redux-form'; ...

I have this no .esformatter file or other configuration. Using Mac OS X , iterm2, bash, node 5.

Any help appreciated, otherwise it works great.

bigfish commented 7 years ago

github changed the formatting of ">>>" to indent ! actually what appears is ">>>undefined" on first 2 lines.

chenglou commented 7 years ago

The published package contains that line in lib/format-jsx.js:

screenshot 2016-11-25 19 42 56

I couldn't find this in the commit history. It's possible that this line's been added before npm publish (which picks up local changes, not a clean state git checkout). @royriojas is it possible to re-publish this please?

royriojas commented 7 years ago

Sure, so sorry not sure how this line got into it. Fixing it now.

royriojas commented 7 years ago

@chenglou, @bigfish, so sorry, a new version was published v7.3.2, please if you can confirm that fixes the issue and I will close this.

chenglou commented 7 years ago

Works now, thanks a lot!

bigfish commented 7 years ago

yup, works for me too , thanks!