JavaScript.JSLint History

Hide minor edits - Show changes to output - Cancel

 
 
February 23, 2011, at 08:59 AM by OtherMichael -
Added lines 13-15:


See also: [[http://www.readwriteweb.com/hack/2011/02/check-your-javascript-with-jsh.php|jsHint]] - a fork that has more options to turn things off.
 
 
August 23, 2009, at 02:48 PM by OtherMichael -
Changed lines 33-34 from:
note that not all of the errors are recognized by the compilation-mode buffer. But those that do--ah! convenience!!!
to:
note that not all of the errors are recognized by the compilation-mode buffer (see below). But those that do--ah! convenience!!!
Added lines 51-52:
my Compile-mode isn't highlightinh/recognizing all of the error-lines; The regex seems to work just fine when I do a search-forward-regexp - it matches everything, even the non-highlighted items; it's not particular types of errors -- some are marked, some aren't.
Added lines 54-59:

Also added the below, to get rid of the escapement above (not actually the source of the errors, but so visually distracting that I though they were)
(:source lang=Perl:)
$output =~ s/&lt;/</g;
$output =~ s/&gt;/>/g;
(:sourceend:)
 
 
August 23, 2009, at 02:44 PM by OtherMichael -
Changed lines 43-44 from:
         (concat "perl c:/cygwin/bin/jslint --laxbreak" file)))))
to:
         (concat "perl c:/cygwin/bin/jslint " file)))))
Added lines 86-87:

