eslint, semistandard, standard, and xo are all tools designed to enforce code quality and consistency in JavaScript projects by identifying problematic patterns, stylistic issues, and potential bugs. eslint is a highly configurable linter that serves as the foundation for many style guides. standard, semistandard, and xo are opinionated wrappers built on top of eslint that provide predefined rule sets with minimal or zero configuration required. While standard enforces a strict no-semicolons style, semistandard allows semicolons but otherwise follows standard's conventions. xo offers a modern, slightly more flexible alternative with sensible defaults focused on ES2020+ features and common best practices.
Choosing a JavaScript linter isn't just about catching bugs — it's about defining how your team writes code every day. The four tools here represent different philosophies: from total configurability (eslint) to rigid convention (standard), with pragmatic middle grounds in between. Let's break down how they actually work in practice.
eslint starts with no rules enabled by default. You must explicitly configure everything.
// .eslintrc.js
module.exports = {
env: { es2021: true, node: true },
extends: ['eslint:recommended'],
rules: {
'no-console': 'warn',
'indent': ['error', 2],
'quotes': ['error', 'single']
}
};
standard provides zero configuration. No config file needed — just install and run.
# No .eslintrc, no config
npx standard
semistandard also offers zero configuration, but differs from standard only in semicolon handling.
# Same zero-config approach
npx semistandard
xo uses sensible defaults with optional overrides. Most projects need no config, but you can customize via package.json.
// package.json
{
"xo": {
"semicolon": false,
"space": true
}
}
Here's how each tool handles basic formatting:
// Input code
function greet(name) {
return "Hello, " + name
}
const message = greet('World')
console.log(message)
eslint (with recommended config) won't flag any of this — you'd need to enable specific style rules.
standard will complain about missing semicolons and double quotes:
# standard output
2:30 error Strings must use single quotes
2:39 error Missing semicolon
5:30 error Missing semicolon
semistandard only complains about the quotes (allows semicolons):
# semistandard output
2:30 error Strings must use single quotes
xo by default requires semicolons and single quotes:
# xo output
2:30 error Strings must use single quotes
2:39 error Missing semicolon
5:30 error Missing semicolon
eslint has the richest ecosystem. You can extend configs, write custom rules, and integrate with frameworks:
// Using popular configs and plugins
module.exports = {
extends: [
'eslint:recommended',
'plugin:react/recommended',
'@typescript-eslint/recommended'
],
plugins: ['react', '@typescript-eslint']
};
standard, semistandard, and xo all build on eslint internally but limit customization:
standard/semistandard: Can add global variables only via CLI flags or comments
/* eslint-env browser */
/* global myGlobal */
xo: Supports some config overrides and ignores, plus limited plugin support:
{
"xo": {
"extends": ["plugin:react/recommended"],
"plugins": ["react"]
}
}
eslint supports everything through parsers and plugins:
// For TypeScript
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint']
};
standard and semistandard only support JavaScript (ES2020+). No TypeScript support.
xo supports TypeScript with additional setup:
npm install --save-dev typescript @typescript-eslint/parser @typescript-eslint/eslint-plugin
Then configure in package.json:
{
"xo": {
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"]
}
}
All four tools support automatic fixing, but with different workflows:
eslint:
npx eslint --fix src/
standard:
npx standard --fix
semistandard:
npx semistandard --fix
xo:
npx xo --fix
However, standard and semistandard have more limited auto-fix capabilities compared to eslint and xo, especially for complex stylistic issues.
You're building a large application with multiple teams, custom coding standards, and framework-specific rules.
eslintYou're publishing a small utility library and want contributors to follow consistent style without configuration debates.
standard or semistandardYou're building a new React application using TypeScript and hooks, wanting modern defaults with room for minor adjustments.
xoYou're gradually introducing linting to a large existing codebase with inconsistent style.
eslint| Feature | eslint | standard | semistandard | xo |
|---|---|---|---|---|
| Configuration | Full control | Zero config | Zero config | Minimal config |
| Semicolons | Configurable | Forbidden | Required | Required (configurable) |
| Extensibility | Unlimited | Very limited | Very limited | Moderate |
| TypeScript | Yes (with plugins) | No | No | Yes (with setup) |
| Auto-fix | Comprehensive | Basic | Basic | Good |
| Learning Curve | Steep | None | None | Low |
eslint — it's the industry standard for a reason.standard (no semicolons) or semistandard (with semicolons).xo gives you the best balance of opinionated defaults and escape hatches.Remember: the best linter is the one your team actually uses consistently. Don't let perfect be the enemy of good — even basic linting catches real bugs and prevents style arguments that waste valuable development time.
Choose xo if you prefer a modern, slightly more flexible opinionated linter that supports the latest JavaScript features out of the box while still requiring minimal configuration. It's ideal for new projects using ES2020+ syntax, TypeScript (with additional setup), and developers who want sensible defaults with easy overrides for specific rules without abandoning the zero-config philosophy entirely.
Choose eslint when you need full control over your linting rules, custom configurations, or integration with complex project requirements. It's ideal for large teams or organizations that require tailored coding standards, support for multiple environments (browser, Node.js, etc.), or gradual adoption of linting rules through overrides and plugins.
Choose semistandard if your team prefers using semicolons in JavaScript but still wants the simplicity and zero-configuration benefits of the standard style guide. It's a good middle ground for developers who find standard's no-semicolon rule too restrictive but appreciate its other conventions around spacing, naming, and code structure.
Choose standard when you want a completely zero-configuration linter that enforces a consistent style without any decision-making overhead. It's well-suited for small to medium projects where team members agree to adopt its opinionated rules, including no semicolons, 2-space indentation, and single quotes, allowing everyone to focus on logic rather than formatting debates.
JavaScript/TypeScript linter (ESLint wrapper) with great defaults
Opinionated but configurable ESLint wrapper with lots of goodies included. Enforces strict and readable code. Never discuss code style on a pull request again! No decision-making. No eslint.config.js to manage. It just works!
It uses ESLint underneath, so issues regarding built-in rules should be opened over there.
XO requires your project to be ESM.

