Skip to content

Remove `React` imports and use absolute import paths consistently

Axel Bocciarelli requested to merge react into master

The react-jsx transform in tsconfig means we don't need to import React to use JSX. This PR removes the remaining React.Something imports by importing Something directly.

I also turn all absolute file imports into relative imports. This is opinionated, sorry, happy to revert if you prefer. I find that absolutely importing project files makes it hard to identify external libraries imports.

Finally, I enable importsNotUsedAsValues in tsconfig.ts to enforce that type imports be written as import type ...

Edited by Axel Bocciarelli

Merge request reports

Loading