diff --git a/src/commands/eslint.ts b/src/commands/eslint.ts index 73fda4a..d9984c9 100755 --- a/src/commands/eslint.ts +++ b/src/commands/eslint.ts @@ -18,8 +18,6 @@ export default async function runEslint() { if (await isEslintConfigured()) { log('eslint config already exists'); } else { - const hasPrettier = await isPackageInstalled('prettier'); - const hasEslint = await isPackageInstalled('eslint'); const hasTypeScript = await isPackageInstalled('typescript'); const eslintConfigTemplate = await fs.readFile( @@ -34,11 +32,7 @@ export default async function runEslint() { format: true, }); - const deps = `${hasPrettier ? '' : 'prettier'} ${ - hasEslint ? '' : 'eslint' - } @typescript-eslint/eslint-plugin @typescript-eslint/parser`; - - await addDependency(deps, { dev: true }); + await addDependency('@thoughtbot/eslint-config', { dev: true }); log(chalk.green('🎉 ESLint successfully configured')); } diff --git a/src/commands/templates/eslintrc.js.eta b/src/commands/templates/eslintrc.js.eta index d70c346..79ceff7 100644 --- a/src/commands/templates/eslintrc.js.eta +++ b/src/commands/templates/eslintrc.js.eta @@ -1,10 +1,11 @@ module.exports = { - extends: ['universe/native', + "extends": [ + "@thoughtbot/eslint-config/native", + <% if(it.typescript) { %> + "@thoughtbot/eslint-config/typescript" + <% } %> + ], <% if(it.typescript) { %> - 'universe/shared/typescript-analysis', - <% } %> - ], - <% if(it.typescript) { %> overrides: [ { files: [