react_analyzer 0.1.0 copy "react_analyzer: ^0.1.0" to clipboard
react_analyzer: ^0.1.0 copied to clipboard

Analyzer plugin for React Dart — live diagnostics, fixes, and assists.

react_analyzer #

The IDE and dart analyze plugin for React Dart. It exposes the shared react_analysis rules through analysis_server_plugin and adds React-specific quick fixes and assists.

Enable the plugin #

After react_analyzer and react_analysis are available from your configured package source, add this top-level section to analysis_options.yaml:

plugins:
  react_analyzer: ^0.1.0

For local development, analysis_server_plugin also accepts an absolute path:

plugins:
  react_analyzer:
    path: /absolute/path/to/react_workspace/packages/react_analyzer

The plugin host resolves the plugin as its own package. A relative workspace path is therefore not portable. Restart the Dart analysis server after changing plugin configuration.

This workspace currently validates the plugin engine directly until the interdependent packages are published. The version-based configuration above is the consumer setup, not a claim that the packages are being published now.

Diagnostics #

Rule Detects
invalid_react_component unsupported component signatures and props
invalid_hook_call hooks outside components, in branches or loops, or after an early return
browser_api_during_ssr browser-only APIs used while rendering on the server
js_interop_in_server direct JS interop in server code
browser_import_in_server browser package imports crossing into server code
generated_bridge_import handwritten imports of generated implementation files

Available edits include adding @ClientOnly, replacing a generated bridge import with its public API, and converting a function to a React component.

Workspace validation #

From the repository root:

dart analyze packages/react_analyzer --fatal-infos
dart test packages/react_analyzer
dart test packages/react_analysis
dart test examples/plugin_validation

The direct engine and fixture tests remain authoritative when local plugin activation cannot resolve an unpublished workspace dependency.

0
likes
150
points
91
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Analyzer plugin for React Dart — live diagnostics, fixes, and assists.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

analysis_server_plugin, analyzer, analyzer_plugin, react_analysis

More

Packages that depend on react_analyzer