JSLint validation of this snippet
1: function foo() {} 2: 3: foo(1 4: ); 5: 6: foo( 7: );
gives this error:
Error: Problem at line 3 character 5: Line breaking error ')'. foo(1
Is this a JSLint bug?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It’s not a bug. JSLint does more than syntax checking: It enforces certain coding conventions. If you revalidate with the ‘Tolerate sloppy line breaking’ option turned on, you won’t get an error.
From the JSLint Documentation: