Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

Copy link
Copy link
Closed
@kripod

Description

@kripod
Issue body actions

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 partyIssues waiting for a reply from the OP or another partypackage: eslint-pluginIssues related to @typescript-eslint/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

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.