jwbay / tslint-misc-rules

Collection of miscellaneous TSLint rules

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tslint as peer

bookman25 opened this issue · comments

Should make tslint a peer dependency

commented

Why? We import it and use its APIs directly.

I was just looking at: https://github.com/buzinas/tslint-eslint-rules/blob/master/CHANGELOG.md and thinking it was kind of nice. And based off this: https://nodejs.org/en/blog/npm/peer-dependencies/ it seems like peer dependencies are correct for plugins

commented

Peer deps are meant for packages that don't do an explicit require( of the dependency. That's mentioned in both the docs for peer deps and the linked article. That's common for lots of plugin systems and the reason peer deps were added in the first place, but this doesn't apply to tslint rules. Even when the article makes a case for explicitly required dependencies being peers, it's in the context of restrictive version ranges.