{"_id":"@boring-stack-pkg/eslint-plugin-test-conventions","_rev":"2-575cd2ce259cbcb7bb3a9170a2ba36d2","name":"@boring-stack-pkg/eslint-plugin-test-conventions","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.1":{"name":"@boring-stack-pkg/eslint-plugin-test-conventions","version":"0.1.1","keywords":["eslint","eslintplugin","typescript","testing","vitest","jest","test-conventions"],"author":"","license":"MIT","_id":"@boring-stack-pkg/eslint-plugin-test-conventions@0.1.1","maintainers":[{"name":"agjs","email":"hi@aleksandar.xyz"}],"homepage":"https://github.com/AI-Starter-Templates/eslint-plugins#readme","bugs":{"url":"https://github.com/AI-Starter-Templates/eslint-plugins/issues"},"dist":{"shasum":"b244eef0088a07b038e8b04d1a327ef7a8c31aff","tarball":"https://registry.npmjs.org/@boring-stack-pkg/eslint-plugin-test-conventions/-/eslint-plugin-test-conventions-0.1.1.tgz","fileCount":13,"integrity":"sha512-Lnt2bI7y0+4FkOZP5rceTba89b9RMijWMg0X2elBr1UdyDTsEdcHM/ysSJAP68WEoRxSh3FPIYGhhX/ejRB0Tw==","signatures":[{"sig":"MEUCIAuXeDWS7ppw4ifW2UY55k6LWrD2R+FaWL8hct0HSrtnAiEAst4scNdh1K3gpDCgwT054CjdXPbg9aMrX/Fx8vJxhLE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@boring-stack-pkg%2feslint-plugin-test-conventions@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":41148},"main":"./dist/index.cjs","type":"module","_from":"file:boring-stack-pkg-eslint-plugin-test-conventions-0.1.1.tgz","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"},"./package.json":"./package.json"},"scripts":{"test":"vitest run","build":"tsup src/index.ts --format esm,cjs --dts --clean","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"agjs","email":"hi@aleksandar.xyz"},"_resolved":"/tmp/a699d3f6f2635e90466b03f6bf0bee43/boring-stack-pkg-eslint-plugin-test-conventions-0.1.1.tgz","_integrity":"sha512-Lnt2bI7y0+4FkOZP5rceTba89b9RMijWMg0X2elBr1UdyDTsEdcHM/ysSJAP68WEoRxSh3FPIYGhhX/ejRB0Tw==","repository":{"url":"git+https://github.com/AI-Starter-Templates/eslint-plugins.git","type":"git","directory":"eslint-plugin-test-conventions"},"_npmVersion":"10.9.7","description":"ESLint rules that catch the most common test-suite mistakes: focused tests, direct DB access from tests, and orphaned test files.","directories":{},"sideEffects":false,"_nodeVersion":"22.22.2","dependencies":{"micromatch":"4.0.5","@typescript-eslint/utils":"8.0.0"},"publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"tsup":"8.0.0","eslint":"9.0.0","vitest":"2.0.0","@eslint/js":"9.0.0","typescript":"6.0.3","@types/node":"22.0.0","@types/micromatch":"4.0.9","@typescript-eslint/parser":"8.0.0","@typescript-eslint/rule-tester":"8.0.0"},"peerDependencies":{"eslint":"8.57.0 || ^9.0.0","typescript":">=5.0.0","@typescript-eslint/parser":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-test-conventions_0.1.1_1779219599079_0.6105044845019167","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@boring-stack-pkg/eslint-plugin-test-conventions","version":"0.1.2","description":"ESLint rules that catch the most common test-suite mistakes: focused tests, direct DB access from tests, and orphaned test files.","type":"module","license":"MIT","author":"","repository":{"type":"git","url":"git+https://github.com/boringstack-xyz/eslint-plugins.git","directory":"eslint-plugin-test-conventions"},"publishConfig":{"access":"public"},"sideEffects":false,"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"},"./package.json":"./package.json"},"keywords":["eslint","eslintplugin","typescript","testing","vitest","jest","test-conventions"],"peerDependencies":{"@typescript-eslint/parser":">=8.0.0","eslint":"8.57.0 || ^9.0.0","typescript":">=5.0.0"},"dependencies":{"@typescript-eslint/utils":"8.0.0","micromatch":"4.0.5"},"devDependencies":{"@eslint/js":"9.0.0","@types/micromatch":"4.0.9","@types/node":"22.0.0","@typescript-eslint/parser":"8.0.0","@typescript-eslint/rule-tester":"8.0.0","eslint":"9.0.0","tsup":"8.0.0","typescript":"6.0.3","vitest":"2.0.0"},"scripts":{"build":"tsup src/index.ts --format esm,cjs --dts --clean","typecheck":"tsc --noEmit","test":"vitest run","test:watch":"vitest"},"_id":"@boring-stack-pkg/eslint-plugin-test-conventions@0.1.2","bugs":{"url":"https://github.com/boringstack-xyz/eslint-plugins/issues"},"homepage":"https://github.com/boringstack-xyz/eslint-plugins#readme","_integrity":"sha512-EmKoJ07RUA02TnkX7UqMNbQDbMBVB364i8p8Zbd99QNwdyJIKQZdg0f50C+NWlEBB2Lt0izzJODHxL6Og3Z4aA==","_resolved":"/tmp/2cc3cfe51bb255ad41756df74f0dc9d6/boring-stack-pkg-eslint-plugin-test-conventions-0.1.2.tgz","_from":"file:boring-stack-pkg-eslint-plugin-test-conventions-0.1.2.tgz","_nodeVersion":"22.22.3","_npmVersion":"11.15.0","dist":{"integrity":"sha512-EmKoJ07RUA02TnkX7UqMNbQDbMBVB364i8p8Zbd99QNwdyJIKQZdg0f50C+NWlEBB2Lt0izzJODHxL6Og3Z4aA==","shasum":"072961eefafbc99f2f0838657558197c2e50c014","tarball":"https://registry.npmjs.org/@boring-stack-pkg/eslint-plugin-test-conventions/-/eslint-plugin-test-conventions-0.1.2.tgz","fileCount":13,"unpackedSize":41403,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFtvaeF+cYfL3Fy+MM6xmJDRqCsFeYx7KWISnOab/x5jAiBGYXq1l/nbAVpmKwxnLnEepOtIQUZybCOqQDAc6hqZ1A=="}]},"_npmUser":{"name":"agjs","email":"hi@aleksandar.xyz"},"directories":{},"maintainers":[{"name":"agjs","email":"hi@aleksandar.xyz"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eslint-plugin-test-conventions_0.1.2_1779695646290_0.26070036318203793"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-19T19:39:58.919Z","modified":"2026-05-25T07:54:06.532Z","0.1.1":"2026-05-19T19:39:59.246Z","0.1.2":"2026-05-25T07:54:06.422Z"},"bugs":{"url":"https://github.com/boringstack-xyz/eslint-plugins/issues"},"license":"MIT","homepage":"https://github.com/boringstack-xyz/eslint-plugins#readme","keywords":["eslint","eslintplugin","typescript","testing","vitest","jest","test-conventions"],"repository":{"type":"git","url":"git+https://github.com/boringstack-xyz/eslint-plugins.git","directory":"eslint-plugin-test-conventions"},"description":"ESLint rules that catch the most common test-suite mistakes: focused tests, direct DB access from tests, and orphaned test files.","maintainers":[{"name":"agjs","email":"hi@aleksandar.xyz"}],"readme":"# eslint-plugin-test-conventions\n\n[![npm](https://img.shields.io/npm/v/@boring-stack-pkg/eslint-plugin-test-conventions?logo=npm)](https://www.npmjs.com/package/@boring-stack-pkg/eslint-plugin-test-conventions) [![source](https://img.shields.io/badge/source-github-blue?logo=github)](https://github.com/boringstack-xyz/eslint-plugins/tree/main/eslint-plugin-test-conventions)\n\nESLint rules that catch the most common test-suite mistakes:\n\n- **`no-focused-tests`** — `test.only` / `it.only` / `fdescribe` / `fit`\n  left in committed code. The single `.only` that turns CI green by\n  skipping everything else.\n- **`no-direct-db-in-tests`** — tests reaching into the DB driver\n  directly, bypassing the helpers entrypoint where you do connection\n  probing, isolation, and cleanup.\n- **`test-file-mirrors-source`** — orphaned `*.test.ts` files left\n  behind after a refactor, still passing, still giving you false\n  confidence in code that no longer exists.\n\n## Install\n\n```sh\npnpm add -D @boring-stack-pkg/eslint-plugin-test-conventions\n```\n\nPeer deps: `eslint >= 8.57`, `@typescript-eslint/parser >= 8`,\n`typescript >= 5`.\n\n## Use (flat config)\n\n```js\nimport tsParser from \"@typescript-eslint/parser\";\nimport testConventions from \"@boring-stack-pkg/eslint-plugin-test-conventions\";\n\nexport default [\n  {\n    files: [\"**/*.{ts,tsx}\"],\n    languageOptions: { parser: tsParser },\n    plugins: { \"test-conventions\": testConventions },\n    rules: {\n      \"test-conventions/no-focused-tests\": \"error\",\n      \"test-conventions/no-direct-db-in-tests\": \"error\",\n      \"test-conventions/test-file-mirrors-source\": \"error\",\n    },\n  },\n];\n```\n\nOr use the bundled config:\n\n```js\nimport testConventions from \"@boring-stack-pkg/eslint-plugin-test-conventions\";\n\nexport default [testConventions.configs.recommended];\n```\n\n## Rules\n\n| Rule                                                                 | Description                                            | Fixable |\n| -------------------------------------------------------------------- | ------------------------------------------------------ | ------- |\n| [`no-focused-tests`](docs/rules/no-focused-tests.md)                 | Disallow `.only` and bare aliases (`fdescribe`, `fit`) | –       |\n| [`no-direct-db-in-tests`](docs/rules/no-direct-db-in-tests.md)       | Tests must go through the helpers entrypoint           | –       |\n| [`test-file-mirrors-source`](docs/rules/test-file-mirrors-source.md) | Every test file must mirror an existing source file    | –       |\n\n## License\n\nMIT.\n","readmeFilename":"README.md"}