Type: | Package |
Title: | Lint 'JavaScript' Files |
Version: | 0.1.0 |
Maintainer: | Stéphane Laurent <laurent_step@outlook.fr> |
Description: | Allow to run 'jshint' on 'JavaScript' files with a 'R' command or a 'RStudio' addin. The report appears in the 'RStudio' viewer pane. |
License: | GPL-3 |
URL: | https://github.com/stla/jshintr |
BugReports: | https://github.com/stla/jshintr/issues |
Imports: | htmltools, htmlwidgets, rstudioapi, tools |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.0 |
NeedsCompilation: | no |
Packaged: | 2022-06-10 09:20:00 UTC; SDL96354 |
Author: | Stéphane Laurent [aut, cre], Anton Kovalyov [cph] ('jshint' library) |
Repository: | CRAN |
Date/Publication: | 2022-06-10 14:40:02 UTC |
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)