gap icon indicating copy to clipboard operation
gap copied to clipboard

[Feature] Linter rule

Open EArminjon opened this issue 1 year ago • 2 comments

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)

EArminjon avatar Apr 16 '24 12:04 EArminjon

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

leventkantaroglu avatar Nov 13 '24 07:11 leventkantaroglu

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

EArminjon avatar Nov 13 '24 07:11 EArminjon