Skip to content

Releases: JacobNWolf/biome-unnecessary-effect

v0.1.1

25 Sep 15:24
9e8c00f

Choose a tag to compare

What's Changed

  • fix(binaries): updates postinstall script to use proper working directory by @JacobNWolf in #8
  • fix(rules): removes cleanup false positive, tests suppressions by @JacobNWolf in #9
  • chore: updates biome, other dependencies by @JacobNWolf in #10
  • chore: bump to v0.1.1 by @JacobNWolf in #11

Full Changelog: v0.1.0...v0.1.1

v0.1.0

03 Jul 22:39
72f1a26

Choose a tag to compare

What's Changed

  • Initial release
  • Includes tested detection for:
    • avoidEmptyEffect: Identifies and flags for empty useEffect and useLayoutEffect hooks.
    • avoidInitializingState: Flags useEffect or useLayoutEffect hooks that are used solely for initializing state. This should ideally be done directly with useState.
    • avoidDerivedOrChainedState: Warns against storing derived state or chaining state updates within useEffect or useLayoutEffect. Consider computing derived values during render or combining state updates into a single event handler.
    • avoidDataFetchingInEffect: Warns against directly fetching data inside useEffect or useLayoutEffect. Recommends using data fetching libraries like React Query (TanStack Query) or SWR for better handling of loading, caching, and errors.
    • avoidParentChildCoupling: Warns against coupling parent behavior or state to a child component via useEffect or useLayoutEffect. Suggests lifting shared logic or state up to the parent component.
    • avoidEventHandler: Flags useEffect or useLayoutEffect hooks that behave like event handlers. Instead, the event handler should be called directly.
  • Adds executable builder for MacOS, Linux, and Windows that outputs relevant binary for system
  • Runs appropriate binary postinstall to adds file to the Biome configuration