{"name":"eslint-config-xo","version":"0.48.0","keywords":["eslintconfig","xo","xoxo","hugs","kisses","happy","happiness","code","quality","style","lint","linter","jscs","jshint","jslint","eslint","validate","code style","standard","strict","check","checker","verify","enforce","hint","simple"],"author":{"url":"https://sindresorhus.com","name":"Sindre Sorhus","email":"sindresorhus@gmail.com"},"license":"MIT","_id":"eslint-config-xo@0.48.0","maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"homepage":"https://github.com/xojs/eslint-config-xo#readme","bugs":{"url":"https://github.com/xojs/eslint-config-xo/issues"},"dist":{"shasum":"c23028b4b10d56f8f55ed241a43afda3b699180b","tarball":"http://registry-npm.ywwl.com/eslint-config-xo/download/eslint-config-xo-0.48.0.tgz","fileCount":7,"integrity":"sha512-zINsjr18HJQtTRfod95Vz5wAwcIuN1ss8tRqFdSqj8fvXxJNYLrnEpE+Vderxu4Ydm3yIhYNyEUuP/c4wZerWA==","signatures":[{"sig":"MEYCIQCsUqFAN/n1sQP7aze3dBOJ7d7r5Qk7Rw/YViaqobUa+QIhAOlnO5RhEDoUPKyBayHTCwdnBZzKOJykSjk/CZ4awOUG","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21689,"size":6574,"noattachment":false,"key":"/eslint-config-xo/-/eslint-config-xo-0.48.0.tgz"},"type":"module","engines":{"node":">=18.18"},"exports":{".":"./index.js","./space":"./space.js","./browser":"./browser.js","./space/browser":"./space-browser.js"},"funding":"https://github.com/sponsors/sindresorhus","gitHead":"c8d52449626bc48a8d7c82ccc647b471110871ae","scripts":{"test":"eslint && ava"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"repository":{"url":"git+https://github.com/xojs/eslint-config-xo.git","type":"git"},"_npmVersion":"10.9.2","description":"ESLint shareable config for XO","directories":{},"sideEffects":false,"_nodeVersion":"20.19.1","dependencies":{"globals":"^16.0.0","@eslint/css":"^0.7.0","@eslint/json":"^0.12.0","@stylistic/eslint-plugin":"^4.2.0","confusing-browser-globals":"1.0.11"},"_hasShrinkwrap":false,"devDependencies":{"ava":"^6.2.0","eslint":"^9.27.0"},"peerDependencies":{"eslint":">=9.27.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-config-xo_0.48.0_1753185709062_0.6100275415030312","host":"s3://npm-registry-packages-npm-production"},"readme":"# eslint-config-xo\n\n> ESLint [shareable config](https://eslint.org/docs/developer-guide/shareable-configs.html) for [XO](https://github.com/xojs/xo) with support for JavaScript, TypeScript, HTML, and Markdown\n\nThis is for advanced users. [You probably want to use XO directly.](#use-the-xo-cli-instead)\n\n**Use the [XO issue tracker](https://github.com/xojs/xo/issues) instead of this one.**\n\n## Install\n\n```sh\nnpm install --save-dev eslint-config-xo\n```\n\n## Usage\n\n```js\n// eslint.config.js\nimport eslintConfigXo from 'eslint-config-xo';\nimport {defineConfig} from 'eslint/config';\n\nexport default defineConfig([\n\t...eslintConfigXo(),\n]);\n```\n\n### Options\n\n#### browser\n\nType: `boolean`\\\nDefault: `false`\n\nUse browser globals instead of Node.js globals.\n\n```js\nexport default defineConfig([\n\t...eslintConfigXo({browser: true}),\n]);\n```\n\n#### space\n\nType: `boolean | number`\\\nDefault: `false`\n\nUse spaces for indentation instead of tabs. Set to `true` for 2 spaces, or a number for a custom count.\n\n```js\nexport default defineConfig([\n\t...eslintConfigXo({space: true}),\n]);\n```\n\n#### semicolon\n\nType: `boolean`\\\nDefault: `true`\n\nUse semicolons at the end of statements. Set to `false` to enforce no semicolons.\n\n```js\nexport default defineConfig([\n\t...eslintConfigXo({semicolon: false}),\n]);\n```\n\n#### prettier\n\nType: `boolean | 'compat'`\\\nDefault: `false`\n\nIntegrate [Prettier](https://prettier.io).\n\n- `true` — Run Prettier as an ESLint rule using XO's Prettier style, and disable the stylistic rules that would conflict with it. Requires `prettier` to be installed.\n- `'compat'` — Only disable the stylistic rules that conflict with Prettier, for when you run Prettier separately (for example, from your editor or a script).\n\n```js\nexport default defineConfig([\n\t...eslintConfigXo({prettier: true}),\n]);\n```\n\nPrettier options you set in a `.prettierrc` still apply for anything XO does not configure (like `printWidth` or plugins), but XO's own style settings take precedence.\n\n#### gitignore\n\nType: `string`\n\nIgnore paths listed in your project's `.gitignore` file.\n\nPass `import.meta.url` so the `.gitignore` is resolved relative to your ESLint config file. It is a no-op if the file does not exist.\n\n```js\nexport default defineConfig([\n\t...eslintConfigXo({gitignore: import.meta.url}),\n]);\n```\n\n> [!NOTE]\n> This is not needed when using the [XO CLI](https://github.com/xojs/xo), which already respects `.gitignore`.\n\n## TypeScript\n\nTypeScript is supported out of the box. If [`typescript`](https://github.com/microsoft/TypeScript) is installed, TypeScript rules are automatically enabled. For JavaScript-only projects, `typescript` is not required.\n\n## HTML\n\nHTML files (`*.html`) are linted automatically using [`@html-eslint/eslint-plugin`](https://github.com/yeonjuan/html-eslint), covering best practices, accessibility, SEO, and style.\n\n## Markdown\n\nMarkdown files (`*.md`) are linted automatically using [`@eslint/markdown`](https://github.com/eslint/markdown), covering link/image correctness, heading structure, and more.\n\n## Custom rules\n\n### xo/import-specifier-newline\n\nWhen an import spans multiple lines, each specifier must be on its own line. Autofixable.\n\n```js\n// Bad\nimport {\n\tfoo, bar, baz,\n} from 'x';\n\n// Good\nimport {\n\tfoo,\n\tbar,\n\tbaz,\n} from 'x';\n\n// Single-line imports are not affected\nimport {foo, bar} from 'x';\n```\n\n## Included plugins\n\n- [`eslint-plugin-unicorn`](https://github.com/sindresorhus/eslint-plugin-unicorn)\n- [`eslint-node-test`](https://github.com/sindresorhus/eslint-node-test)\n- [`eslint-package-json`](https://github.com/sindresorhus/eslint-package-json)\n- [`eslint-plugin-ava`](https://github.com/avajs/eslint-plugin-ava)\n- [`eslint-plugin-import-x`](https://github.com/un-ts/eslint-plugin-import-x)\n- [`eslint-plugin-n`](https://github.com/eslint-community/eslint-plugin-n)\n- [`@eslint-community/eslint-plugin-eslint-comments`](https://github.com/eslint-community/eslint-plugin-eslint-comments)\n- [`@stylistic/eslint-plugin`](https://github.com/eslint-stylistic/eslint-stylistic)\n- [`typescript-eslint`](https://github.com/typescript-eslint/typescript-eslint)\n- [`@html-eslint/eslint-plugin`](https://github.com/yeonjuan/html-eslint)\n- [`@eslint/markdown`](https://github.com/eslint/markdown)\n- [`eslint-plugin-regexp`](https://github.com/ota-meshi/eslint-plugin-regexp)\n- [`eslint-plugin-jsdoc`](https://github.com/gajus/eslint-plugin-jsdoc)\n- [`eslint-plugin-prettier`](https://github.com/prettier/eslint-plugin-prettier) *(only when the [`prettier`](#prettier) option is enabled)*\n\n## Use the XO CLI instead\n\nXO is an ESLint wrapper with great defaults.\n\nHere are some reason why you should use the [XO CLI](https://github.com/xojs/xo) instead of this config:\n\n- XO comes bundled with this config.\n- [Beautiful output.](https://github.com/sindresorhus/eslint-formatter-pretty)\n- No need to specify file paths to lint. It will lint all JS files except [commonly ignored paths](https://github.com/xojs/xo#ignores).\n- Super simple to add XO to a project with [`$ npm init xo`](https://github.com/xojs/create-xo).\n- Config/rule overrides per files/globs.\n- [Prettier](https://prettier.io) integration.\n- [React](https://github.com/xojs/eslint-config-xo-react) support.\n- Can open all files with errors at the correct line in your editor. *(See the `--open` flag)*\n- The [editor plugins](https://github.com/xojs/xo#editor-plugins) are IMHO better than the ESLint ones. *(Subjective)*\n\ntl;dr You miss out on a lot by just using this config.\n\n## Related\n\n- [eslint-config-xo-react](https://github.com/xojs/eslint-config-xo-react) - ESLint shareable config for React to be used with this config\n","publish_time":1753185709236,"_cnpm_publish_time":1753185709236,"dist-tags":{"latest":"7.0.0"}}