eslint-plugin-react-hooks-breadhead

1.0.0 • Public • Published

eslint-plugin-react-hooks-breadhead

What is this

This is a fork of eslint-plugin-react-hooks which allows omitting dispatch in dependencies array in hooks

Example

function Foo(props) {
  const dispatch = useThunk();
  useEffect(() => {
    console.log(dispatch);
  }, []); // <-- should not error
}
function Foo(props) {
  const test = {}
  useEffect(() => {
    console.log(test);
  }, []); // <-- should error
}

Installation


yarn add eslint-plugin-react-hooks-breadhead --dev

Usage

{
  "plugins": [
    "react-hooks-breadhead"
  ],
  "rules": {
    "react-hooks-breadhead/exhaustive-deps": "error"
  }
}

Readme

Keywords

none

Package Sidebar

Install

npm i eslint-plugin-react-hooks-breadhead

Weekly Downloads

5

Version

1.0.0

License

MIT

Unpacked Size

52 kB

Total Files

9

Last publish

Collaborators

  • uncleseneca