jshint: Static analysis tool for JavaScript

Description Usage Arguments Value Examples

View source: R/jshint.R

Description

JSHint is a community-driven tool to detect errors and potential problems in JavaScript code. It is very flexible so you can easily adjust it to your particular coding guidelines and the environment you expect your code to execute in.

Usage

1
jshint(text, ..., globals = NULL)

Arguments

text

a string of JavaScript code

...

additional jshint configuration options

globals

a white list of global variables that are not formally defined in the source code

Value

a data frame where each row represents a jshint error or NULL if there were no errors

Examples

1
2
3
code = "var foo = 123"
jshint(code)
jshint(code, asi = TRUE)

jeroenooms/js documentation built on June 6, 2020, 4:15 p.m.