Skip to content

[import/named] Named type exports are not foundΒ #154

Closed
@kripod

Description

@kripod

Repro

{
  "rules": {
    // https://github.com/benmosher/eslint-plugin-import/blob/master/docs/rules/named.md
    // "Note that type imports, as used by Flow, are always ignored."
    "import/named": "error"
  }
}

utils.ts:

export type ResponsiveValue<T = string | number | undefined> =
  | T
  | { [key: number]: T };

export type ResponsiveObject<T> = {
  [K in keyof T]: ResponsiveValue<T[K]>
};

FlexLayout.ts:

import * as CSS from 'csstype';
import { ResponsiveObject } from './utils';

export type Props = ResponsiveObject<{
  flexDirection?: CSS.FlexDirectionProperty;
  flexWrap?: CSS.FlexWrapProperty;
}>;

Expected Result

No warnings should be emitted by ESLint.

Actual Result

[eslint] ResponsiveObject not found in './utils' [import/named] on line 2 of FlexLayout.ts

Versions

package version
@typescript-eslint/eslint-plugin 1.1.0
@typescript-eslint/parser 1.1.0
TypeScript 3.2.4
ESLint 5.12.1
node 10.15.0
npm 6.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting responseIssues waiting for a reply from the OP or another partypackage: eslint-pluginIssues related to @typescript-eslint/eslint-plugin

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions