Oops, I accidentally removed the group. Adding back.

In your case, I think JSHint stopped because there's not really other code
to worry about past line 1. I can't comment too much on JSHint's internals,
though, as I don't really know it that well.

ESLint only stops parsing when there's a syntax error (which means Esprima
throws an error). Otherwise it continues on.


On Thu, Apr 3, 2014 at 11:51 AM, Brandt, Carsten <[email protected]>wrote:

>  Hi Nicolas,
>
>
>
> to be more precise have a look at this code snippet:
>
>
>
> for (var i = 0; i < 10; i++) {
>
>     // Do stuff
>
> }
>
>
>
> JSLint displays following error and stops parsing:
>
>
>
> Line 1: Move 'var' declarations to the top of the function.
>
> Line 1: Stopping. (33% scanned).
>
>
>
> JSLint raises this error to highlight a possible misunderstanding of the
> language. Your code will most likely work as expected if you do not resolve
> this issue, but you may have misunderstood how JavaScript handles variable
> declarations. All declarations are hoisted to the top of the scope in which
> they appear.
>
>
>
> In my opinion this message should not be an error (instead it should be
> displayed as warning or information) and JSLint should not stop parsing,
> because it is not a syntax error found during parsing. My question is
> whether ESlint also stops parsing for these kind of opinionated issues or
> whether ESLint only stops in case a real syntax error was found.
>
>
>
> Thanks for answering also my other question.
>
>
>
> Best regards, Carsten
>
>
>
>
>
>
>
> *From:* Nicholas Zakas [mailto:[email protected]]
> *Sent:* Donnerstag, 3. April 2014 18:38
> *To:* Brandt, Carsten
> *Subject:* Re: [ESLint] ESLint and parsing
>
>
>
> I'm not sure what your question is, can you explain some more?
>
>
>
> On Thu, Apr 3, 2014 at 4:41 AM, Carsten Brandt <[email protected]>
> wrote:
>
> Hi everyone,
>
>
>
> as far as I know ESLint does a full parse first, but cannot show other
> warnings behind parsing/syntax errors. Now my questions: This is only true
> for parsing/syntax errors, which are really errors and not for issues
> mentioned by  JSLint like 'Move 'var' declarations to the top of the
> function'.
>
>
>
> Thanks & Regards,
>
> Carsten
>
> --
> You received this message because you are subscribed to the Google Groups
> "ESLint" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
>
> --
>
> ______________________________
> Nicholas C. Zakas
> @slicknet
>
> Author, Professional JavaScript for Web Developers
> Buy it at Amazon.com:
> http://www.amazon.com/Professional-JavaScript-Developers-Nicholas-Zakas/dp/1118026691/ref=sr_1_3
>



-- 

______________________________
Nicholas C. Zakas
@slicknet

Author, Professional JavaScript for Web Developers
Buy it at Amazon.com:
http://www.amazon.com/Professional-JavaScript-Developers-Nicholas-Zakas/dp/1118026691/ref=sr_1_3

-- 
You received this message because you are subscribed to the Google Groups 
"ESLint" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to