#31350·fluentui

lint: introduce type import/exports checks

Author: HotellCreated May 13, 2024Updated Sep 29, 2026
LabelsArea: Build SystemFluent UI react-components (v9)Resolution: Soft CloseArea: Linting

1. introduce type import/export lint rules for v9

2. implement custom rule to disallow usage of inline type import/export

After investigation of "consistent-type-exports" rule, it wont prevent usage of inline type exports ecport {type A} from '...' -> ts-eslint team doesn't support old TS versions https://github.com/typescript-eslint/typescript-eslint/issues/7524.

We have 2 options: - bump v9 minbar to 4.5 - write custom rule that will dissallow any inline type imports/exports

❌ incorrect code

import { type A } from './foo';
export { type B} from './moo';

✅ correct code

bash
import type { A } from './foo'
export type { B } from './moo';

Related issues: