The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<html><h1>jslint(1) -- a code quality tool</h1><h2 id="SYNOPSIS">SYNOPSIS</h2><p>jslint.js [--anon] [--ass] [--bitwise] [--browser] [--closure] [--color] [--continue] [--debug] [--devel] [--edition] [--eqeq] [--es5] [--evil] [--forin] [--indent] [--json] [--maxerr] [--maxlen] [--newcap] [--node] [--nomen] [--on] [--passfail] [--plusplus] [--predef] [--properties] [--regexp] [--rhino] [--sloppy] [--stupid] [--sub] [--terse] [--todo] [--undef] [--unparam] [--vars] [--white] [--] &lt;scriptfile&gt;...</p><h2 id="DESCRIPTION">DESCRIPTION</h2><p>JSLint is a static analysis tool to locate and correct style problems in Javascript (ECMAScript etc.) source code.</p><h2 id="META-OPTIONS">META OPTIONS</h2><p>  <code>--color</code>     write output in color</p><p>  <code>--terse</code>     report one error per line with parseable source file/line</p><p>  <code>--json</code>      output in JSON format</p><p>  <code>--edition</code>   specify which edition of jslint to use</p><h2 id="LINTING-OPTIONS">LINTING OPTIONS</h2><p>  <code>--ass</code>       Tolerate assignment expressions</p><p>  <code>--bitwise</code>   Tolerate bitwise operators</p><p>  <code>--browser</code>   Assume a browser</p><p>  <code>--closure</code>   Tolerate Google Closure idioms</p><p>  <code>--continue</code>  Tolerate continue</p><p>  <code>--debug</code>     Tolerate debugger statements</p><p>  <code>--devel</code>     Assume console,alert, ...</p><p>  <code>--eqeq</code>      Tolerate == and !=</p><p>  <code>--evil</code>      Tolerate eval</p><p>  <code>--forin</code>     Tolerate unfiltered for in</p><p>  <code>--indent</code>    Strict white space indentation</p><p>  <code>--maxerr</code>    Maximum number of errors</p><p>  <code>--maxlen</code>    Maximum line length</p><p>  <code>--newcap</code>    Tolerate uncapitalized constructors</p><p>  <code>--node</code>      Assume Node.js</p><p>  <code>--nomen</code>     Tolerate dangling underscore in identifiers</p><p>  <code>--passfail</code>  Stop on first error</p><p>  <code>--plusplus</code>  Tolerate ++ and --</p><p>  <code>--predef</code>    Declare additional predefined globals</p><p>  <code>--properties</code> Require all property names to be declared with /<em>properties</em>/</p><p>  <code>--regexp</code>    Tolerate . and [^...]. in /RegExp/</p><p>  <code>--rhino</code>     Assume Rhino</p><p>  <code>--sloppy</code>    Tolerate missing &#39;use strict&#39; pragma</p><p>  <code>--stupid</code>    Tolerate stupidity (typically, use of sync functions)</p><p>  <code>--sub</code>       Tolerate inefficient subscripting</p><p>  <code>--todo</code>      Tolerate TODO comments</p><p>  <code>--unparam</code>   Tolerate unused parameters</p><p>  <code>--vars</code>      Tolerate many var statements per function</p><p>  <code>--white</code>     Tolerate messy white space</p><h2 id="DEPRECATED-OPTIONS">DEPRECATED OPTIONS</h2><p>  <code>--anon</code>      Tolerate no space in anonymous function definition</p><p>  <code>--es5</code>       Tolerate ECMAScript 5 syntax</p><p>  <code>--undef</code>     Tolerate variables used before declaration</p><p>  <code>--on</code>        Tolerate HTML event handlers</p><p>  <code>--windows</code>   Assume existence of Windows globals</p><h2 id="EXAMPLES">EXAMPLES</h2><p><em>Multiple files:</em></p><pre><code>jslint lib/color.js lib/reporter.js</code></pre><p><em>All JSLint options supported</em></p><pre><code>jslint --white --vars --regexp lib/color.js</code></pre><p><em>Defaults to true, but you can specify false</em></p><pre><code>jslint --bitwise false lib/color.js</code></pre><p><em>Pass arrays</em></p><pre><code>jslint --predef $ --predef Backbone lib/color.js</code></pre><p><em>JSLint your entire project</em></p><pre><code>find . -name &quot;*.js&quot; -print0 | xargs -0 jslint</code></pre><p><em>Using JSLint with a config file</em></p><p>  Start with the included example jslintrc file and customize your options per project
  or copy it to $HOME/.jslintrc to apply your setting globally</p><h2 id="INSTALLATION">INSTALLATION</h2><p>To install jslint globally, use
 npm install jslint -g</p><p>To install jslint locally, use
 npm install jslint</p><p>When installed locally, jslint can be run as
 ./node_modules/.bin/jslint</p><h2 id="FILES">FILES</h2><p>jslint looks for the following config files at startup:</p><p> $HOME/.jslintrc
 ./jslintrc
 ./.jslintrc</p><p>The format of a jslint options file is a JSON file containing a single object
