How to use eslint-plugin-react-hooks
Comprehensive eslint-plugin-react-hooks code examples:
How to use eslint-plugin-react-hooks.configs:
567 568 569 570 571 572 573 574 575 576
{ files: [supportedFileTypes], plugins: { 'react-hooks': reactHooks, }, rules: reactHooks.configs.recommended.rules, }, // Specific overrides for storybook { files: ['**/*.stories.tsx'],
How to use eslint-plugin-react-hooks.rules:
GitHub: joyn/eslint-config
19 20 21 22 23 24 25 26 27
test('contains only known plugin rules', testContainsKnownPluginRules, { ruleConfigSet: reactConfig.rules, pluginRules: { 'eslint-plugin-react': reactPlugin.rules, 'eslint-plugin-react-hooks': reactHooksPlugin.rules } });