I’ve recently released plugin that helps you to keep import style. It supports configuration via yaml. You also can derive your own plugin based on mine to share style all over your projects without copy-paste
How it looks (HLS also highlights that):
src/MyLib.hs:12:1: warning: [-Wx-import-style]
Use 'Data.Map.Strict'
|
12 | import Data.Map
| ^^^^^^^^^^^^^^^
src/MyLib.hs:13:1: warning: [-Wx-import-style]
Import should satisfy the following rules:
* Module should be qualified
* Alias should be Text
or
* Module should not be qualified
* Module should import only the following names: Text
|
13 | import Data.Text qualified as T
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^