xo
❤️ JavaScript happiness style linter
A zero-config JavaScript code style checker built on ESLint with sensible defaults already chosen, run one command and get consistent, auto-fixable style enforcement.
XO: A No-Fuss Code Style Checker for JavaScript
XO is a tool that automatically checks your JavaScript code for style problems and inconsistencies. Instead of spending time debating whether your team should use semicolons or tabs, XO comes with sensible defaults already built in and just works out of the box. You run one command—literally just xo—and it scans all your JavaScript files, tells you what's wrong, and can even fix many issues automatically.
Under the hood, XO wraps ESLint, which is the industry standard for catching code problems in JavaScript. But where ESLint requires you to write configuration files and make decisions about which rules to enforce, XO skips all that. It has opinionated defaults (like requiring single quotes, using tabs, and enforcing strict equality checks) that the creator chose to make code more readable and consistent. If those defaults don't match your team's preferences, you can override them easily in your package.json file without touching any complex configuration.
The main benefit is speed and simplicity: a new project can be set up in seconds with xo --init, and then everyone on your team writes code that passes the same checks automatically. You can integrate it into your test suite so code style gets validated every time you run tests. XO also includes built-in plugins for common scenarios like testing frameworks (AVA), imports, and even React if you need it. If a file is broken, you can ask XO to fix many problems automatically with the --fix flag, and it integrates nicely with editors like VS Code, Sublime, and Vim so you see warnings as you type.
Teams would use this to eliminate style discussions from code reviews and let developers focus on actual logic and design. A startup might use it to maintain consistent code quality as they grow without hiring a dedicated linter expert. Anyone working on JavaScript—whether it's a small script or a large codebase—can benefit from having reliable, consistent style enforcement that requires almost no maintenance.
Where it fits
- Enforce consistent JavaScript code style across a team without debating configuration choices.
- Auto-fix style issues across a codebase with a single --fix command.
- Integrate style checks into a test suite so code style is validated on every run.
- Set up linting for a new JavaScript project in seconds with xo --init.