This repository was archived by the owner on Jul 15, 2023. It is now read-only.
This repository was archived by the owner on Jul 15, 2023. It is now read-only.
misnamed-import warning for import A from '.' #378
Closed
Description
Here's a somewhat edge-case example of what I've stumbled on:
// file path: <proj-path>/src/Logger/utils.ts
import Logger, {
LogItem,
} from '.'; //this refers to <proj-path>/src/Logger/index.ts
Here's what I get:
error: Logger/logger.utils.ts
severity: 'Error'
message: 'Misnamed import. Import should be named '.' but found 'Logger' (import-name)'
at: '2,1'
source: 'tslint'
I wrote a tslint issue on this(palantir/tslint#2878) but was told to write the issue here.
ps: I can do a walk-around using:
import {
default as Logger,
...
} from '.';
but I don't like doing tricks to please Mr Linter :(