From 62e6ff12f96173cf6005ed2b6ce4f97cff6112f6 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Sun, 12 Nov 2023 23:38:42 +0000 Subject: [PATCH] switch to cli style --- DESCRIPTION | 2 +- R/methods.R | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 6a456f3a9..cd054c544 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -36,7 +36,7 @@ Imports: xmlparsedata (>= 1.0.5) Suggests: bookdown, - crayon, + cli, httr (>= 1.2.1), jsonlite, mockery, diff --git a/R/methods.R b/R/methods.R index 13b67daa0..13f118a81 100644 --- a/R/methods.R +++ b/R/methods.R @@ -1,13 +1,13 @@ #' @export format.lint <- function(x, ...) { - if (requireNamespace("crayon", quietly = TRUE)) { + if (requireNamespace("cli", quietly = TRUE)) { color <- switch(x$type, - warning = crayon::magenta, - error = crayon::red, - style = crayon::blue, - crayon::bold + warning = cli::col_magenta, + error = cli::col_red, + style = cli::col_blue, + cli::style_bold ) - emph <- crayon::bold + emph <- cli::style_bold } else { # nocov start color <- identity