Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Linter rule #25

Open
EArminjon opened this issue Apr 16, 2024 · 2 comments
Open

[Feature] Linter rule #25

EArminjon opened this issue Apr 16, 2024 · 2 comments

Comments

@EArminjon
Copy link

I think it's possible to create custom linter rule in flutter.

Could be great to have a linter to avoid coding :
SizedBox(width:10) instead of Gap(10)
SizedBox(height:10) instead of Gap(10)

@leventkantaroglu
Copy link

I suggest to do sth with use_design_system_item of https://pub.dev/packages/leancode_lint for a quick solution.

Here is a sample:

custom_lint:
  rules:
    - use_design_system_item:
      Gap:
        - instead_of: SizedBox
          from_package: flutter

@EArminjon
Copy link
Author

That will ban completely SizedBox which is not good. My proposal is more for SizedBox without any child.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants