Formatting and linting code and documents

Date

18 August 2026

Venue

NUMBAT

 

NUMBAT seminar

Consistently formatted source is easier to read, review and diff, and linters alert you to problems before they become bugs. I will survey and demonstrate the current generation of fast, opinionated formatters and linters — mostly written in Rust, and usable from the command line or from within Positron (and in some cases from RStudio). I’ll focus on air for R and panache for Quarto and R Markdown. If time, I might also mention jarl for R linting, ruff for Python, tex-fmt and chktex for LaTeX, and vale for prose (checking manuscripts against a style guide). I’ll show how to use TOML configuration and format-on-save, so that your code and documents stay tidy with no ongoing effort.

R

Python

  • Ruff: Python linting and formatting

Quarto and Rmarkdown

  • Panache: Markdown, quarto and Rmarkdown linting and formatting

LaTeX

Other

  • Prettier: JavaScript, TypeScript, HTML, CSS, JSON, Markdown
  • Vale: Prose linting

Slides

Download pdf