Skip to main content

Module ast

Module ast 

Source

Re-exports§

pub use max_component_size::MaxComponentSizeRule;
pub use no_cascading_set_state::NoCascadingSetStateRule;
pub use no_click_handler::NoDivClickHandlerRule;
pub use no_click_handler::NoSpanClickHandlerRule;
pub use no_derived_state_effect::NoDerivedStateEffectRule;
pub use no_nested_components::NoNestedComponentsRule;
pub use no_object_dep_array::NoObjectDepArrayRule;
pub use no_outline_none::NoOutlineNoneRule;
pub use no_regexp_in_render::NoRegexpInRenderRule;
pub use prefer_use_reducer::PreferUseReducerRule;
pub use require_img_alt::RequireImgAltRule;

Modules§

max_component_size
no_cascading_set_state
no_click_handler
no_derived_state_effect
no_nested_components
no_object_dep_array
no_outline_none
no_regexp_in_render
prefer_use_reducer
require_img_alt

Structs§

ClassFragment
A fragment of a class string extracted from a JSX className/class attribute.

Enums§

Lang
Supported languages for AST parsing.

Functions§

collect_class_attributes
Walk the syntax tree and collect class strings from all className/class JSX attributes.
count_calls_in_scope
Count calls to a specific function within a node’s subtree, skipping nested component definitions.
detect_language
Detect language from file extension.
extract_classname_strings
Extract string fragments from a className attribute value node.
is_component_node
Check if a tree-sitter node represents a React component declaration.
parse_file
Parse a file into a tree-sitter syntax tree.