Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: e71c1b9cdb
Fetching contributors…

Cannot retrieve contributors at this time

363 lines (362 sloc) 5.628 kB
.\" Generated with Ronnjs 0.3.8
.\" http://github.com/kapouer/ronnjs/
.
.TH "NODELINT" "1" "March 2012" "" ""
.
.SH "NAME"
\fBnodelint\fR \-\- Run JSLint from the command\-line under node\.js
.
.SH "SYNOPSIS"
.
.nf
nodelint [options] <file\-or\-directory> [<file\-or\-directory> \.\.\.]
.
.fi
.
.SH "DESCRIPTION"
The nodelint command\-line tool allows you to check for problems and ensure
.
.br
the code quality of your JavaScript files using JSLint\.
.
.P
It is completely extensible so you can use your own custom JSLint config or
.
.br
even use custom reporters that better integrate with your quality assurance
.
.br
framework\.
.
.SH "OPTIONS"
\fB\-\-reporter FILE\fR:
.
.br
Override the default reporter with your own custom module\. See
.
.br
the \fIexamples/reporters\fR directory for custom reporters that come
.
.br
bundled with nodelint\.
.
.P
\fB\-\-config FILE\fR:
.
.br
Override the default \fIconfig\.js\fR with your own config file\.
.
.P
\fB\-h\fR, \fB\-\-help\fR:
.
.br
Display the help and exit\.
.
.P
\fB\-v\fR, \fB\-\-version\fR:
.
.br
Output version information and exit\.
.
.P
\fB<file\-or\-directory>\fR:
You can run nodelint on specific files or on all \fI*\.js\fR files inside
.
.br
a directory\.
.
.SH "CONFIG"
You can customise the JSLint options by modifying the default config\.js
.
.br
file or by providing your own config file with the \fI\-\-config\fR parameter:
.
.IP "" 4
.
.nf
nodelint \-\-config path/to/custom\.js file1\.js file2\.js \.\.\.
.
.fi
.
.IP "" 0
.
.P
For example, if the default config\.js looks like:
.
.IP "" 4
.
.nf
var options = {
adsafe : false,
bitwise : true
};
.
.fi
.
.IP "" 0
.
.P
And your custom\.js looks like:
.
.IP "" 4
.
.nf
var options = {
bitwise : false,
browser : false
};
.
.fi
.
.IP "" 0
.
.P
Then the final options will be:
.
.IP "" 4
.
.nf
var options = {
adsafe : false,
bitwise : false,
browser : false
};
.
.fi
.
.IP "" 0
.
.SH "JSLINT OPTIONS"
.
.IP "\(bu" 4
adsafe:
.
.br
True if ADsafe rules should be enforced\. See http://www\.ADsafe\.org/\.
.
.IP "\(bu" 4
bitwise:
.
.br
True if bitwise operators should not be allowed\.
.
.IP "\(bu" 4
browser:
.
.br
True if the standard browser globals should be predefined\.
.
.IP "\(bu" 4
cap:
.
.br
True if upper case HTML should be allowed\.
.
.IP "\(bu" 4
css:
.
.br
True if CSS workarounds should be tolerated\.
.
.IP "\(bu" 4
debug:
.
.br
True if debugger statements should be allowed\.
.
.br
Set this option to false before going into production\.
.
.IP "\(bu" 4
devel:
.
.br
True if browser globals that are useful in development
.
.br
(console, alert, \.\.\.) should be predefined\.
.
.IP "\(bu" 4
eqeqeq:
.
.br
True if === should be required\.
.
.IP "\(bu" 4
es5:
.
.br
True if ES5 syntax should be allowed\.
.
.IP "\(bu" 4
evil:
.
.br
True if eval should be allowed\.
.
.IP "\(bu" 4
forin:
.
.br
True if unfiltered for in statements should be allowed\.
.
.IP "\(bu" 4
fragment:
.
.br
True if HTML fragments should be allowed\.
.
.IP "\(bu" 4
immed:
.
.br
True if immediate function invocations must be wrapped in parens
.
.IP "\(bu" 4
indent:
.
.br
The number of spaces used for indentation (default is 4)
.
.IP "\(bu" 4
laxbreak:
.
.br
True if statement breaks should not be checked\.
.
.IP "\(bu" 4
maxerr:
.
.br
The maximum number of warnings reported (default is 50)
.
.IP "\(bu" 4
maxlen:
.
.br
The maximum number of characters in a line
.
.IP "\(bu" 4
nomen:
.
.br
True if names should be checked for initial or trailing underbars
.
.IP "\(bu" 4
newcap:
.
.br
True if Initial Caps must be used with constructor functions\.
.
.IP "\(bu" 4
on:
.
.br
True if HTML event handlers should be allowed\.
.
.IP "\(bu" 4
onevar:
.
.br
True if only one var statement per function should be allowed\.
.
.IP "\(bu" 4
passfail:
.
.br
True if the scan should stop on first error\.
.
.IP "\(bu" 4
plusplus:
.
.br
True if ++ and \-\- should not be allowed\.
.
.IP "\(bu" 4
predef:
.
.br
An array of strings (comma separated), the names of predefined global variables\.
.
.br
predef is used with the option object, but not with the /\fIjslint \fR/ comment\.
.
.br
Use the var statement to declare global variables in a script file\.
.
.IP "\(bu" 4
regexp:
.
.br
True if \. and [^\.\.\.] should not be allowed in RegExp literals\.
.
.br
These forms should not be used when validating in secure applications\.
.
.IP "\(bu" 4
rhino:
.
.br
True if the Rhino environment globals should be predefined\.
.
.IP "\(bu" 4
safe:
.
.br
True if the safe subset rules are enforced\. These rules are used by ADsafe\.
.
.br
It enforces the safe subset rules but not the widget structure rules\.
.
.IP "\(bu" 4
strict:
.
.br
True if the ES5 "use strict"; pragma is required\. Do not use this option carelessly\.
.
.IP "\(bu" 4
sub:
.
.br
True if subscript notation may be used for expressions better expressed in dot notation\.
.
.IP "\(bu" 4
undef:
.
.br
True if variables must be declared before used\.
.
.IP "\(bu" 4
white:
.
.br
True if strict whitespace rules apply\.
.
.IP "\(bu" 4
widget:
.
.br
True if the Yahoo Widgets globals should be predefined\.
.
.IP "\(bu" 4
windows:
.
.br
True if the Windows globals should be predefined\.
.
.IP "" 0
.
.SH "AUTHORS"
Written by Tav and other nodelint contributors\.
.
.br
Contributors list: \fIhttps://github\.com/tav/nodelint/contributors\fR\|\.
.
.SH "REPORTING BUGS"
Report nodelint bugs to \fIhttps://github\.com/tav/nodelint/issues\fR\|\.
.
.SH "COPYRIGHT"
Nodelint has been released into the Public Domain by its Authors\.
.
.SH "SEE ALSO"
node(1)
Jump to Line
Something went wrong with that request. Please try again.