eslint-plugin-react-hooks
- Version 5.2.0
- Published
- 278 kB
- No dependencies
- MIT license
Install
npm i eslint-plugin-react-hooks
yarn add eslint-plugin-react-hooks
pnpm add eslint-plugin-react-hooks
Overview
ESLint rules for React Hooks
Index
Variables
variable configs
const configs: { 'recommended-legacy': { plugins: string[]; rules: { 'react-hooks/rules-of-hooks': 'error'; 'react-hooks/exhaustive-deps': 'warn'; }; }; recommended: { plugins: string[]; rules: { 'react-hooks/rules-of-hooks': 'error'; 'react-hooks/exhaustive-deps': 'warn'; }; }; 'recommended-latest': { name: string; plugins: { readonly 'react-hooks': ESLint.Plugin }; rules: { 'react-hooks/rules-of-hooks': 'error'; 'react-hooks/exhaustive-deps': 'warn'; }; };};
variable meta
const meta: { name: string };
variable rules
const rules: { 'rules-of-hooks': { meta: { type: 'problem'; docs: { description: string; recommended: true; url: string }; }; create(context: Rule.RuleContext): { onCodePathSegmentStart: (segment: Rule.CodePathSegment) => number; onCodePathSegmentEnd: () => Rule.CodePathSegment | undefined; onCodePathStart: () => number; onCodePathEnd(codePath: Rule.CodePath, codePathNode: Rule.Node): void; CallExpression( node: estree.CallExpression & Rule.NodeParentExtension ): void; Identifier(node: estree.Identifier & Rule.NodeParentExtension): void; 'CallExpression:exit'( node: estree.CallExpression & Rule.NodeParentExtension ): void; FunctionDeclaration( node: estree.FunctionDeclaration & Rule.NodeParentExtension ): void; ArrowFunctionExpression( node: estree.ArrowFunctionExpression & Rule.NodeParentExtension ): void; }; }; 'exhaustive-deps': { meta: { type: 'suggestion'; docs: { description: string; recommended: true; url: string }; fixable: 'code'; hasSuggestions: true; schema: { type: 'object'; additionalProperties: false; enableDangerousAutofixThisMayCauseInfiniteLoops: boolean; properties: { additionalHooks: { type: 'string' }; enableDangerousAutofixThisMayCauseInfiniteLoops: { type: 'boolean'; }; }; }[]; }; create(context: Rule.RuleContext): { CallExpression: (node: estree.CallExpression) => void; }; };};
Package Files (2)
Dependencies (0)
No dependencies.
Dev Dependencies (16)
Peer Dependencies (1)
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/eslint-plugin-react-hooks
.
- Markdown[](https://www.jsdocs.io/package/eslint-plugin-react-hooks)
- HTML<a href="https://www.jsdocs.io/package/eslint-plugin-react-hooks"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3550 ms. - Missing or incorrect documentation? Open an issue for this package.