Skip to main content

fsd_lint 0.1.4 copy "fsd_lint: ^0.1.4" to clipboard
fsd_lint: ^0.1.4 copied to clipboard

Lint rules for Feature Sliced Design architecture

example/README.md

Example Project for FSD Lint #

This project serves as a test case suite for verifying the fsd_lint rules.

Structure #

It follows a standard FSD structure:

  • app
  • pages
  • features
  • entities
  • shared

Test Cases #

Valid Imports #

  • lib/features/login/login_flow.dart: Imports entities (Higher -> Lower).
  • lib/pages/home/home_page.dart: Imports features (Higher -> Lower).
  • lib/app/routes/router.dart : Imports <segment> segment in app layer.
  • lib/shared/ui/login_button : Imports <segment> segment in shared layer.

Invalid Imports (Should trigger lints) #

  • lib/entities/user/bad_layer_import.dart: Imports features (Lower -> Higher hierarchy violation).
    • Triggers: fsd_layer_import
  • lib/features/login/bad_slice_import.dart: Imports another feature slice directly.
    • Triggers: fsd_slice_import

Usage #

Run the lint check manually:

dart run custom_lint
1
likes
120
points
200
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Lint rules for Feature Sliced Design architecture

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

analyzer, analyzer_plugin, custom_lint_builder, path

More

Packages that depend on fsd_lint