Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.

reactive-python/reactpy-flake8

Repository files navigation

flake8-idom-hooks

A Flake8 plugin that enforces the "rules of hooks" for IDOM.

The implementation is based on React's own ESLint plugin for hooks.

Install

pip install flake8-idom-hooks

Developer Installation

pip install -r requirements.txt pip install -e .

Run the tests

tox

Errors

ROH2** errors can be enabled with the --exhaustive-hook-deps flag or setting exhaustive_hook_deps = True in your flake8 config.

Code Message
ROH100 Hook is defined as a closure
ROH101 Hook was used outside component or hook definition
ROH102 Hook was used inside a conditional or loop statement
ROH200 A hook's dependency is not destructured - dependencies should be refered to directly, not via an attribute or key of an object
ROH201 Hook dependency args should be a literal list, tuple or None
ROH202 Hook dependency is not specified

About

Flake8 plugin for enforcing the rules of hooks for ReactPy

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages