{"_id":"@benhutchins/eslint-joy","_rev":"2-a4ba6468ff7ac1a66d509786a6325516","name":"@benhutchins/eslint-joy","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@benhutchins/eslint-joy","version":"1.0.0","keywords":["eslint","eslint-config","flat-config","typescript","react","nextjs","opinionated"],"author":{"name":"Benjamin Hutchins"},"license":"MIT","_id":"@benhutchins/eslint-joy@1.0.0","maintainers":[{"name":"benhutchins","email":"ben@hutchins.co"}],"homepage":"https://github.com/benhutchins/eslint-joy#readme","bugs":{"url":"https://github.com/benhutchins/eslint-joy/issues"},"dist":{"shasum":"14353f0db3991d0a6cb3ad39ea01ab515bb8831b","tarball":"https://registry.npmjs.org/@benhutchins/eslint-joy/-/eslint-joy-1.0.0.tgz","fileCount":5,"integrity":"sha512-9duLQKEJHDsrJr1HTrDFxnUo+dGy8vf3+f7eZHQ5aBQIVBBRwWzfkELRvTFqYwaZD7fKrF/NTDS7QWkxRcgmJA==","signatures":[{"sig":"MEQCIEnsGH/JfU1TppqfiLPilA3dldS3VTuTFKHaRASthXFcAiBACbtu14g7JPtMXB4zLytj4ZJc/dXGqZeKXqs8p9UXcQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":23806},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"c3d6511a2786ef62fc33b8196547c673ec749f9a","scripts":{"dev":"tsup --watch","lint":"eslint .","test":"bun test","build":"tsup","prepare":"husky || true","test:coverage":"bun test --coverage","prepublishOnly":"bun run build"},"_npmUser":{"name":"benhutchins","email":"ben@hutchins.co"},"repository":{"url":"git+https://github.com/benhutchins/eslint-joy.git","type":"git"},"_npmVersion":"11.12.1","description":"Opinionated ESLint flat config with TypeScript, React, and Next.js presets","directories":{},"_nodeVersion":"24.14.1","dependencies":{"eslint-plugin-import-x":"^4.0.0","@stylistic/eslint-plugin":"^5.0.0","@typescript-eslint/parser":"^8.0.0","eslint-plugin-unused-imports":"^4.0.0","@typescript-eslint/eslint-plugin":"^8.0.0","eslint-plugin-simple-import-sort":"^13.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jiti":"^2.6.1","tsup":"^8.0.0","husky":"^9.1.7","typescript":"^6.0.0","@types/node":"^25.6.0","eslint-plugin-n":"^17.0.0","semantic-release":"^25.0.3","eslint-plugin-react":"^7.37.0","@semantic-release/git":"^10.0.1","@next/eslint-plugin-next":"^16.0.0","@semantic-release/github":"^12.0.6","eslint-plugin-react-hooks":"^7.0.0","@semantic-release/changelog":"^6.0.3","conventional-changelog-conventionalcommits":"^9.0.0"},"peerDependencies":{"eslint":">=9.0.0","eslint-plugin-n":"^17.0.0","eslint-plugin-react":"^7.37.0","@next/eslint-plugin-next":"^14.0.0 || ^15.0.0 || ^16.0.0","eslint-plugin-react-hooks":"^5.0.0 || ^7.0.0"},"peerDependenciesMeta":{"eslint-plugin-n":{"optional":true},"eslint-plugin-react":{"optional":true},"@next/eslint-plugin-next":{"optional":true},"eslint-plugin-react-hooks":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/eslint-joy_1.0.0_1775846486361_0.37691201782125705","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@benhutchins/eslint-joy","version":"1.0.1","description":"Opinionated ESLint flat config with TypeScript, React, and Next.js presets","type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs","default":"./dist/index.js"}},"scripts":{"build":"tsup","dev":"tsup --watch","prepublishOnly":"bun run build","lint":"eslint .","test":"bun test","test:coverage":"bun test --coverage","prepare":"husky || true"},"peerDependencies":{"eslint":">=9.0.0","eslint-plugin-react":"^7.37.0","eslint-plugin-react-hooks":"^5.0.0 || ^7.0.0","@next/eslint-plugin-next":"^14.0.0 || ^15.0.0 || ^16.0.0","eslint-plugin-n":"^17.0.0"},"peerDependenciesMeta":{"eslint-plugin-react":{"optional":true},"eslint-plugin-react-hooks":{"optional":true},"@next/eslint-plugin-next":{"optional":true},"eslint-plugin-n":{"optional":true}},"dependencies":{"@stylistic/eslint-plugin":"^5.0.0","@typescript-eslint/eslint-plugin":"^8.0.0","@typescript-eslint/parser":"^8.0.0","eslint-plugin-import-x":"^4.0.0","eslint-plugin-simple-import-sort":"^13.0.0","eslint-plugin-unused-imports":"^4.0.0"},"devDependencies":{"@next/eslint-plugin-next":"^16.0.0","@semantic-release/changelog":"^6.0.3","@semantic-release/git":"^10.0.1","@semantic-release/github":"^12.0.6","@types/node":"^25.6.0","eslint-plugin-n":"^17.0.0","eslint-plugin-react":"^7.37.0","eslint-plugin-react-hooks":"^7.0.0","husky":"^9.1.7","jiti":"^2.6.1","conventional-changelog-conventionalcommits":"^9.0.0","semantic-release":"^25.0.3","tsup":"^8.0.0","typescript":"^6.0.0"},"keywords":["eslint","eslint-config","flat-config","typescript","react","nextjs","opinionated"],"author":{"name":"Benjamin Hutchins"},"license":"MIT","engines":{"node":">=18"},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/benhutchins/eslint-joy.git"},"gitHead":"15da4778f821bd524ab9227a01e46e99d820b6d1","_id":"@benhutchins/eslint-joy@1.0.1","bugs":{"url":"https://github.com/benhutchins/eslint-joy/issues"},"homepage":"https://github.com/benhutchins/eslint-joy#readme","_nodeVersion":"24.14.1","_npmVersion":"11.12.1","dist":{"integrity":"sha512-IRtalRZkF9Fdmjj2kyUJ+HSBouwWJaZkc0B8qfQRDaYFCAFwyGhMv1wR2BwNyUAGK4pl8rDzsGLSYpTIEyBWGA==","shasum":"ac11887b3b2acb1339e70ef497cd6c95bedcd2fb","tarball":"https://registry.npmjs.org/@benhutchins/eslint-joy/-/eslint-joy-1.0.1.tgz","fileCount":7,"unpackedSize":43928,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDZDo8rZdbgvHeYnTrxo5AEF86QWplom9N/Aopx63eIHAIgYCnV722efRnIB0cxd10JYLnsb+Q8GU3Y6efqbWljbzM="}]},"_npmUser":{"name":"benhutchins","email":"ben@hutchins.co"},"directories":{},"maintainers":[{"name":"benhutchins","email":"ben@hutchins.co"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eslint-joy_1.0.1_1775868082516_0.7845176360349289"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-10T18:41:26.245Z","modified":"2026-04-11T00:41:22.778Z","1.0.0":"2026-04-10T18:41:26.512Z","1.0.1":"2026-04-11T00:41:22.662Z"},"bugs":{"url":"https://github.com/benhutchins/eslint-joy/issues"},"author":{"name":"Benjamin Hutchins"},"license":"MIT","homepage":"https://github.com/benhutchins/eslint-joy#readme","keywords":["eslint","eslint-config","flat-config","typescript","react","nextjs","opinionated"],"repository":{"type":"git","url":"git+https://github.com/benhutchins/eslint-joy.git"},"description":"Opinionated ESLint flat config with TypeScript, React, and Next.js presets","maintainers":[{"name":"benhutchins","email":"ben@hutchins.co"}],"readme":"# eslint-joy\n\nOpinionated ESLint flat config with TypeScript, React, and Next.js presets.\n\nOne import. Zero friction. Just joy.\n\n## Install\n\n```bash\nbun add -d @benhutchins/eslint-joy eslint\n```\n\n## Quick Start\n\nCreate an `eslint.config.js` (or `eslint.config.ts`) at your project root:\n\n```js\nimport joy from '@benhutchins/eslint-joy'\n\nexport default joy()\n```\n\nThat's it — you get TypeScript, import sorting, stylistic rules, and cycle detection out of the box.\n\n## Options\n\n```ts\nimport joy from '@benhutchins/eslint-joy'\n\nexport default joy({\n  typescript: true,   // TypeScript rules (default: true)\n  react: false,       // React + React Hooks rules (default: false)\n  next: false,        // Next.js rules — implies react (default: false)\n  node: false,        // Node.js rules (default: false)\n  cycles: true,       // Circular dependency detection (default: true)\n  ignores: [],        // Additional glob patterns to ignore\n  overrides: [],      // Additional ESLint config objects appended last\n})\n```\n\n## Examples\n\n### TypeScript project (default)\n\n```js\nimport joy from '@benhutchins/eslint-joy'\n\nexport default joy()\n```\n\n### React project\n\n```bash\nbun add -d eslint-plugin-react eslint-plugin-react-hooks\n```\n\n```js\nimport joy from '@benhutchins/eslint-joy'\n\nexport default joy({ react: true })\n```\n\n### Next.js project\n\n```bash\nbun add -d eslint-plugin-react eslint-plugin-react-hooks @next/eslint-plugin-next\n```\n\n```js\nimport joy from '@benhutchins/eslint-joy'\n\nexport default joy({ next: true })\n```\n\n### Node.js project\n\n```bash\nbun add -d eslint-plugin-n\n```\n\n```js\nimport joy from '@benhutchins/eslint-joy'\n\nexport default joy({ node: true })\n```\n\n### Full-stack Next.js + Node\n\n```js\nimport joy from '@benhutchins/eslint-joy'\n\nexport default joy({\n  next: true,\n  node: true,\n})\n```\n\n### With project-specific overrides\n\n```js\nimport joy from '@benhutchins/eslint-joy'\n\nexport default joy({\n  react: true,\n  ignores: ['**/generated/**'],\n  overrides: [\n    {\n      files: ['**/*.test.ts'],\n      rules: {\n        'no-console': 'off',\n      },\n    },\n  ],\n})\n```\n\n### Manual composition\n\nIf you prefer full control, import individual configs directly:\n\n```js\nimport { base, imports, ignores, react } from '@benhutchins/eslint-joy'\n\nexport default [\n  ...ignores(),\n  ...base({ typescript: true }),\n  ...imports({ cycles: false }),\n  ...react(),\n]\n```\n\n## What's Included\n\n### Always on\n\n| Category | Details |\n|---|---|\n| **Stylistic** | 2-space indent, single quotes, no semicolons, trailing commas, 160 char line limit |\n| **Best practices** | `prefer-const`, `eqeqeq`, `no-eval`, `object-shorthand`, `prefer-template`, and more |\n| **Imports** | Auto-sorted imports/exports, unused import removal, no duplicates, no self-imports |\n| **TypeScript** | `consistent-type-imports`, `no-explicit-any` (warn), `prefer-optional-chain`, `switch-exhaustiveness-check` |\n| **Cycle detection** | `import-x/no-cycle` (disable with `cycles: false` if slow on large codebases) |\n\n### Opt-in\n\n| Preset | Flag | Peer dependencies |\n|---|---|---|\n| **React** | `react: true` | `eslint-plugin-react`, `eslint-plugin-react-hooks` |\n| **Next.js** | `next: true` | `eslint-plugin-react`, `eslint-plugin-react-hooks`, `@next/eslint-plugin-next` |\n| **Node.js** | `node: true` | `eslint-plugin-n` |\n\n## Performance Notes\n\nCycle detection (`import-x/no-cycle`) runs with unbounded depth by default. On very large codebases this can be slow. Disable it if lint times are a concern:\n\n```js\nexport default joy({ cycles: false })\n```\n\n## Requirements\n\n- Node.js >= 18\n- ESLint >= 9 (flat config)\n- ESM only (`\"type\": \"module\"` in your `package.json`)\n\n## License\n\nMIT\n","readmeFilename":"README.md"}