package.json), and CSS files except for commonly ignored paths.unicorn, import-x, ava, n and more.$ npm init xo.$ xo --fix.$ xo --open.compat option.npm install xo --save-dev
You must install XO locally. You can run it directly with $ npx xo.
For framework-specific linting, see Astro, React, Svelte, and Vue.
$ xo --help
Usage
$ xo [<file|glob> ...]
Options
--fix Automagically fix issues
--fix-dry-run Automagically fix issues without saving the changes to the file system
--reporter Reporter to use
--space Use space indent instead of tabs [Default: 2]
--config Path to a XO configuration file
--semicolon Use semicolons [Default: true]
--prettier Format with prettier or turn off Prettier-conflicted rules when set to 'compat' [Default: false]
--print-config Print the effective ESLint config for the given file
--version Print XO version
--open Open files with issues in your editor
--quiet Show only errors and no warnings
--max-warnings Number of warnings to trigger nonzero exit code [Default: -1]
--stdin Validate/fix code from stdin
--stdin-filename Specify a filename for the --stdin option
--ignore Ignore pattern globs, can be set multiple times
--suppressions-location Path to a custom ESLint suppressions file
--cwd=<dir> Working directory for files [Default: process.cwd()]
Examples
$ xo
$ xo index.js
$ xo *.js !foo.js
$ xo --space
$ xo --print-config=index.js
$ echo 'const x=true' | xo --stdin --fix
Tips
- Add XO to your project with `npm init xo`.
- Put options in xo.config.js instead of using flags so other tools can read it.
Any of these can be overridden if necessary.
if (condition) {}=== instead of ==Check out an example and the ESLint rules.
The recommended workflow is to add XO locally to your project and run it with the tests.
Simply run $ npm init xo (with any options) to add XO to create an xo.config.js.
You can configure XO options by creating an xo.config.js or an xo.config.ts file in the root directory of your project, or you can add an xo field to your package.json. XO supports all js/ts file extensions (js,jsx,mjs,cjs,ts,tsx,mts,cts), popular framework extensions (vue,svelte,astro), HTML, Markdown, JSON, and CSS automatically. A XO config is an extension of ESLint's Flat Config. Like ESLint, an XO config exports an array of XO config objects. XO config objects extend ESLint Configuration Objects. This means all the available configuration params for ESLint also work for XO. However, XO enhances and adds extra params to the configuration objects to make them easier to work with.
XO exports the types FlatXoConfig, XoConfigItem, and other types for you to get TypeScript validation on your config files.
examples:
xo.config.js
/** @type {import('xo').FlatXoConfig} */
const xoConfig = [...]
xo.config.ts
import {type FlatXoConfig} from 'xo';
const xoConfig: FlatXoConfig = [...]
export default [...] satisfies import('xo').FlatXoConfig
Type: string | (string | string[])[]
Default: **/*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,svelte,astro}
A glob string, array of globs, or ESLint's native format (where nested arrays create AND patterns) indicating which files the config object applies to. By default XO will apply the configuration to all JavaScript, TypeScript, and framework files. To configure other file types, such as HTML, Markdown, JSON, or CSS, set files explicitly. This is compatible with ESLint plugin configs, so you can spread them directly into your XO config.
Tip: If you are adding additional
@typescript-eslintrules to your config, these rules will apply to JS files as well unless you separate them appropriately with thefilesoption.@typescript-eslintrules set to'off'or0, however, will have no effect on JS linting.
Type: string | string[]
Some paths are ignored by default, including lockfiles and paths in .gitignore. Additional ignores can be added here.
Tip: For global ignores, keep
ignoresas the only key in the config item. You can optionally set anameproperty. Adding more properties will cause ignores to be scoped down to your files selection, which may have unexpected effects.
Global negated ignores are supported in both config files and the CLI for reopening XO's built-in ignored paths. This includes directory globs like !dist/**, file globs like !**/*.min.js, and literal file paths like !dist/src/index.js.
When global ignores are involved, XO uses them in this order:
ignoresignoresXO keeps positive ignores for fast file discovery and only rechecks XO's own default-ignored paths. ESLint makes the final ignore decision.
Type: boolean | number
Default: false (tab indentation)
Set it to true to get 2-space indentation or specify the number of spaces.
Global only. For file-specific indentation, use the @stylistic/indent and @html-eslint/indent rules.
This option exists for pragmatic reasons, but I would strongly recommend you read “Why tabs are superior”.
Type: boolean
Default: true (Semicolons required)
Set it to false to enforce no-semicolon style.
Global only. For file-specific semicolon rules, use the @stylistic/semi rule.
Type: boolean | 'compat'
Default: false
Format code with Prettier.
Global only. For file-specific Prettier overrides, configure the prettier/prettier rule.
XO applies its own Prettier options:
truefalsefalseallAny options you set in a Prettier config still apply for anything XO does not configure (like printWidth or plugins), but XO's own style settings take precedence.
If the Prettier option is set to compat, instead of formatting your code automatically, XO will turn off all rules that conflict with Prettier code style and allow you to pass your formatting to the Prettier tool directly.
To lint Astro files, install eslint-plugin-astro:
npm install --save-dev eslint-plugin-astro
Then spread its recommended config in your xo.config.js:
import astroPlugin from 'eslint-plugin-astro';
const xoConfig = [
...astroPlugin.configs.recommended,
];
export default xoConfig;
To lint React files, install eslint-config-xo-react:
npm install --save-dev eslint-config-xo-react
Then spread it in your xo.config.js:
import xoReact from 'eslint-config-xo-react';
const xoConfig = [
...xoReact(),
];
export default xoConfig;
[!NOTE] Until
eslint-plugin-reactsupports ESLint 10 natively, you may need to wrap the config withfixupConfigRulesfrom@eslint/compat.
To lint Svelte files, install eslint-plugin-svelte:
npm install --save-dev eslint-plugin-svelte
Then spread its recommended config in your xo.config.js:
import sveltePlugin from 'eslint-plugin-svelte';
const xoConfig = [
...sveltePlugin.configs.recommended,
];
export default xoConfig;
To lint Vue files, install eslint-plugin-vue:
npm install --save-dev eslint-plugin-vue
Then spread its recommended config in your xo.config.js:
import vuePlugin from 'eslint-plugin-vue';
const xoConfig = [
...vuePlugin.configs['flat/recommended'],
];
export default xoConfig;
If you want to extend a shareable ESLint config or any other npm package, use xo.config.js instead of package.json, since package.json only supports serializable values and cannot import.
xo.config.js
export {default} from 'my-shareable-config';
You can also extend and override:
import myConfig from 'my-shareable-config';
export default [
...myConfig,
{
rules: {
// Your overrides
},
},
];
XO will automatically lint TypeScript files (.ts, .mts, .cts, and .tsx) with the rules defined in eslint-config-xo-typescript#use-with-xo.
XO will handle the @typescript-eslint/parser project option automatically even if you don't have a tsconfig.json in your project.
You can opt out of XO's automatic tsconfig handling by specifying your own languageOptions.parserOptions.project, languageOptions.parserOptions.projectService, or languageOptions.parserOptions.tsconfigRootDir. Files in a config with these properties will be excluded from automatic tsconfig handling.
There are two different ways to use XO's rules with ESLint directly, depending on whether you use the xo CLI.
xo CLIIf you don't use the xo CLI and just want XO's rules in ESLint, use eslint-config-xo. It accepts the same core style options as XO, including Prettier integration:
eslint.config.js
import eslintConfigXo from 'eslint-config-xo';
export default [
...eslintConfigXo({space: true, prettier: true}),
];
[!NOTE] This replaces the old
xoToEslintConfighelper. For example,xoToEslintConfig([{space: true, prettier: true}])becomeseslintConfigXo({space: true, prettier: true}). For per-file overrides, add normal ESLint config objects alongside it.
xo CLI (editor integration)If you use the xo CLI but your editor only has the ESLint extension (not XO's), add an eslint.config.js that re-exports the adapter. It reads your xo.config.js and generates the matching ESLint config automatically, so your editor shows the same errors as running xo — without duplicating your config.
eslint.config.js
export {default} from 'xo/eslint-adapter';
Put a xo.config.js with your config at the root and do not add a config to any of your bundled packages.
To include files that XO ignores by default, add them as negative globs in the ignores option:
const xoConfig = [{ignores: ['!vendor/**']}];
export default xoConfig;
This also works for narrower carve-outs:
const xoConfig = [{ignores: ['!dist/src/**', '!dist/src/index.js']}];
export default xoConfig;
When XO finds errors, warnings are automatically hidden to reduce noise and let you focus on what matters. Warnings are shown normally when there are no errors. Use --quiet to always suppress warnings, or --max-warnings to treat warnings as errors.
XO automatically respects an eslint-suppressions.json file if one exists in the working directory. This lets you suppress existing violations while still enforcing rules on new code — useful for incrementally adopting stricter rules in a large codebase.
To generate the suppressions file, create a temporary eslint.config.js using xo/eslint-adapter and run ESLint with --suppress-all:
npx eslint --suppress-all
Commit the resulting eslint-suppressions.json to share suppressions across your team.
To use a custom suppressions file path, pass --suppressions-location:
xo --suppressions-location config/suppressions.json
It means hugs and kisses.
The Standard style is a really cool idea. I too wish we could have one style to rule them all! But the reality is that the JS community is just too diverse and opinionated to create one code style. They also made the mistake of pushing their own style instead of the most popular one. In contrast, XO is more pragmatic and has no aspiration of being the style. My goal with XO is to make it simple to enforce consistent code style with close to no config. XO comes with my code style preference by default, as I mainly made it for myself, but everything is configurable.
XO is based on ESLint. This project started out as just a shareable ESLint config, but it quickly grew out of that. I wanted something even simpler. Just typing xo and be done. No decision-making. No config. I also have some exciting future plans for it. However, you can still get most of the XO benefits while using ESLint directly with the ESLint shareable config.
xo as a list of style errors, ordered by countShow the world you're using XO →
[](https://github.com/xojs/xo)
[](https://github.com/xojs/xo)
You can also find some nice dynamic XO badges on badgen.net.