The JShint can't realize ReactJS


I install the package named JShint, but I found that when I am writting React grammar, it reports the err that React is not defined, ReactDOM is not defined, so how I can make it right? Thanks!


I doubt problem is with React library.

It’s more likely something with:

  • ES6 syntax (or whatever flavor of JS you use).
  • JSX syntax
  • false errors on global variables (if you use these)
  • syntax error in your code
  • bug in JSHint

But unless you share some code, there is no way to tell.


@laoqiren Have you tried Nuclide? It is avaliable as atom package. It have full React support


@v3ss0n I think you missed the point.

laoqiren wrote about some problem with JSHint in vague way. It’s hard to say what this problem is without more details. Yet you wrote “Have you tried Nuclide”. It’s workaround of problem, not solution.

It’s like proposing use of OSX to person who has problems with Linux :slight_smile:

On the other hand workaround is sometimes better than solving problems. I have myself switched to OSX after having problems with Linux. But as I workaround I would rather propose use ESLint instead of JSHint (because I use ESLint and I know that it works with React, if properly configured and with eslint-plugin-react)

But proposing workarounds to people can be sometimes rude… If somebody asks about tool X, why to force somebody to switch?



Nuclide is an atom package optimized for React. It is also avaliable as its own IDE/Editor build.

I am not telling him to switch other editor. Both of them are atom.

Why is that rude?


Why is that rude?
Because I’ve installed Nuclide seconds ago, disabled my ESLint plugin, restarted Atom, and then I’ve written some errors in my JavaScript.

And… nothing. It seems that Nuclide has no linter feature.
Your answer would be good if Nuclide had really a JavaScript linter.

well. Maybe I am wrong. They write Nuclide has some feature called “code diagnostics”. But it doesn’t work on my installation (I’m not sure if JavaScript is supported).


From what I’ve seen, @v3ss0n is trying to help. Sometimes when people try to help, they give suggestions that don’t pan out. That’s unfortunate, but sometimes that’s what happens when all we have to go on is a message on a message board :grinning:


No,I will have a try, but I think atom is so beautiful.Thanks for your suggestion