(pkg: string)
| 104 | ` |
| 105 | |
| 106 | export const setupEslint = async (pkg: string) => { |
| 107 | msg(`Setting up ESLint`, 'green') |
| 108 | try { |
| 109 | await install(pkg, ['eslint', 'prettier', 'eslint-config-prettier', 'eslint-plugin-prettier'], true) |
| 110 | } catch { |
| 111 | throw new Error('Failed to install ESLint') |
| 112 | } |
| 113 | try { |
| 114 | await writeFile('.eslintrc', ESLINT_JS_CONFIG) |
| 115 | } catch { |
| 116 | throw new Error('Failed to create ESLint config') |
| 117 | } |
| 118 | } |