JavaScript Lint (Deprecated) (Pro, Std, Lite)

Contents

Integrated support for JavaScript linting and syntax checking using JavaScript Lint by Matthias Millerhas been added to CSE 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 CSE 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 CSE 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 CSE 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 CSE 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 CSE 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 CSE 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%"".

Registry Options

Some options that are not changeable here can be changed in the registry under the key "HKEY_CURRENT_USER\Software\AI Internet Solutions\CSE HTML Validator v4\Validator DLL\JavaScript". For example, the timeout can be changed by changing the "TimeoutSeconds" value.

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.

JavaScript Lint Notes

•You can make your own JavaScript Lint configuration file and specify it using the -conf argument.

•As of this writing, JavaScript Lint may not ignore VBScript. This may cause strange or incorrect JavaScript Lint messages to appear for VBScript if there is VBScript in a document that is checked with JavaScript Lint.

•JavaScript Lint is not developed or maintained by AI Internet Solutions. AI Internet Solutions only provides an interface to JavaScript Lint. Therefore, only bugs or problems with the JavaScript Lint interface (but not JavaScript Lint itself) should be reported to AI Internet Solutions.