Skip to content
This repository has been archived by the owner on Mar 25, 2021. It is now read-only.

misnamed-import warning for import A from '.' #2878

Closed
devdoomari opened this issue Jun 4, 2017 · 2 comments
Closed

misnamed-import warning for import A from '.' #2878

devdoomari opened this issue Jun 4, 2017 · 2 comments

Comments

@devdoomari
Copy link

devdoomari commented Jun 4, 2017

Bug Report

  • TSLint version: 5.4.2
  • TypeScript version: 2.3.4
  • Running TSLint via: (pick one) CLI and VSCode

TypeScript code being linted

// the file is in: Logger folder, and '.' refers to index.ts file
import Logger, {
  LogItem,
} from '.';

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 think I've just stumbled on some edge case...
how about using directory name for import-name checking for this?

@ajafff
Copy link
Contributor

ajafff commented Jun 4, 2017

That's the import-name rule of https://github.com/microsoft/tslint-microsoft-contrib.
You should probably open the issue there

@devdoomari
Copy link
Author

@ajafff oh sorry closing!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants