Nay on tabs. Big fan of spaces. I'm not too religious about this
however, just voicing my opinion.
Yay for new codes for warnings/errors. This means we can translate the
errors into other languages or even change the wording in the future
yet keep the same code for consistency and this will work on all tools
that rely on JSHint
Yay for lint hooks. Flexibility is great.
Josh
- The css property tab-size isn't implemented on all browsers yet so
code will looks bad on the web when it's tabs. Plus most editors
convert tabs to spaces which makes it annoying to copy/paste from web
to editor and vice versa.
Overall, I am not too concerned about how many columns code is
indented. I am more concerned with having code be consistent.
On the plus side for tabs, files are smaller.
My reasoning is that syntax errors will not work in production
regardless and jshint should be out to catch the tricky stuff that you
feel may work but doesn't really work. Besides, SyntaxErrors are easy,
the person just goes and fixes the bug and runs hint again.
I see no value in continuing to parse and guessing what the developer
intended thus raising many false positives (specially if the syntax
error occurs early on) and thus possibly breaking any tools that rely
on JSHint (I'm biased here, of course)
The only argument I see for running through regardless of Errors is
that you won't have to potentially run JSHint multiple times on that
same file if you're hinting a file that has tons of SyntaxErrors.
Yay for ES5.
Yay for modules as long as we provide an easy to download bundled jshint.js
Indifferent about the new option system (as I know nothing about this)
Yay for progress! :)
This code will fail with "unexpected token" on line 3:
var a = "Hello";
console.log(a)
var b=,
If we modify Esprima to return the last valid token—we can re-parse the
file up until line 3. Then, after displaying, all warnings we will end
the output with "Syntax error: can't parse further". So for our example
the output will be:
Line 2: Missing semicolon
Line 3: Unexpected token , (fatal)
Sounds like a good compromise between failing completely without and
guessing around syntax errors.
Anton
P. S. Keep your arguments coming even if you're outvoted.
Also, I really want to move from talking part to writing code part and that's why I'm trying to finish my book and move it out of the way as quickly as possible (one chapter left!)
Anton
P. S. You guys are doing a great job dealing with issues while I'm concentrating on other projects! Thank you so much!
Anton, +1 for splitting between lint and styles.
--You received this message because you are subscribed to the Google Groups "JSHint" group.To unsubscribe from this group and stop receiving emails from it, send an email to jshint+un...@googlegroups.com.For more options, visit https://groups.google.com/d/optout.