Skip to content

Disposable object linting#48

Merged
kentcdodds merged 7 commits intomainfrom
cursor/disposable-object-linting-7871
Feb 13, 2026
Merged

Disposable object linting#48
kentcdodds merged 7 commits intomainfrom
cursor/disposable-object-linting-7871

Conversation

@kentcdodds
Copy link
Member

@kentcdodds kentcdodds commented Feb 13, 2026

Add ESLint rule no-manual-dispose to warn against manual resource disposal in favor of using declarations.


Open in Cursor Open in Web


Note

Low Risk
Configuration-only change plus a new warning-level lint rule; no runtime behavior or production code paths are affected beyond potential new lint warnings.

Overview
Adds a custom lint plugin (lint-rules/epic-web-plugin.js) and rule (epic-web/no-manual-dispose) to warn on manual resource disposal patterns (direct [Symbol.dispose]/[Symbol.asyncDispose] calls, and .dispose() inside finally blocks), with accompanying tests and documentation.

Enables the rule at warn level in eslint.js and registers the plugin for Oxlint via jsPlugins in oxlint-config.json, and updates the README to point to the new custom rule docs (lint-rules/index.md).

Written by Cursor Bugbot for commit 92190cb. This will update automatically on new commits. Configure here.

cursoragent and others added 2 commits February 13, 2026 19:55
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@cursor
Copy link

cursor bot commented Feb 13, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@kentcdodds kentcdodds marked this pull request as ready for review February 13, 2026 19:59
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is ON. A Cloud Agent has been kicked off to fix the reported issue.

@cursor
Copy link

cursor bot commented Feb 13, 2026

Bugbot Autofix prepared fixes for 1 of the 1 bugs found in the latest run.

  • ✅ Fixed: Finally detection ignores function boundaries
    • Stopped finally detection from crossing function boundaries so nested functions in finally blocks no longer trigger the manual-dispose report.

cursoragent and others added 4 commits February 13, 2026 20:12
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
Co-authored-by: Kent C. Dodds <me+github@kentcdodds.com>
@kentcdodds kentcdodds merged commit e664169 into main Feb 13, 2026
5 checks passed
@kentcdodds kentcdodds deleted the cursor/disposable-object-linting-7871 branch February 13, 2026 20:33
@github-actions
Copy link

🎉 This PR is included in version 1.23.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments