talira

Zero-config JavaScript and TypeScript linter built on ESLint

open sourceMITfree

XO is an opinionated but configurable ESLint wrapper for JavaScript and TypeScript, with strict, readable defaults and no eslint.config.js to manage. It lints JS, TS, HTML, Markdown, JSON and CSS files without listing paths, bundles plugins such as unicorn, import-x, ava and n, caches results, and fixes many issues with xo --fix. Indent and semicolon preferences are one option each, and it can follow or step aside for Prettier's style.

Problems it solves

  • lint a JavaScript project without writing an ESLint config
  • enforce one code style on a TypeScript repo
  • stop arguing about code style in pull requests

Features

  • zero-config ESLint with strict defaults
  • TypeScript supported by default
  • lints JS, TS, HTML, Markdown, JSON and CSS
  • bundled unicorn, import-x, ava and n plugins
  • cached runs and --fix
  • Prettier compatibility option

Limitations

  • Requires the project to use ES modules (ESM).1

Alternatives

The same job

These do what XO does.

  1. ESLint Find and fix problems in your JavaScript code.
  2. typescript-eslint The tooling that lets ESLint and Prettier lint and read TypeScript
  3. angular-eslint ESLint support, rules and tooling for Angular projects
  4. eslint-plugin-unicorn More than 300 powerful ESLint rules
  5. eslint-plugin-mocha ESLint rules for Mocha test suites
  6. Standard Ruby Unconfigurable Ruby linter and formatter built on RuboCop

Compare XO with the top 3