{"name":"eslint-config-xo","version":"2.0.0","description":"ESLint shareable config for XO","license":"MIT","repository":{"type":"git","url":"git+https://github.com/xojs/eslint-config-xo.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"sideEffects":false,"engines":{"node":">=22"},"scripts":{"test":"eslint && ava"},"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"],"dependencies":{"@eslint-community/eslint-plugin-eslint-comments":"^4.7.2","@eslint/compat":"^2.1.0","@eslint/css":"^1.4.0","@eslint/json":"^2.0.1","@eslint/markdown":"^8.0.3","@html-eslint/eslint-plugin":"^0.65.0","@stylistic/eslint-plugin":"^5.10.0","confusing-browser-globals":"^1.0.11","eslint-config-prettier":"^10.1.8","eslint-import-resolver-typescript":"^4.4.5","eslint-node-test":"^0.4.0","eslint-package-json":"^0.3.0","eslint-plugin-ava":"^17.0.1","eslint-plugin-import-x":"^4.17.1","eslint-plugin-jsdoc":"^64.2.1","eslint-plugin-n":"^18.3.0","eslint-plugin-prettier":"^5.5.6","eslint-plugin-regexp":"^3.2.0","eslint-plugin-unicorn":"^74.0.0","globals":"^17.11.0","typescript-eslint":"^8.68.0"},"devDependencies":{"ava":"^8.0.1","eslint":"^10.9.1","prettier":"^3.9.6","typescript":"^6.0.3"},"peerDependencies":{"eslint":">=10.4","prettier":">=3","typescript":">=6"},"peerDependenciesMeta":{"prettier":{"optional":true},"typescript":{"optional":true}},"ava":{"serial":true,"timeout":"10m"},"gitHead":"db99bebfae72e65e5c15c7d9c9afd631b0383e1a","types":"./index.d.ts","_id":"eslint-config-xo@2.0.0","bugs":{"url":"https://github.com/xojs/eslint-config-xo/issues"},"homepage":"https://github.com/xojs/eslint-config-xo#readme","_nodeVersion":"22.23.1","_npmVersion":"12.0.1","dist":{"integrity":"sha512-WzofzhwPQ/JRbCdv4TGwJuRqnrKOkDzLxi58ZKpdHs17QQBOsInE/jIkFnx0yCbV+knMlXvcEhiwgwNuL2XmUw==","shasum":"83adae6d239f53bd1d39e06086fcda24c13e7f1a","tarball":"http://registry-npm.ywwl.com/eslint-config-xo/download/eslint-config-xo-2.0.0.tgz","fileCount":18,"unpackedSize":104677,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIGKXvDthEQ3SU9uU0TX19QMmi0LQNoGMmjdxhqzGHUycAiEA5ye5vo4w65v4+AXlMfDs88hRpZMG4lh2qBvFsrzkzmM="}],"size":27863,"noattachment":false,"key":"/eslint-config-xo/-/eslint-config-xo-2.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eslint-config-xo_2.0.0_1788131349450_0.8999466879256539"},"_hasShrinkwrap":false,"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":1788131349594,"_cnpm_publish_time":1788131349594,"dist-tags":{"latest":"7.0.0"}}