Consider wrapping jsx return to jshint ignore comments.
sudodoki opened this issue · 3 comments
Are there a lot of developers who are constantly linting their code? Maybe, something like this
render: function() {
/* jshint ignore:start */
return (
<div />
);
/* jshint ignore:end */
}
should be in component skeleton? Just a proposal, it doesn't kill me to add those manually.
Hmm, I think this may be a bit too specific to your workflow to force everyone into it. Maybe it could be a configurable, opt-in feature? I'd be interested in hearing from other devs about their jshint strategy.
I really dislike this approach. It makes JSHint useless.
For example, if you're using other components inside render
, JSHint will report their types as unused variables. It will also ignore mistakes inside your render
.
There are much better ways to skin that cat: use JSXHint or run JSHint in a Gulp task after running code through React transformer.
I agree that JSXHint is the way to go here.