{ "manifest": { "name": "eslint-plugin-react-hooks", "description": "ESLint rules for React Hooks", "version": "4.6.0", "repository": { "type": "git", "url": "https://github.com/facebook/react.git", "directory": "packages/eslint-plugin-react-hooks" }, "files": [ "LICENSE", "README.md", "index.js", "cjs" ], "keywords": [ "eslint", "eslint-plugin", "eslintplugin", "react" ], "license": "MIT", "bugs": { "url": "https://github.com/facebook/react/issues" }, "engines": { "node": ">=10" }, "homepage": "https://reactjs.org/", "peerDependencies": { "eslint": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0" }, "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" }, "_registry": "npm", "_loc": "/home/josie/.cache/yarn/v6/npm-eslint-plugin-react-hooks-4.6.0-4c3e697ad95b77e93f8646aaa1630c1ba607edd3-integrity/node_modules/eslint-plugin-react-hooks/package.json", "readmeFilename": "README.md", "readme": "# `eslint-plugin-react-hooks`\n\nThis ESLint plugin enforces the [Rules of Hooks](https://reactjs.org/docs/hooks-rules.html).\n\nIt is a part of the [Hooks API](https://reactjs.org/docs/hooks-intro.html) for React.\n\n## Installation\n\n**Note: If you're using Create React App, please use `react-scripts` >= 3 instead of adding it directly.**\n\nAssuming you already have ESLint installed, run:\n\n```sh\n# npm\nnpm install eslint-plugin-react-hooks --save-dev\n\n# yarn\nyarn add eslint-plugin-react-hooks --dev\n```\n\nThen extend the recommended eslint config:\n\n```js\n{\n \"extends\": [\n // ...\n \"plugin:react-hooks/recommended\"\n ]\n}\n```\n\n### Custom Configuration\n\nIf you want more fine-grained configuration, you can instead add a snippet like this to your ESLint configuration file:\n\n```js\n{\n \"plugins\": [\n // ...\n \"react-hooks\"\n ],\n \"rules\": {\n // ...\n \"react-hooks/rules-of-hooks\": \"error\",\n \"react-hooks/exhaustive-deps\": \"warn\"\n }\n}\n```\n\n\n## Advanced Configuration\n\n`exhaustive-deps` can be configured to validate dependencies of custom Hooks with the `additionalHooks` option.\nThis option accepts a regex to match the names of custom Hooks that have dependencies.\n\n```js\n{\n \"rules\": {\n // ...\n \"react-hooks/exhaustive-deps\": [\"warn\", {\n \"additionalHooks\": \"(useMyCustomHook|useMyOtherCustomHook)\"\n }]\n }\n}\n```\n\nWe suggest to use this option **very sparingly, if at all**. Generally saying, we recommend most custom Hooks to not use the dependencies argument, and instead provide a higher-level API that is more focused around a specific use case.\n\n## Valid and Invalid Examples\n\nPlease refer to the [Rules of Hooks](https://reactjs.org/docs/hooks-rules.html) documentation and the [Hooks FAQ](https://reactjs.org/docs/hooks-faq.html#what-exactly-do-the-lint-rules-enforce) to learn more about this rule.\n\n## License\n\nMIT\n", "licenseText": "MIT License\n\nCopyright (c) Facebook, Inc. and its affiliates.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n" }, "artifacts": [], "remote": { "resolved": "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz#4c3e697ad95b77e93f8646aaa1630c1ba607edd3", "type": "tarball", "reference": "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz", "hash": "4c3e697ad95b77e93f8646aaa1630c1ba607edd3", "integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==", "registry": "npm", "packageName": "eslint-plugin-react-hooks", "cacheIntegrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g== sha1-TD5petlbd+k/hkaqoWMMG6YH7dM=" }, "registry": "npm", "hash": "4c3e697ad95b77e93f8646aaa1630c1ba607edd3" }