ESLint to force @types in dev-dependencies
We recently had an outage coz someone installed the @types/[package-name] in dependencies, but never installed the actual package itself. Particularly, they installed
@types/imurmurhash
in dependencies, but didnt install imurmurhash
itself (and no one reviewing noticed it in the PR). Our no-extraneous-dependencies
rule in ESLint didnt catch this coz the type declarations were present.
Had the @types/
been installed in dev-dependencies, ESLint would have caught the missing dependency issue. Anyway to use to ESLint to check @types /
packages are dev-dependencies and not dependencies ?
I can raise an issue in ESLint, but was wondering if getting a solution might be faster here.0 Replies