flutter_corelibrary icon indicating copy to clipboard operation
flutter_corelibrary copied to clipboard

Rename `use_design_system_item` to something more accurate

Open bartekpacia opened this issue 1 year ago • 3 comments

I think the name of the use_design_system_item lint rule is too specific for what it is actually capable of. It can be used for classes that are not related to design system (though I agree it's the most common use case, and the migration cost probably outweights the (lack of) benefits).

bartekpacia avatar Mar 21 '24 23:03 bartekpacia

What name would you suggest? I am open to changing it if we come up with a good name

shilangyu avatar Mar 22 '24 14:03 shilangyu

This lint rule essentially accepts a list of classes, I think the lint name should reflect this – i.e. the name should contain a plural:

Some ideas:

  • class_replacements/replace_classes
  • type_replacements/replace_types (this lint also works for enums/typedefs, right?)
  • custom_type_replacements
Here's what ChatGPT generated Screenshot 2024-03-23 at 00 49 06

bartekpacia avatar Mar 22 '24 23:03 bartekpacia

I suggest the 'avoid-banned-phase-usage' name for this rule. use_design_system_item is a limiting name. I think any alternative is more preferable

leventkantaroglu avatar Oct 07 '24 16:10 leventkantaroglu