import { PackageJson } from '../shared-types' ; interface Params { packageJson : PackageJson ; } export function getInstalledDependencies ( { packageJson } ) { const { dependencies = { } , devDependencies = { } } = packageJson ; const dependenciesNames = Object . keys ( dependencies ) ; const devDependenciesNames = Object . keys ( devDependencies ) ; const allDependenciesNames = [ ... dependenciesNames , ... devDependenciesNames ] ; if ( allDependenciesNames . includes ( 'react-scripts' ) ) { allDependenciesNames . push ( 'eslint' , 'babel-eslint' ) ; } return allDependenciesNames ; }