Skip to content

Remove unused contexts #34

@nikwotton

Description

@nikwotton

What is the problem this feature would solve?

When I use Effect's Context, it's easy to know when a context is missing as there is a compiler error without adding an Effect.provideService for example. If that context is no longer needed though, nothing tells me I can remove that code other than being vigilant. Similarly if the return type to my function is an Effect with a context that is unused, nothing enforces that I remove the context on my return type.

What is the feature you are proposing to solve the problem?

It'd be great to have a linter rules that can ideally automatically remove unused contexts, or at least flag them for me to look at and decide whether to remove manually.

What alternatives have you considered?

I looked around a little for a similar rule but couldn't find one. I'm no expert at custom EsLint rules to know if this is possible, but it'd be great if it was!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions