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.
- ESLint Find and fix problems in your JavaScript code.
- typescript-eslint The tooling that lets ESLint and Prettier lint and read TypeScript
- angular-eslint ESLint support, rules and tooling for Angular projects
- eslint-plugin-unicorn More than 300 powerful ESLint rules
- eslint-plugin-mocha ESLint rules for Mocha test suites
- Standard Ruby Unconfigurable Ruby linter and formatter built on RuboCop
