Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JsxHint support #91

Open
sejoker opened this issue Sep 22, 2014 · 7 comments
Open

JsxHint support #91

sejoker opened this issue Sep 22, 2014 · 7 comments

Comments

@sejoker
Copy link

sejoker commented Sep 22, 2014

It would be great to add possibility of linting JSX (ReactJS markup) files. I would consider as an option to specify path to jshint package and set it to https://www.npmjs.org/package/jsxhint which is "A wrapper around JSHint to allow linting of files containing JSX syntax."

@nikopavlica
Copy link

I've also started doing some work with react, and this feature would be great.

Since jsxhint is meant for use from command line and doesn't export function to lint any given text as parameter, i think it would be better and faster to just quickly compile temporary input file with react-tools before running jshint on the text.
Whether or not this compilation will run, we could decide based on:

  • First line being equal to /** @jsx React.DOM */ (or some regex that would not be so picky if more spaces were present...). This will however become deprecated in future versions of JSX, since that line will not be necessary anymore.
  • Configurable file extension list, so we could specify to compile, say, '.jsx' files automatically
  • Script tag would be of type "text/jsx"

If i'd find some spare time, I will prepare a possible solution as a pull request (if noone will do it till then :))

@jobedom
Copy link

jobedom commented Jan 7, 2015

I submitted pull request #99 for this.

@binarykitchen
Copy link

Oh yes, that would be neat. Any news on merging the above PR?

@louwers
Copy link

louwers commented Aug 6, 2015

This will never happen, because jsxHint is now deprecated.

@binarykitchen
Copy link

deprecated? what else should we use instead? what's its official replacement?

@sejoker
Copy link
Author

sejoker commented Aug 6, 2015

@binarykitchen I switched to eslint and using https://github.com/roadhump/SublimeLinter-eslint

@binarykitchen
Copy link

ok, and how do i migrate .jshintrc to .eslintrc ?

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

No branches or pull requests

5 participants