where the keys are jslint option names and the values are the option argument;
use <code>true</code> to enable and <code>false</code> to disable boolean options.  An example of a
valid option file is:</p><p> {
   vars: true,
   white: true,
   maxlen: 100,
   predef: &quot;foo,bar,baz&quot;
 }</p><p>Comments are not allowed in option files.</p><h2 id="PRECEDENCE">PRECEDENCE</h2><p>The order of precedence for options is as follows:</p><ol><li>in the $HOME/.jslintrc</li><li>in ./jslintrc or ./.jslintrc</li><li>on the command line</li><li>in a /*jslint*/ comment</li></ol><p>A higher number indicates a higher precedence, i.e. command line options
override options specified by an options file, and /*jslint*/ comments
in the file being examined have the highest precedence.</p><h2 id="EDITIONS">EDITIONS</h2><p>You can now specify the edition of jslint with the <em>--edition</em> option.</p><p>Future versions of this package may include newer editions of jslint;
to always use the latest edition of jslint, specify --edition=latest:</p><pre><code>jslint --edition=latest lib/*.js</code></pre><p>The default edition of jslint will remain stable as long as the leading
two components of the version number are the same.  New minor editions
may have a different default edition.</p><p>The previous version of this package (0.1.9) shipped an older edition
(2013-02-03) of jslint.  To revert to that behavior but still have the
new config file features, upgrade to 0.2.1 of this package and specify
<code>edition: &#39;2012-02-03&#39;</code> in your jslintrc file or <code>--edition=2013-02-03</code>
on the command line.</p><p>We recommend the following practices:</p><h3 id="If-your-project-is-in-maintenance-mode">If your project is in maintenance mode</h3><p>Choose an edition of jslint and hardcode it into your project&#39;s lint config files, e.g.,
<code>edition: &#39;2012-02-03&#39;</code>. Specify a fixed version of jslint (e.g., &quot;0.2.1&quot;) as a
devDependency in package.json</p><h3 id="If-your-project-needs-temporary-stability-e-g-release-phase">If your project needs temporary stability (e.g., release phase)</h3><p>Use the default edition of jslint (no <code>--edition</code> argument needed) and specify
a fixed minor version  (e.g, &quot;~0.2&quot;) as a devDependency in package.json</p><h3 id="If-you-want-the-bleeding-edge-version">If you want the bleeding-edge version</h3><p>Specify <code>edition: &#39;latest&#39;</code> and use any &#39;latest version&#39; behavior in package.json,
e.g., &quot;*&quot; or &quot;&gt;0.2.1&quot;</p><h2 id="RETURN-VALUES">RETURN VALUES</h2><p>jslint returns 1 if it found any problems, 0 otherwise.</p><h2 id="AUTHOR">AUTHOR</h2><p>jslint is written and maintained by Douglas Crockford <a href="https://github.com/douglascrockford/JSLint">https://github.com/douglascrockford/JSLint</a></p><p>This package is node-jslint, which provides a command-line interface for
running jslint using the nodejs platform.  node-jslint was written by Reid Burke
and is maintained by Reid Burke, Ryuichi Okumura, and Sam Mikes.</p><h2 id="BUGS">BUGS</h2><p>There are no known bugs.  Submit bugs to <a href="https://github.com/reid/node-jslint/issues">https://github.com/reid/node-jslint/issues</a></p><p>Note that if you are reporting a problem with the way jslint works rather than the way
the command-line tools work, we will probably refer you to the JSLint community <a href="https://plus.google.com/communities/104441363299760713736">https://plus.google.com/communities/104441363299760713736</a> or the issue tracker at
 <a href="https://github.com/douglascrockford/JSLint/issues">https://github.com/douglascrockford/JSLint/issues</a></p></html>