bcherny/tslint-no-circular-imports

The plugin crashes if you export './index'

Open

#17 opened on Jul 18, 2018

View on GitHub
 (0 comments) (3 reactions) (0 assignees)TypeScript (11 forks)github user discovery
bughelp wanted

Repository metrics

Stars
 (90 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

I was just using the plugin and I had an index file which contained the following line by mistake.

export * from './index'

This code crashes the plugin with the following error:

TypeError: Cannot read property 'getStart' of undefined

I have created a project which demonstrates the bug here: https://github.com/w0rp/no-circular-import-index-error

You can run yarn && node_modules/.bin/tslint -p . on that project to see the error, or you can create a similar file and try it yourself. I think that bug should be fixed, and it should be reported as an error.

Contributor guide