Package 'jshintr'

Title: Lint 'JavaScript' Files
Description: Allow to run 'jshint' on 'JavaScript' files with a 'R' command or a 'RStudio' addin. The report appears in the 'RStudio' viewer pane.
Authors: Stéphane Laurent [aut, cre], Anton Kovalyov [cph] ('jshint' library)
Maintainer: Stéphane Laurent <[email protected]>
License: GPL-3
Version: 0.1.0
Built: 2024-11-02 02:40:47 UTC
Source: https://github.com/stla/jshintr

Help Index


Lint a Javascript file

Description

HTML widget which runs 'jshint' on the given JavaScript file.

Usage

jshintr(filepath, width = NULL, height = "auto", elementId = NULL)

Arguments

filepath

path to a JavaScript file

width, height

dimensions (CSS properties)

elementId

a HTML id for the widget (usually useless)

Value

A htmlwidget object.

Note

You can also run this widget as a RStudio addin.

Examples

jsfile <- system.file("jsexample.js", package = "jshintr")
cat(readLines(jsfile), sep = "\n")
jshintr(jsfile)