Closed bebraw closed 8 years ago
:) we use this extensively at my job and it's quite essential. Your point is of course valid. I'm not sure that I'd like to lint against this, as the benefits are huge. :)
I think it'd be great to warn against using an alias that matches a dependency name though!
I think it'd be great to warn against using an alias that matches a dependency name though!
That would be enough I think. Disallowing whole field would be too much. This would solve the problem.
So let's maybe close this and reopen as "Warn for aliases that match a dependency name"?
Done.
Even though
resolve.root
can make for short imports, it can also cause strange issues due to aliasing. If you happen to have a directory matching to a npm dependency name, you might end up picking up the directory over the npm dependency. This can be hard to debug. This should yield a warning at least.