Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 711 Bytes

type-import-style.md

File metadata and controls

28 lines (18 loc) · 711 Bytes

type-import-style

The --fix option on the command line automatically fixes problems reported by this rule.

Enforces a particular style for type imports:

// 'identifier' style
import {type T, type U, type V} from '...';

// 'declaration' style
import type {T, U, V} from '...';

Options

The rule has a string option:

  • "identifier" (default): Enforces that type imports are all in the 'identifier' style.
  • "declaration": Enforces that type imports are all in the 'declaration' style.

This rule has an object option:

  • ignoreTypeDefault - if true, when in "identifier" mode, default type imports will be ignored. Default is false.