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 can maybe see why it's disabled by default, but it would be nice to at least be able to use it if -f import is explicitly provided on the CLI. One use case is that the autofixer for isolatedDeclarations sometimes adds type annotations using inline imports, e.g.
constfoo: import('some/module').Foo= ...;
which is not our, and probably not many others', preferred style.
So what I'll do is use a regular expression to just remove all the import('...'). parts, but then now I need to add top-level imports for a bunch of types. This is where the import autofix comes in clutch. I commented out that line above in ts-fix and ran the autofixer and it pretty much worked flawlessly.
Just wanted to provide a data point, but feel free to close if not likely to be implemented.
The text was updated successfully, but these errors were encountered:
I noticed that the
import
autofix is disabled herets-fix/src/index.ts
Lines 260 to 262 in 2898fac
I can maybe see why it's disabled by default, but it would be nice to at least be able to use it if
-f import
is explicitly provided on the CLI. One use case is that the autofixer for isolatedDeclarations sometimes adds type annotations using inline imports, e.g.which is not our, and probably not many others', preferred style.
So what I'll do is use a regular expression to just remove all the
import('...').
parts, but then now I need to add top-level imports for a bunch of types. This is where theimport
autofix comes in clutch. I commented out that line above in ts-fix and ran the autofixer and it pretty much worked flawlessly.Just wanted to provide a data point, but feel free to close if not likely to be implemented.
The text was updated successfully, but these errors were encountered: