Skip to content

linter: stack overflow error for react-hooks exhaustive-deps rule #10319

@nolanlawson

Description

@nolanlawson

What version of Oxlint are you using?

0.16.5

What command did you run?

oxlint -c .oxlintrc.json

What does your .oxlintrc.json config file look like?

{
  "$schema": "./node_modules/oxlint/configuration_schema.json",
  "plugins": ["react-hooks"],
  "rules": {
    "exhaustive-deps": "deny"
  }
}

What happened?

Oxlint crashes with an error:

thread '<unknown>' has overflowed its stack
fatal runtime error: stack overflow

I have reduced this down to a single .jsx file:

import { useEffect } from 'react'

export const Test = () => {
  const handleFrame = () => {
    setTimeout(handleFrame)
  }

  useEffect(() => {
    setTimeout(handleFrame)
  }, [])

  return (
    <></>
  )
}

I've also made a full reduced repro. You can run npm it in that project to reproduce the error.

$ node --version
v22.14.0
$ npm --version
10.9.2

Thank you for making oxlint! It rocks.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions