Currently useImportExtensions rule proposed fix uses a real file extension, which in case of TypeScript is ".ts". This is not correct.
See this discussion:
https://stackoverflow.com/questions/62619058/appending-js-extension-on-relative-import-statements-during-typescript-compilat
Specifically this comment from a person from TS team:
"TS does not re-write import paths. This something the TS team has been adamant about it. Write the paths that work at runtime, and if needed configure ts to make those paths work. ( in this case no configuration is needed)"
Current output:
i Explicit import improves compatibility with browsers and makes file resolution in tooling faster.
i Safe fix: Add potential import extension .ts.
lint/nursery/useImportExtensions
https://codesandbox.io/p/devbox/happy-worker-jg4p7k?workspaceId=5b49be67-1204-4d4f-b084-f984140cde23
i Explicit import improves compatibility with browsers and makes file resolution in tooling faster.
i Safe fix: Add potential import extension .js.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too