With this PR I introduce two new functions: format_js() and format_sass(). Both of these take a fix argument that defaults to TRUE to allow just checking the style.
[!IMPORTANT]
There might be places where prettier's formatting might be incompatible with AirBnB and/or stylelint linters, but I am not aware of these.
How to Test
A New App
Install Rhino from the branch
Create a new app with rhino::init()
Add some unformatted code in app/js/ and app/styles/ directories
Run format_js() and format_sass() to see if they work
An Existing App
Run renv::install("TymekDev/rhino@formatters")
Remove .rhino/ directory
Make sure there is unformatted code in app/js/ and app/styles/ directories
Run format_js() and format_sass() to see if they work
Definition of Done
[x] The change is thoroughly documented.
[x] The CI passes (R CMD check, linter, unit tests, spelling).
[x] Any generated files have been updated (e.g. .Rd files with roxygen2::roxygenise())
Description
With this PR I introduce two new functions:
format_js()
andformat_sass()
. Both of these take afix
argument that defaults toTRUE
to allow just checking the style.How to Test
A New App
rhino::init()
app/js/
andapp/styles/
directoriesformat_js()
andformat_sass()
to see if they workAn Existing App
renv::install("TymekDev/rhino@formatters")
.rhino/
directoryapp/js/
andapp/styles/
directoriesformat_js()
andformat_sass()
to see if they workDefinition of Done
R CMD check
, linter, unit tests, spelling)..Rd
files withroxygen2::roxygenise()
)