MiguelCastillo / Brackets-InteractiveLinter

Interactive linting for Brackets
Other
119 stars 26 forks source link

Support for jsx #92

Open MiguelCastillo opened 9 years ago

zaggino commented 9 years ago

Yes please, I was just going to open an issue for this :) image

Mark-Simulacrum commented 9 years ago

We should probably use https://github.com/STRML/JSXHint for this.

MiguelCastillo commented 9 years ago

@zaggino i have merged jsx into master. Do you think you can give it a try?

zaggino commented 9 years ago

with latest master i get this, same error, different design: image

MiguelCastillo commented 9 years ago

Is ur file extension jsx?

zaggino commented 9 years ago

.es6, but it shouldn't matter what extension the file is, as long as it's considered as javascript by brackets, no?

MiguelCastillo commented 9 years ago

i have a really naive (temporary) check to only process jsx file by checking the extension... because I didn't want to incur the extra processing cost. But this is my first pass and I wanted to get your feedback, so no biggie. I am working on adding a config UI to select the javascript linter you want to use and a checkbox to enable jsx. This will allow me to run jsx on any javascript. Next couple of days... :)

zaggino commented 9 years ago

Sure, no rush ... I'm working full-time on a backend stuff anyway so no time to play with React ...

MiguelCastillo commented 9 years ago

@zaggino alright. I have added a way to configure jsx linting. This is not as elegant as I would like it because the jsx linter will automatically run jshint for you, and there is no way to change that via configuration. I am experimenting with 'multiple linter' implementation I put together that allows me to configure sequences of linters... This will basically allow me to run jsx and then run eslint for example. Fully configurable so you build your own sequence of linters. But I am still testing/developing this and I am a bit concerned about the performance implications. So, we will see if and when I land that feature.

But here is how you configure interactive linter to use jsx linting. https://github.com/MiguelCastillo/Brackets-InteractiveLinter#do-you-support-jsx-linting

This is available in master... It will published to the registry hopefully soon. I await your feedback :)