Skip to content

Stricter handling of reserved words #121

Closed
rvanvelzen opened this Issue Apr 15, 2012 · 2 comments

2 participants

@rvanvelzen
var undefined = 'h4x';
var do = 'i"m in your do';

Problem at line 1 character 5: Expected an identifier and instead saw 'undefined' (a reserved word).

var undefined = 'h4x';

Problem at line 2 character 5: Expected an identifier and instead saw 'do' (a reserved word).

var do = 'i"m in your do';

I believe it would be beneficial not just to "warn" about these things, but to at least have an option to stop checking when this occurs, because in my humble opinion, it's wrong.

@douglascrockford
Owner

It is of course wrong, but JSLint wants to always continue if it can. My advice is to correct all of the issues that JSLint identifies.

@rvanvelzen

Thank you for your consideration. I always fix any errors I find, of course.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.