jaspr_lints 0.6.1 copy "jaspr_lints: ^0.6.1" to clipboard
jaspr_lints: ^0.6.1 copied to clipboard

A collection of lints and assists for jaspr projects.

Jaspr Lints #

This package provides lints and code assists for Jaspr projects.

Setup: #

Add jaspr_lints as a plugin to your analysis_options.yaml file:

plugins:
  jaspr_lints:
    version: ^0.6.0
    diagnostics:
      sort_children_last: true
      prefer_html_components: true
      styles_ordering: true

After running dart pub get you now get additional lints and code assists in your IDE or when running dart analyze.

Lints #

  • Prefer HTML components like div(...) over Component.element(tag: 'div', ...). (Fix available)
  • Sort children last in HTML components. (Fix available)
  • Sort styles properties. (Fix available)
  • Prefer styles getter over (final) variable. (Fix available)

Code Assists: #

  • Create StatelessComponent / StatefulComponent / InheritedComponent
  • Convert StatelessComponent to StatefulComponent
  • Convert StatelessComponent to AsyncStatelessComponent
  • Remove component from the tree
  • Wrap component with div() / section() / ul() or any HTML component
  • Wrap component with other component
  • Wrap component with Builder
  • Extract subtree into StatelessComponent
  • Add styles to HTML component
  • Convert import to web-only / server-only import

See the full documentation for each lint and code assist here.

4
likes
150
points
1.51k
downloads

Documentation

Documentation
API reference

Publisher

verified publisherschultek.dev

Weekly Downloads

A collection of lints and assists for jaspr projects.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#jaspr #web #lints

Funding

Consider supporting this project:

github.com

License

MIT (license)

Dependencies

analysis_server_plugin, analyzer, analyzer_plugin, path, yaml

More

Packages that depend on jaspr_lints