fluttercommunity / import_sorter

🎯 Automatically organize your dart imports. Maintainer: @gleich
https://pub.dev/packages/import_sorter
MIT License
174 stars 40 forks source link

Specify config in an independent file #67

Open pitazzo opened 2 years ago

pitazzo commented 2 years ago

Is your feature request related to a problem? Please describe. We are migrating our projects to a single monorepo and would love to have only one configuration set for all the stuff related to import sorting. Now, as ignoring files are only supported to be specified in the pubspec.yaml file we have to replicate that config per project instead of just once at the root of the monorepo.

Describe the solution you'd like We would love to specify the config of import_sorter in a YAML file which could be passed using a relative path to the sort command.

Describe alternatives you've considered I've tried to build a negative REGEX and pass it to the command (e.g. sort all imports here except those ending in *.g.dart), but without success. If such a regex is possible, no config file would be needed as all the config options could be passed in one global command.