Skip to content

Calling :Connect as a statement in a Roact component should lint #383

@Kampfkarren

Description

@Kampfkarren

Roact components can be mounted and unmounted regularly. Connecting to an event as a statement means you can't disconnect it, creating memory leaks or use after unmount.

Would necessarily be a bit finicky, since it can only check you're calling something with :Connect, and there are likely APIs with their own unrelated Connect method, or weird maids-within-callbacks type deal, but these are likely extremely uncommon and would be worth the author just filtering them out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Relating to a lint directlyA-robloxArea: Roblox specificC-enhancementCategory: Feature request or improvement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions