Diviner

Class ArcanistJSHintLinter

Definedsrc/lint/linter/ArcanistJSHintLinter.php:39
GroupLinters
ExtendsArcanistLinter

Uses "JSHint" to detect errors and potential problems in JavaScript code. To use this linter, you must install jshint through NPM (Node Package Manager). You can configure different JSHint options on a per-file basis.

If you have NodeJS installed you should be able to install jshint with npm install jshint -g (don't forget the -g flag or NPM will install the package locally). If your system is unusual, you can manually specify the location of jshint and its dependencies by configuring these keys in your .arcconfig:

lint.jshint.prefix
lint.jshint.bin

If you want to configure custom options for your project, create a JSON file with these options and add the path to the file to your .arcconfig by configuring this key:

lint.jshint.config

Example JSON file (config.json):

{ "predef": [ // Custom globals "myGlobalVariable", "anotherGlobalVariable" ],

"es5": true,   // Allow ES5 syntax
    "strict": true // Require strict mode
}

For more options see http://www.jshint.com/options/.

Tasks

Methods

public getJSHintOptions()

returnwild
This method is not documented.

private getJSHintPath()

returnwild
This method is not documented.

public getLintNameMap()

returnwild
This method is not documented.

public getLintSeverityMap()

returnwild
This method is not documented.

public getLinterName()

returnwild
This method is not documented.

public lintPath($path)

parameterswild$path
returnwild
This method is not documented.

public willLintPaths(array $paths)

parametersarray$paths
returnwild
This method is not documented.