Closed uribo closed 5 years ago
.textlintrcのなかにルールをネストで記述するものがある場合、update_lint_rules()でルールを追加後にエラーが起こる。
.textlintrc
update_lint_rules()
library(textlintr) writeLines("Rmarkdown", "sample.md") textlint("sample.md", markers = FALSE) # 1 inputs ✔ | 0 warnings ✔ # Great! There is no place to modify. update_lint_rules("no-todo") # Add a rule textlint("sample.md", markers = FALSE) # Error: parse error: premature EOF # # (right here) ------^
元の.textlintrc
{ "rules": { "common-misspellings": true, "prh": { "rulePaths": ["/home/rstudio/argama/inst/prh/r.yml"] } }, "plugins": { "@textlint/markdown": { "extensions": ".Rmd" } } }
update_lint_rules()適用後
{ "rules": { "common-misspellings": true, "prh": { "rulePaths": "/home/rstudio/argama/inst/prh/r.yml" }, "no-todo": true }, "plugins": { "@textlint/markdown": { "extensions": ".Rmd" } } }
boxが外れてしまうのが問題っぽい。
.textlintrc
のなかにルールをネストで記述するものがある場合、update_lint_rules()
でルールを追加後にエラーが起こる。元の
.textlintrc
update_lint_rules()
適用後boxが外れてしまうのが問題っぽい。