{"id":19628,"library":"eslint-config-xo","title":"ESLint config for XO","description":"ESLint shareable config for the XO linter, designed for advanced users who prefer to use ESLint directly. Current version 0.51.0 requires ESLint 10 and Node.js 20.19+. Includes over 400 rules from plugins like Unicorn, import-x, n, stylistic, typescript-eslint, and ava. Key differentiator: enforces a strict, opinionated style (tabs by default, semicolons, no jQuery, etc.) and merges TypeScript config in recent versions. Active development cadence with major breaking changes each year.","status":"active","version":"0.51.0","language":"javascript","source_language":"en","source_url":"https://github.com/xojs/eslint-config-xo","tags":["javascript","eslintconfig","xo","xoxo","hugs","kisses","happy","happiness","code","typescript"],"install":[{"cmd":"npm install eslint-config-xo","lang":"bash","label":"npm"},{"cmd":"yarn add eslint-config-xo","lang":"bash","label":"yarn"},{"cmd":"pnpm add eslint-config-xo","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency: ESLint 10 required.","package":"eslint","optional":false},{"reason":"Peer dependency: TypeScript 5.9+ required (even for JS projects, for type-aware rules).","package":"typescript","optional":true}],"imports":[{"note":"Default export is a function. Since v0.51.0, it returns an array of config objects. You must spread it into your flat config array.","wrong":"const eslintConfigXo = require('eslint-config-xo');","symbol":"eslintConfigXo","correct":"import eslintConfigXo from 'eslint-config-xo';"},{"note":"Package is ESM-only; require() will throw ERR_REQUIRE_ESM.","wrong":"const eslintConfigXo = require('eslint-config-xo');","symbol":"require","correct":"import eslintConfigXo from 'eslint-config-xo';"},{"note":"Options: browser (boolean), space (boolean|number for tab width), semicolon (boolean). Default is tabs, Node globals, semicolons on.","symbol":"eslintConfigXo with options","correct":"export default [...eslintConfigXo({ browser: true, space: true, semicolon: false })];"}],"quickstart":{"code":"import eslintConfigXo from 'eslint-config-xo';\n\nexport default [\n  ...eslintConfigXo(),\n  // you can add overrides\n  {\n    rules: {\n      'no-console': 'off',\n    },\n  },\n];\n","lang":"javascript","description":"Shows minimal eslint.config.js using eslint-config-xo v0.51.0+ flat config pattern."},"warnings":[{"fix":"Replace `export default eslintConfigXo;` with `export default [...eslintConfigXo()];`","message":"v0.51.0 changed default export from array to function. Must call eslintConfigXo() and spread the result.","severity":"breaking","affected_versions":">=0.51.0"},{"fix":"Use options object: eslintConfigXo({ space: true, browser: true })","message":"v0.51.0 removed sub-path exports ./space and ./browser.","severity":"breaking","affected_versions":">=0.51.0"},{"fix":"Rewrite to eslint.config.js flat config format.","message":"v0.46.0 migrated to flat config and ESLint 9. Old .eslintrc format no longer supported.","severity":"breaking","affected_versions":">=0.46.0 <0.51.0"},{"fix":"Update Node.js to 20+.","message":"v0.49.0 required Node.js 20. Added no-unused-private-class-members rule.","severity":"breaking","affected_versions":">=0.49.0"},{"fix":"Remove eslint-config-xo-typescript from dependencies.","message":"Replaced eslint-config-xo-typescript; use eslint-config-xo directly with TypeScript support built-in.","severity":"deprecated","affected_versions":">=0.51.0"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Use `import eslintConfigXo from 'eslint-config-xo';` in a module context (\"type\": \"module\" in package.json).","cause":"Package is ESM-only; using require() instead of import.","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module not supported"},{"fix":"Export `[...eslintConfigXo()]` instead of `eslintConfigXo`.","cause":"Using eslintConfigXo directly as array (v0.51.0+) without calling it as a function.","error":"TypeError: {(intermediate value)} is not iterable"},{"fix":"Run `npm install --save-dev eslint-config-xo@latest` and ensure ESLint 10+.","cause":"Package not installed or ESLint version <10.","error":"ESLint couldn't find the config \"eslint-config-xo\""}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}