Skip to content

Biome should check for hook dependencies #2111

@leofarias-cpu

Description

@leofarias-cpu

Problem

useExhaustiveDependencies Is a very important correctness check to have in a linter, being recommended in both Biome and ESlint. But for some reason, it's disabled in our repo.

Just last week at the lab quite a few hours were spent trying to catch a bug caused by a missing dependency, which would have been solved instantly (or rather, wouldn't even have happpened) if this rule hadn't been turned off.

Solution

In biome.json:

{
  "linter": {
    "rules": {
      "correctness": {
        "useExhaustiveDependencies": "warn"
      }
    }
  }
}

Usage examples

No response

Dependencies

No response

References

https://biomejs.dev/linter/domains/#react-rules

Metadata

Metadata

Assignees

No one assigned

    Labels

    proposalProposals for enhancements to the software

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions