diff --git a/src/package-linker.js b/src/package-linker.js index 7680f5cfd4..66308d2221 100644 --- a/src/package-linker.js +++ b/src/package-linker.js @@ -624,7 +624,7 @@ export default class PackageLinker { const range = peerDeps[peerDepName]; const meta = peerDepsMeta && peerDepsMeta[peerDepName]; - const isOptional = meta && meta.optional ? true : false; + const isOptional = !!(meta && meta.optional); const peerPkgs = this.resolver.getAllInfoForPackageName(peerDepName); diff --git a/src/types.js b/src/types.js index d68bb262e7..934c3defda 100644 --- a/src/types.js +++ b/src/types.js @@ -13,8 +13,7 @@ export type CLIFunction = (config: Config, reporter: Reporter, flags: Object, ar type _CLIFunctionReturn = boolean; export type CLIFunctionReturn = ?_CLIFunctionReturn | Promise; -export type DependencyMeta = { -}; +export type DependencyMeta = {}; export type DependenciesMeta = { [name: string]: DependencyMeta,