Skip to content

Use `import type` syntax

Axel Bocciarelli requested to merge import-types into master

Enabling the remaining two linting rules from galex that can be reasonably enabled at this point.

One of them is enforcing the use of import type for distinguishing type-only imports from other imports. I've configured importsNotUsedAsValues in tsconfig.json so VSCode automatically uses this syntax when auto-importing types. With this and ESLint's auto-fix-on-save, this should be fairly seemless.

If VSCode struggles and generates duplicated imports, or if you import a type and then end up using the type as a value (e.g. enums), you can run VSCode's "Organise imports" command to clean things up for you.

Merge request reports

Loading