.jslint (options) file goes into the $HOME directory which in my case is C:/Emacs (since that came before cygwin)
 
 
August 23, 2009, at 01:43 PM by OtherMichael - not all online options available in shell version
Changed lines 6-13 from:
[[http://blog.ianbicking.org/jslint-command-line.html|from the command-line]] - requires SpiderMonkey

Cory Bennett's [[http://www.corybennett.org/projects/|more command line JSLint]] AND emacs integration - includes some Perl in there, and is the version I'm working with. Has an unfortunate tendency to run well past the end of the file, generate verbose errors.
(:source lang=text:)
jslint [options] <filename>.js
(:sourceend:)

[[http://dean.edwards.name/weblog/2006/06/jslint/|
considered harmful?]]
to:

[[http://dean.edwards.name/weblog/2006/06/jslint/|jslint considered harmful?]]
Added lines 13-24:


!! Command-line jslint
Ian Bicking's [[http://blog.ianbicking.org/jslint-command-line.html|jslint from the command-line]] - requires SpiderMonkey

Cory Bennett adapts Bicking at [[http://www.corybennett.org/projects/|more command line JSLint]] and via extra Perl, and provides some emacs integration (in the compile-mode); this is the version I'm working with. Has an unfortunate tendency to run well past the end of the file, generate verbose errors.

A lot of the options are settable, but not ''every'' online option is available (such as "maxerrors" -- see http://www.jslint.com/webjslint.js for the full super-set.

(:source lang=text:)
jslint [options] <filename>.js
(:sourceend:)
 
 
August 23, 2009, at 01:19 PM by OtherMichael -
Deleted line 52:
Deleted line 57:
Deleted line 64:
Deleted line 69:
Added lines 72-79:
(:sourceend:)


!! Silly notes (things I forget)
(:source lang=text:)
c:/cygwin/bin/jslint - Perl wrapper for jslintrun
c:/cygwin/usr/share/pjslint/jslintrun.js - JavaScript wrapper for fulljslint
c:/cygwin/usr/share/pjslint/fulljslint.js
 
 
August 21, 2009, at 11:14 PM by OtherMichael - notes on my emacsW32 integration and compile mode (screenshot)
Changed line 8 from:
[[http://www.corybennett.org/projects/|more command line JSLint]] AND emacs integration - includes some Perl in there, and is the version I'm working with. Has an unfortunate tendency to run well past the end of the file, generate verbose errors.
to:
Cory Bennett's [[http://www.corybennett.org/projects/|more command line JSLint]] AND emacs integration - includes some Perl in there, and is the version I'm working with. Has an unfortunate tendency to run well past the end of the file, generate verbose errors.
Changed lines 20-47 from:
to:
!! [=EmacsW32=] integration
[[http://www.corybennett.org/projects/|Cory Bennett's notes]] presume the use of Linux; I'm on Windows with Cygwin, where my jslint runs mostly (why? I can't quite recall -- becuase I could shebang a script named "jslint" without an extension of ".pl"???)

Integrating this into the emacs-sytem, Cygwin isn't called, so the compilation-mode hook needs to change from just "/path/to/jslint" to "perl /path/to/jslint"

I also added in --laxbreak

note that not all of the errors are recognized by the compilation-mode buffer. But those that do--ah! convenience!!!

(:source lang=Lisp:)
(add-hook 'javascript-mode-hook
  (lambda ()
    ;;; make emacs recognize the error format produced by jslint
    (set (make-local-variable 'compilation-error-regexp-alist)
      '(("^\\([a-zA-Z.0-9_/-]+\\):\\([0-9]+\\):\\([0-9]+\\)" 1 2 3)))
    (set (make-local-variable 'compile-command)
      (let ((file (file-name-nondirectory buffer-file-name)))
          (concat "perl c:/cygwin/bin/jslint --laxbreak" file)))))

;; for resets
;;(set 'javascript-mode-hook nil)
(:sourceend:)


!!! non-recognized errors
Attach:jslint_emacs_missed_errors.jpg

Changed line 87 from:
[[!JavaScript]] [[!errorChecking]] [[!qa]] [[!perl]] [[!tests]] [[!testing]]
to:
[[!JavaScript]] [[!errorChecking]] [[!qa]] [[!perl]] [[!tests]] [[!testing]] [[!emacs]]
 
 
August 21, 2009, at 10:13 PM by OtherMichael -
Changed lines 7-9 from:
[[http://www.corybennett.org/projects/|more command line JSLint]] AND emacs integration - includes some Perl in there, and is the version I'm working with.

to:

[[http://www.corybennett.org/projects/|more command line JSLint]] AND emacs integration - includes some Perl in there, and is the version I'm working with. Has an unfortunate tendency to run well past the end of the file, generate verbose errors.
(:source lang=text:)
jslint [options] <filename>.js
(:sourceend:)

Changed lines 55-56 from:

to:
[[Testing]]
UnitTesting


Changed line 60 from:
[[!JavaScript]] [[!errorChecking]] [[!qa]] [[!perl]]
to:
[[!JavaScript]] [[!errorChecking]] [[!qa]] [[!perl]] [[!tests]] [[!testing]]
 
 
June 12, 2009, at 03:08 PM by OtherMichael -
Changed line 51 from:
Perl/CommandLineWildCard - [@Wild.pm@] was needed for some step in the above, that runs with Perl....
to:
Perl.CommandLineWildCard - [@Wild.pm@] was needed for some step in the above, that runs with Perl....
 
 
June 12, 2009, at 03:08 PM by OtherMichael -
Changed lines 51-53 from:
to:
Perl/CommandLineWildCard - [@Wild.pm@] was needed for some step in the above, that runs with Perl....

Changed line 55 from:
[[!JavaScript]] [[!errorChecking]]
to:
[[!JavaScript]] [[!errorChecking]] [[!qa]] [[!perl]]
 
 
June 09, 2009, at 09:47 PM by OtherMichael -
Changed lines 4-5 from:
to:
*[[http://www.jslint.com/lint.html|what DO all these errors mean?]]
Changed lines 13-14 from:
[[http://javascriptlint.com/index.htm|JavaScriptLint]] has [@.exe@]s available, but seems to be several years out of data (last update in 2007?)
to:
[[http://whereisandy.com/code/jslint/|more notes on JSLint and SpiderMonkey]] with comparisons to Rhino usage

Stack Overflow: [[http://stackoverflow.com/search?q=jslint|questions containing JSLint]]


Added line 48:
Changed line 50 from:
to:
SpiderMonkey
 
 
June 07, 2009, at 02:07 PM by OtherMichael -
Changed lines 6-7 from:
[[http://www.corybennett.org/projects/|more command line JSLint]] AND emacs integration - includes some Perl in there
to:
[[http://www.corybennett.org/projects/|more command line JSLint]] AND emacs integration - includes some Perl in there, and is the version I'm working with.

Changed lines 14-16 from:


NOTE:on the installation path.... I've gotten SpiderMonkey working in Programming/CygWin... now to get the command-line lint working.... [[~OtherMichael]] June 04, 2009, at 09:20 AM
to:
!! getting it working in [@CygWin@]
See SpiderMonkey notes for build
then, [@smjs@] didn't exist, and line 73 of [@jslint@] wouldn't execute without it

so I changed

(:source lang=bash:)
for my $bin ( qw(smjs js) ) {
(:sourceend:)

to

(:source lang=bash:)
for my $bin ( qw(js) ) {
(:sourceend:)



Additionally, [@jslintrun.js@] line 55 had troubles with null lines???

(:source lang=javascript:)
  if (line.length === 0) {
(:sourceend:)

changed to

(:source lang=javascript:)
  if (!line || line.length === 0) {
(:sourceend:)
 
 
June 04, 2009, at 09:20 AM by OtherMichael -
Added lines 13-15:


NOTE:on the installation path.... I've gotten SpiderMonkey working in Programming/CygWin... now to get the command-line lint working.... [[~OtherMichael]] June 04, 2009, at 09:20 AM
 
 
June 02, 2009, at 01:58 PM by OtherMichael -
Changed lines 6-7 from:
to:
[[http://www.corybennett.org/projects/|more command line JSLint]] AND emacs integration - includes some Perl in there
Added lines 10-11:

[[http://javascriptlint.com/index.htm|JavaScriptLint]] has [@.exe@]s available, but seems to be several years out of data (last update in 2007?)
 
 
June 02, 2009, at 11:32 AM by OtherMichael -
Added lines 1-15:
(:description fluff that shouldn't be there, probably:)
!! JSLint - javascript error-checker
http://www.jslint.com/

[[http://blog.ianbicking.org/jslint-command-line.html|from the command-line]] - requires SpiderMonkey

[[http://dean.edwards.name/weblog/2006/06/jslint/|considered harmful?]]
[[http://happygiraffe.net/blog/2006/06/04/jslint-backlash/|backlash]]


!! See Also


!! Tags
[[!JavaScript]] [[!errorChecking]]