{"_id":"@10stars/eslint-plugin-react-hooks","_rev":"6-a79d08da00eea68882411245e8360e57","name":"@10stars/eslint-plugin-react-hooks","dist-tags":{"latest":"5.1.0"},"versions":{"4.3.0":{"name":"@10stars/eslint-plugin-react-hooks","version":"4.3.0","keywords":["eslint","eslint-plugin","eslintplugin","react"],"license":"MIT","_id":"@10stars/eslint-plugin-react-hooks@4.3.0","maintainers":[{"name":"o_alexandrov","email":"web@alexandrov.co"}],"homepage":"https://reactjs.org/","bugs":{"url":"https://github.com/facebook/react/issues"},"dist":{"shasum":"58f83b87507871197fbf7ea728286bbb8eab0a01","tarball":"https://registry.npmjs.org/@10stars/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz","fileCount":3,"integrity":"sha512-hwgPT55Gi5ih/Rx8vw+mYBKw5PRtVkSaTffaMkqPJcKGfPV2UoirSrngQA0quMZsD7ThdB9y5MS8oUHWJ53gSw==","signatures":[{"sig":"MEUCIQDlOvvoGzNVVtji2Br+mdJ5d+YUaCYDawRM3qRYpXEmQgIgCs0V/wu+WsXZcTUioaZgPwquTFtlfZ7llifxH4Bdmm0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3891,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiFhjKACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpCkRAAj8XA5ub7amGEwsemUP7BwaNo3GLj+mijPMTzHKtkapr5yuXa\r\npwLzGB533LrQ/X16Z3lMOCyuQYDAM5AnIZM6HLFypV5PqP7Qs48yLhSACmDA\r\n8mHrAiCsRRS5uYJbzwCrHeLWiu0jyooYgyIXiRvl21fs8Xju4mimrA3NcAQH\r\ntNd0y9XG7IsOVFvNXnXSPtb7THpXEXD2NKzY8odvpMwcdCGoCi/oorEClDtI\r\nHSPNN03cvSskMX/VCCrESCNuCpY+1rQOtMCDhyq4K0CtaKeNUyvKmBqBMbqT\r\nviMr5SlN0JfsHTqE66zbKZRjjW4zvmNfgc/eJmHb3s884KhX/2hj1jgd6fJ8\r\n41p4urnPhDgPZr28ZjzQeRTR/BGGUqrx774avYGh7NDcJFBm61Cn/oDXI9lC\r\nzLyMMWlAqIy0UTtPjn4f+zNigw/AieJX9vtY11NRTX/Vgh6v9/Cck1HAe+z6\r\nxPrZ9zyKVjQynfkv2O8jSYP4RpwBX5oKm2Cw87pnWaVnZmgxNV0jL/vuD7FA\r\nqDtPfw819mq8eS3bK3dkcL99Knlh/8mthlGuc9mLlDBdE8zgagnhoKwL0uMa\r\nYK6pKjQHDZKtjf8sxchWD1PqcmbXGzn7xh5SdWCGNq2WOMJK40yzW1fSVwiH\r\nXHr2jnIPVLiYBHZP3OeDyAzyJNA1VidvXB0=\r\n=H9Nf\r\n-----END PGP SIGNATURE-----\r\n"},"engines":{"node":">=10"},"gitHead":"dcc0b2d26ffa9af20830f85a4fd8e399eafbf8ed","private":false,"_npmUser":{"name":"o_alexandrov","email":"web@alexandrov.co"},"repository":{"url":"git+https://github.com/facebook/react.git","type":"git","directory":"packages/eslint-plugin-react-hooks"},"_npmVersion":"8.1.2","description":"ESLint rules for React Hooks with ability to disable 'this' check","directories":{},"_nodeVersion":"16.13.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@typescript-eslint/parser-v2":"npm:@typescript-eslint/parser@^2.26.0","@typescript-eslint/parser-v3":"npm:@typescript-eslint/parser@^3.10.0","@typescript-eslint/parser-v4":"npm:@typescript-eslint/parser@^4.1.0","@typescript-eslint/parser-v5":"npm:@typescript-eslint/parser@^5.0.0-0"},"peerDependencies":{"eslint":"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-react-hooks_4.3.0_1645615306500_0.8033544711243918","host":"s3://npm-registry-packages"}},"4.3.1":{"name":"@10stars/eslint-plugin-react-hooks","version":"4.3.1","keywords":["eslint","eslint-plugin","eslintplugin","react"],"license":"MIT","_id":"@10stars/eslint-plugin-react-hooks@4.3.1","maintainers":[{"name":"o_alexandrov","email":"web@alexandrov.co"}],"homepage":"https://reactjs.org/","bugs":{"url":"https://github.com/facebook/react/issues"},"dist":{"shasum":"5516ecd18ec3315403a5f60c32d25d06e3d759e3","tarball":"https://registry.npmjs.org/@10stars/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.1.tgz","fileCount":3,"integrity":"sha512-gm8V8SPwT4Xdz5wqq7ISLDUA6Yl1morx2HFVytRoZFZe/vaGqo1SobxeFxEV0XT0RFA1zfRq3kST/EaZ73PEzQ==","signatures":[{"sig":"MEUCIQC6fMTMJbvp97+UZSXuGbpNIV8HJ1LF4Hslxbd3GzWecgIgTpHPlNxO3HNJjXwcdvSCNQSxsFKmgsT8abTJ6jkHU/M=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":3952,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiFh4ZACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo5Cw/9G+jNeAXHPTVyVzzHiS710jJa5T2C4fcFKev+d7x7mPUZkCcP\r\nkpMsirMdw+ySh06xo+S9bCznIlOdLl/78Qx3mSecYKzbeWNjPLZfJj+LsMrv\r\nHsY69bhh1QnaN132JnkrS8GpQ5WMCkwUNAY1mIJcY3AhdP3eAD5qiKomYk9f\r\n9ulhL+fJvYJyGQZZO3Stdo6jjnDHlw8Yqb66caYfdjUP4ytgPqZFemrK9hQH\r\n1pIrUxlK2rRQ9eCHXVTphh5Z6NNp2D9W95gjXXC9D9qfAVdVvvG4DuNqCdu1\r\nxMxs6xk3DZQ7bRamVkT/iSiTGNFoqlpN5c5e7u1bfG3XMplWhqptVn9f999q\r\nmEs4ZbavDbgBPdrGjrgewDVUqdKCMZ3/vXncFgadXrAjTtXLzDLDK6dUptkn\r\nYaJYjQkvvqbpeYw9YAYmCTR5+IVwNqvX6Om7BeXl+3HZtReGZJvWwK3HhWat\r\n0uWQOLdre8ajWys6pQ7O17uXZAwPnWnEIG+yIZ5/T8T06Mld7Pga1+W2byCf\r\njRgZ1/1GHFe4kUzJDKjX4h8t3RUDMkqgXKOujEgdQqM89+JQNIapsrP0trpB\r\nBQM4xhJLeBJ9GdaWMO66jhHz/gnRfBgyvYDE0RciCpRkS0x+wrEFI4DSpDc1\r\nIlJ7MPSnDrpqwooF/2yGyuUG6cWeei59pDw=\r\n=/d3L\r\n-----END PGP SIGNATURE-----\r\n"},"engines":{"node":">=10"},"gitHead":"dcc0b2d26ffa9af20830f85a4fd8e399eafbf8ed","private":false,"_npmUser":{"name":"o_alexandrov","email":"web@alexandrov.co"},"repository":{"url":"git+https://github.com/facebook/react.git","type":"git","directory":"packages/eslint-plugin-react-hooks"},"_npmVersion":"8.1.2","description":"ESLint rules for React Hooks with ability to disable 'this' check","directories":{},"_nodeVersion":"16.13.2","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"@typescript-eslint/parser-v2":"npm:@typescript-eslint/parser@^2.26.0","@typescript-eslint/parser-v3":"npm:@typescript-eslint/parser@^3.10.0","@typescript-eslint/parser-v4":"npm:@typescript-eslint/parser@^4.1.0","@typescript-eslint/parser-v5":"npm:@typescript-eslint/parser@^5.0.0-0"},"peerDependencies":{"eslint":"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-react-hooks_4.3.1_1645616665711_0.9208444516904406","host":"s3://npm-registry-packages"}},"4.3.3":{"name":"@10stars/eslint-plugin-react-hooks","version":"4.3.3","keywords":["eslint","eslint-plugin","eslintplugin","react"],"license":"MIT","_id":"@10stars/eslint-plugin-react-hooks@4.3.3","maintainers":[{"name":"o_alexandrov","email":"web@alexandrov.co"}],"homepage":"https://reactjs.org/","bugs":{"url":"https://github.com/facebook/react/issues"},"dist":{"shasum":"9ef6c39f4f86efa62a711ce7685599331011b993","tarball":"https://registry.npmjs.org/@10stars/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.3.tgz","fileCount":3,"integrity":"sha512-Km2zFvxhsS4nahkLun66ZHmQtug5NXpGsPV0zl5+Wf48tO2n11i1V737TMchMeQp5lwSBnC5vko56zd8YtBDsQ==","signatures":[{"sig":"MEYCIQD2Gc72bAJlUhqYMnP3PDBrC8wVcoIpm9rUCwz3T5M8TgIhAObbAgMNpJ+24TJQRWbJnP6Dy1mXEp7s0ySWGCvOGvyn","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":60926,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiFiEyACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrhHg//aDy2zblW80Sz2vOQ2zsJARc+C5X32Dta9IDLuM1BfWKf7Glp\r\nYxggqJyFgJDPiHdgtgrGUp0Q/OQIIF+snM8SCWAPHCnDvACQpY0/ncQOYbe9\r\nDTucLN3m8k4/wbv2SOo9O8CYrDa69bncLiKYX+536XBJRMtNuu/Dfz6gdemO\r\nStlyqaBPUMKlGzByZpM4c4U78pUtrJEe6D7oMUy9YWxsXbpwnXEMs1GoZKrj\r\nZGPqvbftNXo42uH31soBBAQn/mRlLucQ8nJ/M1cS7aJxd96aWDBT3saamAU7\r\nvNoSRPxquiA+4K/DSCGH5Q802Wv1nZ55p0yK9fqQ6s+cN3c1dXsLlKyWxJaX\r\naqJWlKOAA6hhSwQaeBGOcYStOVjvvsGRS4gJidlkRx5vWUMG/Uws+zvvK3OU\r\njoe0GwtP/XETMMBB8+lfM3S9GbhvqHj83XUGohREbUBFxFufmcVozOClkn53\r\nubXRVV9xcJceb9Um9mFfJioKnEKrSxUqrn1bjndOLC6+5UREEiwQ0Q9P/O7z\r\nKdyTACsUQl8+SZlRcYe1JjQSS1FjuCFFGn/Cnq5MOy7F3nittXh0TTQPbuhZ\r\n4TBvtUneHgcvaJzV8xytnW6McssBEl5jfauwGN0RSi8lkScvV1Er9AX5gu+B\r\ngy0FhVRPriVHdGwcCxRA42yANwMOOTga8wc=\r\n=vssG\r\n-----END PGP SIGNATURE-----\r\n"},"engines":{"node":">=10"},"gitHead":"dcc0b2d26ffa9af20830f85a4fd8e399eafbf8ed","private":false,"scripts":{"build":"npx esbuild index-mjs.js --bundle --outfile=index.js"},"_npmUser":{"name":"o_alexandrov","email":"web@alexandrov.co"},"repository":{"url":"git+https://github.com/facebook/react.git","type":"git","directory":"packages/eslint-plugin-react-hooks"},"_npmVersion":"8.5.0","description":"ESLint rules for React Hooks with ability to disable 'this' check","directories":{},"_nodeVersion":"17.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"eslint":"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-react-hooks_4.3.3_1645617457903_0.7223299840716289","host":"s3://npm-registry-packages"}},"4.3.4":{"name":"@10stars/eslint-plugin-react-hooks","version":"4.3.4","keywords":["eslint","eslint-plugin","eslintplugin","react"],"license":"MIT","_id":"@10stars/eslint-plugin-react-hooks@4.3.4","maintainers":[{"name":"o_alexandrov","email":"web@alexandrov.co"}],"homepage":"https://reactjs.org/","bugs":{"url":"https://github.com/facebook/react/issues"},"dist":{"shasum":"0cdc3bcc600aefaebb3ebf823956b69f1978e9c7","tarball":"https://registry.npmjs.org/@10stars/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.4.tgz","fileCount":3,"integrity":"sha512-8OzI3glom/4h7RtYIpk+ioAGGQRWlMu1ZgAMoB+o7RiOo1ZTnTM1RkmGZm1NbAYvWzsZcj9p1mzgeXdJihRD+g==","signatures":[{"sig":"MEUCIDDKRuDGt0FnW/dx89MNRp/0+tmbCbVSbBO1eyGFI1a5AiEA+QGRlU6JWdo4Ju9onkHkSqtCfySBxYVS5d+ttX1l730=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":89201,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiFkO5ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqn6w//eA8uDk2M/sv8jp6YybQq9YvswuytAD9VrKi/qP8cmUNf8f4C\r\ncYNs6PClhosmIE0922EnHzl/DddOpHpzctayn60myE5wf3my0fc5cuPskB6/\r\niUebQvf0X7bs5Wjm37ew8CQ0OdHM7Ue5GAT2YjURd/GjDS8G/8DbOLxSXcuH\r\n89Pb8KCki3zaC5OmF3E8p18st+ggUYDWdY99Z9LjotthLSxjZwPRZni/CaAU\r\nTacDIcdJ6mXGexL1/JwWRLxvliwrioN+qIXkbujZKDe30qZIkKNkJM4q5Lyj\r\nyaZ9oaubDs//vZMI3/IDcmw7N5r/ZlHb3A4bTbDGBobeBHASdTxCZE6n1l6K\r\niblaLBrYSmG5e1FTu4BtM2rXhi5R5p6Uwr8QjCkMyJbjr92uL5Jm59n0jPPa\r\nDoq96A8o7Og7yeerh7vFWwiybmxHTUV8lZVdDK3wCWiAQP0Vryo5Mv0RCMac\r\nKpumO2qU/GlpTALrRp6ZYmjVLy2pNMYsg5Yj/zErYjAM7B5TPQKCG36kDzK0\r\nZ1IudHkV3aHGH4kOmRrNc4rlCpTO6pJ1+VMKdTItwC8G3nVagmXUqikeD9N7\r\nZF2RumpJWb1SvlHxiNvNYBO0AiMJwfBXkXZ4GmRXAjZFWP71IbqPSJD4fc3h\r\ng6kJ0RoLXUVZS7PtKQD0XboOU7+9v04MWZ8=\r\n=LE3T\r\n-----END PGP SIGNATURE-----\r\n"},"engines":{"node":">=10"},"gitHead":"dcc0b2d26ffa9af20830f85a4fd8e399eafbf8ed","private":false,"scripts":{"build":"npx rollup index-mjs.js --file index.js --format cjs"},"_npmUser":{"name":"o_alexandrov","email":"web@alexandrov.co"},"repository":{"url":"git+https://github.com/facebook/react.git","type":"git","directory":"packages/eslint-plugin-react-hooks"},"_npmVersion":"8.5.0","description":"ESLint rules for React Hooks with ability to disable 'this' check","directories":{},"_nodeVersion":"17.5.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"eslint":"^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-react-hooks_4.3.4_1645626297239_0.532256509116942","host":"s3://npm-registry-packages"}},"5.0.0":{"name":"@10stars/eslint-plugin-react-hooks","version":"5.0.0","license":"MIT","_id":"@10stars/eslint-plugin-react-hooks@5.0.0","maintainers":[{"name":"o_alexandrov","email":"web@alexandrov.co"}],"dist":{"shasum":"1c254a7b39a7e1151c386afaaca1d78d3279cf85","tarball":"https://registry.npmjs.org/@10stars/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.0.0.tgz","fileCount":4,"integrity":"sha512-ljO18B/3FHS2wYSmY/vRL2oxa7BtbOI0o+uHn15H8plvDBaYg/weGzRkg/FZcEAMk85s5IcDRoH1h9XYWkou/Q==","signatures":[{"sig":"MEYCIQD8h1ftxKMWfNacMrTB0iFGEKBIQbC18tT0ckiVZUGGDAIhAMPxiwQjGywopq8r74TPVLdUvu2FnXKTiwPzsLh4IXJV","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":77462},"gitHead":"883203bf93e26af5d37f5ca008b5a18a09f74168","private":false,"_npmUser":{"name":"o_alexandrov","email":"web@alexandrov.co"},"_npmVersion":"11.1.0","description":"Fork of `eslint-plugin-react-hooks` & [eslint-plugin-react-hooks-configurable](https://github.com/Donov4n/eslint-plugin-react-hooks-configurable) that allows more configuration than the original plugin.","directories":{},"_nodeVersion":"22.12.0","dependencies":{"eslint-plugin-react-hooks":"^5.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"eslint":"^9"},"_npmOperationalInternal":{"tmp":"tmp/eslint-plugin-react-hooks_5.0.0_1741006539856_0.5225853219799517","host":"s3://npm-registry-packages-npm-production"}},"5.1.0":{"private":false,"publishConfig":{"access":"public"},"name":"@10stars/eslint-plugin-react-hooks","version":"5.1.0","license":"MIT","dependencies":{"eslint-plugin-react-hooks":"^5.2.0"},"peerDependencies":{"eslint":"^9"},"main":"index.ts","_id":"@10stars/eslint-plugin-react-hooks@5.1.0","gitHead":"883203bf93e26af5d37f5ca008b5a18a09f74168","description":"Fork of `eslint-plugin-react-hooks` & [eslint-plugin-react-hooks-configurable](https://github.com/Donov4n/eslint-plugin-react-hooks-configurable) that allows more configuration than the original plugin.","_nodeVersion":"22.12.0","_npmVersion":"11.1.0","dist":{"integrity":"sha512-kNlswmOhsVl44A5upixJJS0xVxnzujqfjhToUTKxv1TAgrK/evohfmz8LWVGXkqWcT+nhW5tQU9T+4ugLeXJjg==","shasum":"6cb1fdf698ad3a005536dbd74ca3c92d36eaa14d","tarball":"https://registry.npmjs.org/@10stars/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-5.1.0.tgz","fileCount":4,"unpackedSize":77209,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCnS61zFFiXxMxPJsu2wusLtOBx9HpT48chbIrzAcFvJQIgcCj4frnAVbtapw6DfFYVXqdQIvAUh4YVofkXegz/o90="}]},"_npmUser":{"name":"o_alexandrov","email":"web@alexandrov.co"},"directories":{},"maintainers":[{"name":"o_alexandrov","email":"web@alexandrov.co"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/eslint-plugin-react-hooks_5.1.0_1741007834794_0.9053183281358526"},"_hasShrinkwrap":false}},"time":{"created":"2022-02-23T11:21:46.425Z","modified":"2025-03-03T13:17:15.186Z","4.3.0":"2022-02-23T11:21:46.631Z","4.3.1":"2022-02-23T11:44:25.869Z","4.3.3":"2022-02-23T11:57:38.095Z","4.3.4":"2022-02-23T14:24:57.421Z","5.0.0":"2025-03-03T12:55:40.095Z","5.1.0":"2025-03-03T13:17:14.981Z"},"license":"MIT","description":"Fork of `eslint-plugin-react-hooks` & [eslint-plugin-react-hooks-configurable](https://github.com/Donov4n/eslint-plugin-react-hooks-configurable) that allows more configuration than the original plugin.","maintainers":[{"name":"o_alexandrov","email":"web@alexandrov.co"}],"readme":"# @10stars/eslint-plugin-react-hooks\n\nFork of `eslint-plugin-react-hooks` & [eslint-plugin-react-hooks-configurable](https://github.com/Donov4n/eslint-plugin-react-hooks-configurable) that allows more configuration than the original plugin.\n\n## Rules\n\n### Rule `@10stars/react-hooks/exhaustive-deps`\n\nThe rule works the same way as the original one, you just have more options to best configure it, see below.\n\n#### `additionalHooks` option\n\nThis option allow to validate dependencies of your custom hooks.\n\n```js\nimport reactHooks from \"@10stars/eslint-plugin-react-hooks\"\n\nexport default [\n  {\n    plugins: {\n      \"@10stars/react-hooks\": reactHooks,\n    },\n    rules: {\n      // ...\n      \"@10stars/react-hooks/exhaustive-deps\": [\n        \"warn\",\n        {\n          additionalHooks: \"(useMyCustomHook|useMyOtherCustomHook)\",\n        },\n      ],\n    },\n  },\n]\n```\n\nThe original rule already allowed you to do this, but with this plugin's rule, you have in addition the\npossibility to specify at which position the function that uses the dependencies is located in your custom hook.  \n(the original rule ALWAYS assumes that the function is placed first in the arguments)\n\nSuppose you have the following custom hook:\n\n```js\nconst useMyImperativeHandle = (ref, fn, deps) => {\n  // ...\n}\n\nexport default useMyImperativeHandle\n```\n\nIn this case, you will configure the rule as follows:\n\n```js\n// ... In configuration of the `@10stars/react-hooks/exhaustive-deps` rule:\n{\n  additionalHooks: {\n    '(useMyCustomHook|useMyOtherCustomHook)': 0,\n    'useMyImperativeHandle': 1,\n  }\n}\n```\n\n_(original idea of @squirly, see here <https://github.com/facebook/react/issues/16873#issuecomment-610702001>)_\n\n#### `additionalStableHooks` option\n\nThis option allow you to specify additional stable hooks in addition to those provided by react (`useState`, `useRef`, etc.).\n\n```js\nimport reactHooksConfigurable from \"@10stars/react-hooks\"\n\nexport default [\n  {\n    plugins: {\n      \"@10stars/react-hooks\": reactHooksConfigurable,\n    },\n    rules: {\n      // ...\n      \"@10stars/react-hooks/exhaustive-deps\": [\n        \"warn\",\n        {\n          additionalStableHooks: {\n            \"use.+Ref\": true,\n            useMyCustomUseState: [false, true],\n            useMyQuery: {\n              data: false,\n              refetch: true,\n            },\n          },\n        },\n      ],\n    },\n  },\n]\n```\n\nWith the original rule, only some core hooks are known to return stable elements:\n\n- The return value from `useRef`.\n- The setter from `useState`.\n- The dispatcher function from `useReducer`.\n- The `startTransition` function from `useTransition`.\n\nThe `additionalStableHooks` option of this plugin allows you to define some of your custom hooks as stable, fully or partially.\n(By \"partially\" i mean that some of the elements returned by your hook are stable but not some others, as for `useState`, `useReducer` above)\n\nNote that you can use a regex as a custom hook name if you use a naming convention for some of your stables hooks.\nFor example, if you always return a stable ref from your components named `use___Ref` (`useFunctionRef`, `useUpdatedRef`, etc.), you could define:\n\n```js\n// ... In configuration of the `@10stars/react-hooks/exhaustive-deps` rule:\n{\n  additionalStableHooks: { \"use.+Ref\": true },\n}\n```\n\n#### Partially stable custom hooks\n\nIf at least part of what your custom hook returns is not stable, you should avoid marking it as completely stable (e.g. `{ \"useMyHook\": true }`)\nInstead of doing that, you can specify which returns are stable and which are not.\n\n- **If your custom hook returns a tuple (like `useState`)**, instead of passing `true` in front of your hook name in the rule configuration,\n  pass an array with, for each element of the tuple returned by your hook, `true` or `false` depending on whether it is stable or not.\n\n  _Example with a custom hook named `useMyCustomUseState` which have the same return type as `useState`:_\n\n  ```js\n  // ... In configuration of the `@10stars/react-hooks/exhaustive-deps` rule:\n  {\n    additionalStableHooks: {\n      'useMyCustomUseState': [false, true],\n    },\n  }\n  ```\n\n- **If your custom hook returns an object of which only a few keys are stable**, instead of passing `true` in front of your hook name in the rule configuration,\n  pass an object with, for each key of your hook's return object, `true` or `false` depending on whether it is stable or not.\n\n  _Example:_  \n   Supposes we have a `useQuery` hook that return an object with:\n\n  - a `data` key containing the data from an external source.\n  - a `refetch` key which will contain a function allowing you to refetch the data whenever you want.  \n    => You have made this function stable (like the `dispatch` function from `useReducer`).\n\n  ```js\n  const useQuery = (endpoint) => {\n    // ...\n\n    return { data, refetch }\n  }\n\n  export default useQuery\n  ```\n\n  In this case, you will configure the rule as follows:\n\n  ```js\n  // ... In configuration of the `@10stars/react-hooks/exhaustive-deps` rule:\n  {\n    additionalStableHooks: {\n      'useQuery': { 'data': false, 'refetch': true },\n    },\n  }\n  ```\n\n### Rule `@10stars/react-hooks/rules-of-hooks`\n\nNo change from the way the original rule worked.\nPlease see [the React doc](https://reactjs.org/docs/hooks-rules.html) for more details about the \"rules of hooks\".\n\n### Rule ignoreThisDependency\n\nYou may find `exhaustive-deps` requires entire `props` if you use something like `props.doSomething()` in hooks.\nThis is intended behavior because `props` is referred as `this` by `doSomething`.\nYou can resolve it by destructuring as `exhaustive-deps` suggests.\n\nHowever, in some cases, you may want to avoid destructuring because of your coding style or conflict with `no-shadow`.\nIn the case, `ignoreThisDependency` may help.\n\n```js\n{\n  \"rules\": {\n    // ...\n    \"@10stars/react-hooks/exhaustive-deps\": [\"warn\", {\n      \"ignoreThisDependency\": \"props\"\n    }]\n  }\n}\n```\n\nValid options are `never` (default behavior), `props`, `always`.\n","readmeFilename":"README.md"}