reactive-python / reactpy-flake8 Goto Github PK
View Code? Open in Web Editor NEWFlake8 plugin for enforcing the rules of hooks for IDOM
License: MIT License
Flake8 plugin for enforcing the rules of hooks for IDOM
License: MIT License
If the exhaustive_hook_deps
is recommended to be used, it's best to set it to default.
Also the readme doesn't mention how/if reactpy-flake8
settings can be changed from the .flake8
configuration file.
This package is currently unreleased, despite having been moved under the reactpy
umbrella.
This causes it to fail:
# just trying to create alias to the function
use_scope = some_module.use_scope
Right now, we don't produce an error for early returns:
@component
def example():
if True:
return None
use_state() # should produce error
There is no technical reason that this couldn't be supported however, as per this comment:
...semantics get very confusing. What would happen to state below? Would it be reset or preserved? What about effects? Would they be cleaned up (like on unmount) or would they run normally? If you think about it you’ll find cases that are very confusing regardless of the behavior you pick. Therefore, we disallow this pattern altogether. Put early return after calls to Hooks.
The new match statement in Python 3.10 (a conditional) isn't covered by the linter right now.
If someone has an idom.html
tree that spans >= 5 levels deep, we should probably generate a warning that they should splitting it apart into components.
For example
html.div(
html.div(
html.div(
html.div(
html.div(
html.div("Hello World"),
),
),
),
),
)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.