JavaScript Lint (Deprecated)

Integrated support for JavaScript linting and syntax checking using JavaScript Lint by Matthias Miller has been added to CSS HTML Validator Std/Pro v9.0 and above, but is now deprecated in favor of JSLint.

To distinguish JavaScript messages from other messages, the string "[JavaScript Lint]" is prepended to the JavaScript Lint messages.

NOTE: In CSS HTML Validator v16 and above, JavaScript Lint has been deprecated in favor of JSHint. JSHint is now the default JavaScript linter.

NOTE: JavaScript linting and syntax checking requires the jsl.exe executable. This third-party program is included with CSS HTML Validator. See JavaScript Lint Links for links to more information.

NOTE: JavaScript linting and syntax checking has been designed and tested with JavaScript Lint 0.3.0. Other versions may not work properly.

JavaScript Linting Options

Enable JavaScript lint messages in validation results - Check this box to enable JavaScript linting and syntax checking during validations and to display the results in the validation messages. Checking this option will result in slightly slower validation times because JavaScript Lint must be run. This option is not enabled by default.

Improve JavaScript lint messages - Check this option to enable CSS HTML Validator to make changes to JavaScript Lint message output to try to make the messages more clear and easier to understand for the average web developer. Message IDs may also be added to some messages so that the message can be disable or its type changed. If you want unaltered JavaScript Lint output, then uncheck this option. This option is enabled by default.

Perform JavaScript linting only when JavaScript is detected - When CSS HTML Validator's own validator is used, JavaScript checking is enabled, and JavaScript is detected, then JavaScript linting will be performed. If JavaScript is not detected, then JavaScript linting will not be performed even if it is enabled (this saves time and computer resources). This option is enabled by default.

Show Lint Warnings - Check this option to show the "lint warning" messages. If this option is disabled, then the lint warning messages will not be generated; instead a message indicating how many (if one or more) lint warning messages were not shown will be generated to remind you that this option has been disabled and that lint warning messages were not shown. This option is enabled by default.

Text Edit Options

Path to jsl.exe - Specify the full path to the JavaScript Lint executable. This is usually jsl.exe. This file is included with CSS HTML Validator. See JavaScript Lint Links for links to more information.

General arguments - These arguments are used when calling JavaScript Lint to perform a lint and syntax check. Be careful when changing this as the output format is important for CSS HTML Validator to properly parse the JavaScript Lint messages. The default is "-nologo -nofilelisting -nocontext -output-format "__FILE__(__LINE__:__COL__):__ERROR_PREFIX__: __ERROR_MSG__" --process "%FILE%"".

Control Comments

Various JavaScript Lint options can be set using "control comments" in JavaScript code.

Warnings can be disabled for sections of JavaScript code by surrounding the code sections in /*jsl:ignore*/ and /*jsl:end*/ control comments.

To ignore all warnings in a JavaScript file, place the control comment /*jsl:ignoreall*/ at the top of the JavaScript file.

To check for undeclared identifiers on a per-file basis, use a /*jsl:option explicit*/ control comment.

For more control comments and other information, see JavaScript Lint Links

More

hmtoggle_plus1JavaScript Lint Notes
hmtoggle_plus1Advanced Registry Options