Rome: Prettier-inspired Rust-based JavaScript and TypeScript Formatter and Linter

Rome: Prettier-inspired Rust-based JavaScript and TypeScript Formatter and Linter

Table of contents

There is no doubt that Prettier revolutionized JavaScript ecosystem by normalizing standards and removing formatting discussions. But there is a new player in town.

Rome is a new linter and formatter which is written in Rust and promises:

  • Minimal configuration
  • Beautiful and descriptive diagnostics
  • Built-in support for JavaScript and TypeScript

Rome is Prettier-inspired which means migration is just a few changes away. Rome has a CLI which makes working with it very easy and attractive.

Getting Started

In a project with a package.json:

npm install rome

For formatting:

npx rome format .

For linting:

npx rome check .

You can also have a configuration file named rome.json (This is optional):

npx rome init