You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to enforce side-effect-only imports to be in a separate import group at the top of the file -- the ones without the from keyword, e.g. import 'reflect-metadata' or import 'tsconfig-paths/register'.
Typescript Import Sorter, the vscode plugin that I use for sorting imports, allows to do this through a type: 'importMember' param (though the name is not really descriptive for me, but it's explained below).
Maybe would it be possible to add such a matching type to your linter rule too?
The text was updated successfully, but these errors were encountered:
I can add a new configuration option for each matching-rule that would specify the type of import declarations that it matches, which would be one of the four in the snippet above. That could overly complicate the configuration, so I reckon just having side-effect-imports-only: true would be enough. A matching rule that would match all the side effect imports would look as follows:
I'd like to enforce side-effect-only imports to be in a separate import group at the top of the file -- the ones without the
from
keyword, e.g.import 'reflect-metadata'
orimport 'tsconfig-paths/register'
.Typescript Import Sorter, the vscode plugin that I use for sorting imports, allows to do this through a
type: 'importMember'
param (though the name is not really descriptive for me, but it's explained below).Maybe would it be possible to add such a matching type to your linter rule too?
The text was updated successfully, but these errors were encountered: