By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,624 Members | 1,765 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,624 IT Pros & Developers. It's quick & easy.

JSLINT (JavaScript Lint)

P: n/a
JSLINT now includes a list of member names in its report, along with the
number of occurences of each member name. This is intended to make it
easier to find misspellings.

JSLINT takes a JavaScript source and scans it. If it finds a problem, it
returns a message describing the problem and an approximate location
within the source. The problem is not necessarily an error, although it
often is. JSLINT looks at some style conventions as well as structural
problems. It does not prove that your program is correct. It just
provides another set of eyes to help spot problems.

JSLINT defines a professional subset of JavaScript, a stricter language
than that defined by Edition 3 of the ECMAScript Language Specification.

http://www.crockford.com/javascript/lint.html
Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
In article <be***************************@msgid.meganewsserve rs.com>,
no****@covad.net says...
JSLINT now includes a list of member names in its report, along with the
number of occurences of each member name. This is intended to make it
easier to find misspellings.


Hey Doug, I just wanted to thank you for this app. I just went to your
site and tested a snippet of code and improved it by two semi-colon line
endings! And I'm impressed that it works as a web app. Maybe I'm
easily impressed, maybe not, I'm too much of a webapp newbie to know,
but my book says Pretty Darn Cool.

I'll be using this a lot. Thanks again!

spark
Jul 23 '05 #2

P: n/a
Douglas Crockford wrote:
JSLINT now includes a list of member names in its report, along with the
number of occurences of each member name. This is intended to make it
easier to find misspellings.


This may (or should) be a new question but when I used your JSLINT
(which is quite a nice tool) it said that the post-increment operator
was not allowed in my for-loop:
(i=0;i<something.length;i++) {
When I read your documentation it said that this was some kind of
security issue - but how is that? I never really thought that this
operator was considered bad coding or anything - merely a little quick
shortcut. Or is it just me?

Skovenborg

Jul 23 '05 #3

P: n/a
>> JSLINT now includes a list of member names in its report, along with
the number of occurences of each member name. This is intended to make
it easier to find misspellings.
This may (or should) be a new question but when I used your JSLINT
(which is quite a nice tool) it said that the post-increment operator
was not allowed in my for-loop:
for ( i = 0; i < something.length; i++) {
When I read your documentation it said that this was some kind of
security issue - but how is that? I never really thought that this
operator was considered bad coding or anything - merely a little quick
shortcut. Or is it just me?


The i++ tends to be misused. Most of the buffer overrun bugs that
Microsoft has been purging from its code base used i++. The ++i is less
prone to misuse. I like the i += 1 even better. JSLINT looks for errors,
but it also looks for bad practices that are known to be error prone.

http://www.crockford.com/javascript/lint.html
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.