{"_id":"@chejholloway/eslint-plugin-result-guard","_rev":"2-a5ba71b0bd7853a45dd6d084141b1df3","name":"@chejholloway/eslint-plugin-result-guard","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.1":{"name":"@chejholloway/eslint-plugin-result-guard","version":"0.1.1","keywords":["eslint","eslint-plugin","result","neverthrow","typescript"],"license":"MIT","_id":"@chejholloway/eslint-plugin-result-guard@0.1.1","maintainers":[{"name":"chejholloway","email":"chejholloway@protonmail.com"}],"dist":{"shasum":"d66235412b7f499fcdd01f918d67758b471565f4","tarball":"https://registry.npmjs.org/@chejholloway/eslint-plugin-result-guard/-/eslint-plugin-result-guard-0.1.1.tgz","fileCount":15,"integrity":"sha512-bQ7jQ9oAdwRp6/ao3pzM1tkv7nBlAq2I+JgWYH1jWr4xbK1+Yw8Hk21qGJmQT8wUVOvlIUsaLIJ4U90kprUu/g==","signatures":[{"sig":"MEUCIFd8TuKdouZb6pFB1hCtl0sP6WW20PVi7xt/kvF8y8XGAiEAie9WYKEnuvCvvbCmhudcxhSKAuMTDtR0qKrEVCsEZvU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19940},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","lint:self":"eslint . --ext .ts,.tsx","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"chejholloway","email":"chejholloway@protonmail.com"},"repository":{"url":"git+https://github.com/chejholloway/result-guard.git","type":"git","directory":"packages/eslint-plugin"},"description":"ESLint rule that flags a neverthrow Result/ResultAsync value that's silently dropped instead of checked, chained, or explicitly discarded.","directories":{},"_nodeVersion":"24.18.1","dependencies":{"@typescript-eslint/utils":"^8.15.0"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^9.14.0","vitest":"^2.1.4","neverthrow":"^8.1.1","typescript":"^5.6.3","@typescript-eslint/parser":"^8.15.0","@typescript-eslint/rule-tester":"^8.15.0"},"peerDependencies":{"eslint":">=9.0.0","typescript":">=5.0.0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-result-guard_0.1.1_1785975450413_0.6559278216543583","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@chejholloway/eslint-plugin-result-guard","version":"0.1.2","description":"ESLint rule that flags a neverthrow Result/ResultAsync value that's silently dropped instead of checked, chained, or explicitly discarded.","type":"module","license":"MIT","repository":{"type":"git","url":"git+https://github.com/chejholloway/result-guard.git","directory":"packages/eslint-plugin"},"keywords":["eslint","eslint-plugin","result","neverthrow","typescript"],"main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","default":"./dist/index.js"}},"dependencies":{"@typescript-eslint/utils":"^8.15.0"},"peerDependencies":{"eslint":">=9.0.0","typescript":">=5.0.0"},"devDependencies":{"@typescript-eslint/parser":"^8.15.0","@typescript-eslint/rule-tester":"^8.15.0","eslint":"^9.14.0","neverthrow":"^8.1.1","typescript":"^5.6.3","vitest":"^2.1.4"},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","lint:self":"eslint . --ext .ts,.tsx","test":"vitest run"},"_nodeVersion":"24.18.1","_id":"@chejholloway/eslint-plugin-result-guard@0.1.2","dist":{"integrity":"sha512-UZDPTYtd5crQMBa2uv/oko5rXaODqj350Skh1vDKTzQpYDj/w/2ra9oKfHFEsclbuY6jmZMlECpWWRWxokhwyA==","shasum":"8e7b52c62cd4bfffbf3611ef14e70ed71b005135","tarball":"https://registry.npmjs.org/@chejholloway/eslint-plugin-result-guard/-/eslint-plugin-result-guard-0.1.2.tgz","fileCount":15,"unpackedSize":19940,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCPifPyeOQxYzaZM+AKUS26subNy3B+KQnP3eEMrtdueQIgVYaU7H+pwfrznne3RX1rjNvecIcZ/gf5Q857aHkzIeA="}]},"_npmUser":{"name":"chejholloway","email":"chejholloway@protonmail.com"},"directories":{},"maintainers":[{"name":"chejholloway","email":"chejholloway@protonmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eslint-plugin-result-guard_0.1.2_1786032066116_0.5779373040916496"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-06T00:17:30.242Z","modified":"2026-08-06T16:01:06.410Z","0.1.1":"2026-08-06T00:17:30.553Z","0.1.2":"2026-08-06T16:01:06.270Z"},"license":"MIT","keywords":["eslint","eslint-plugin","result","neverthrow","typescript"],"repository":{"type":"git","url":"git+https://github.com/chejholloway/result-guard.git","directory":"packages/eslint-plugin"},"description":"ESLint rule that flags a neverthrow Result/ResultAsync value that's silently dropped instead of checked, chained, or explicitly discarded.","maintainers":[{"name":"chejholloway","email":"chejholloway@protonmail.com"}],"readme":"# eslint-plugin-result-guard\n\nFlags a [neverthrow](https://github.com/supermacro/neverthrow) `Result`/`ResultAsync` value that's dropped without being checked, chained, awaited-and-checked, or explicitly discarded.\n\nTypeScript's type system won't force you to look at the `Err` branch — there's nothing like Rust's `#[must_use]`. This rule is that enforcement.\n\n## Install\n\n```bash\nnpm install -D eslint-plugin-result-guard\n```\n\n## Usage\n\n```js\n// eslint.config.js\nimport resultGuard from \"eslint-plugin-result-guard\";\n\nexport default [\n  {\n    plugins: { \"result-guard\": resultGuard },\n    rules: {\n      \"result-guard/no-unhandled-result\": \"error\",\n    },\n  },\n];\n```\n\nRequires type-aware linting (`parserOptions.projectService` or `parserOptions.project` pointing at a real `tsconfig.json`), since the rule checks the actual TypeScript type of each expression, not just its syntax.\n\n```ts\ndoWork(id); // flagged: Result value never checked\n\nconst result = doWork(id); // fine — captured for later handling\nvoid doWork(id); // fine — explicit, intentional discard\ndoWork(id).match(onOk, onErr); // fine — handled inline\n```\n\n## What this doesn't catch (yet)\n\n`const result = doWork(id); console.log(result.value);` — captured but never checked before an unsafe access. Catching that needs real control-flow analysis and is planned as a separate rule.\n\n## License\n\nMIT\n","readmeFilename":""}