From b6acbd7065e31f442e2938a6c6aa2eb3ea6e6ab0 Mon Sep 17 00:00:00 2001 From: Barret Schloerke Date: Sat, 12 Sep 2026 23:29:37 -0400 Subject: [PATCH 1/2] chore(r): add spelling check via usethis::use_spell_check() Adds the spelling Suggests dep, Language: en-US, tests/spelling.R, and inst/WORDLIST (50 jargon/identifier words). Also fixes a lowercase "shiny's" in default_input_handler()'s roxygen. --- pkg-r/DESCRIPTION | 3 ++ pkg-r/R/input-handler.R | 2 +- pkg-r/inst/WORDLIST | 50 ++++++++++++++++++++++++++++++ pkg-r/man/default_input_handler.Rd | 2 +- pkg-r/tests/spelling.R | 3 ++ 5 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 pkg-r/inst/WORDLIST create mode 100644 pkg-r/tests/spelling.R diff --git a/pkg-r/DESCRIPTION b/pkg-r/DESCRIPTION index 4fa86c87..c2dcbc3e 100644 --- a/pkg-r/DESCRIPTION +++ b/pkg-r/DESCRIPTION @@ -41,13 +41,16 @@ Suggests: later, rmarkdown, shinytest2, + spelling, testthat (>= 3.0.0), withr VignetteBuilder: knitr, rmarkdown +Config/needs/check: spelling Config/Needs/website: pkgdown, tidyverse/tidytemplate Config/roxygen2/version: 8.1.0 Config/testthat/edition: 3 Encoding: UTF-8 +Language: en-US Roxygen: list(markdown = TRUE) diff --git a/pkg-r/R/input-handler.R b/pkg-r/R/input-handler.R index 636d5428..4d77f465 100644 --- a/pkg-r/R/input-handler.R +++ b/pkg-r/R/input-handler.R @@ -11,7 +11,7 @@ #' The contract, stated in terms of the JSON the React hook sent: #' #' * **Array of objects** (`[{a: 1}, {b: 2}]`) — kept as a list of records -#' This is the case shiny's default handler gets wrong. +#' This is the case Shiny's default handler gets wrong. #' * **Array of scalars** (`[0, 100]`, `["a", "b"]`) — flattened to an atomic #' vector, exactly as shiny does by default. #' * **Empty array** (`[]`) — `list()`, matching Python's `[]`. Shiny's default diff --git a/pkg-r/inst/WORDLIST b/pkg-r/inst/WORDLIST new file mode 100644 index 00000000..fe5e79c9 --- /dev/null +++ b/pkg-r/inst/WORDLIST @@ -0,0 +1,50 @@ +Buie +DOM +HMR +JS +JSX +Lifecycle +Matchers +ORCID +PBC +ROR +ReactDOM +Shiny's +TSX +TypeScript +UI +Vite +Vue's +btw +bundler +bundler's +codebase +debounce +dep +deserializer +dev +funder +jQuery +js +jsonlite +lifecycle +matcher +mtime +namespaced +npm +passthrough +renderer's +renderers +runnable +serializable +shinyreact's +shinytest +stylesheet +templating +theming +truthy +tsx +ui +untyped +websocket +zzz diff --git a/pkg-r/man/default_input_handler.Rd b/pkg-r/man/default_input_handler.Rd index 1639a2cd..9b95e2ee 100644 --- a/pkg-r/man/default_input_handler.Rd +++ b/pkg-r/man/default_input_handler.Rd @@ -16,7 +16,7 @@ simplifies (see \verb{pkg-py/src/shinyreact/_input_handler.py}). The contract, stated in terms of the JSON the React hook sent: \itemize{ \item \strong{Array of objects} (\verb{[\{a: 1\}, \{b: 2\}]}) — kept as a list of records -This is the case shiny's default handler gets wrong. +This is the case Shiny's default handler gets wrong. \item \strong{Array of scalars} (\verb{[0, 100]}, \verb{["a", "b"]}) — flattened to an atomic vector, exactly as shiny does by default. \item \strong{Empty array} (\verb{[]}) — \code{list()}, matching Python's \verb{[]}. Shiny's default diff --git a/pkg-r/tests/spelling.R b/pkg-r/tests/spelling.R new file mode 100644 index 00000000..6713838f --- /dev/null +++ b/pkg-r/tests/spelling.R @@ -0,0 +1,3 @@ +if(requireNamespace('spelling', quietly = TRUE)) + spelling::spell_check_test(vignettes = TRUE, error = FALSE, + skip_on_cran = TRUE) From 7ac8ef3e5264f56297c38d8a1c839b10511b02d4 Mon Sep 17 00:00:00 2001 From: schloerke Date: Sun, 13 Sep 2026 03:31:30 +0000 Subject: [PATCH 2/2] `air format` (GitHub Actions) --- pkg-r/tests/spelling.R | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkg-r/tests/spelling.R b/pkg-r/tests/spelling.R index 6713838f..c597a129 100644 --- a/pkg-r/tests/spelling.R +++ b/pkg-r/tests/spelling.R @@ -1,3 +1,7 @@ -if(requireNamespace('spelling', quietly = TRUE)) - spelling::spell_check_test(vignettes = TRUE, error = FALSE, - skip_on_cran = TRUE) +if (requireNamespace('spelling', quietly = TRUE)) { + spelling::spell_check_test( + vignettes = TRUE, + error = FALSE, + skip_on_cran = TRUE + ) +}