bcherny / tslint-no-circular-imports

TSLint plugin to detect and warn about circular imports
MIT License
86 stars 12 forks source link

The plugin crashes if you export './index' #17

Open w0rp opened 6 years ago

w0rp commented 6 years ago

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.