code: function checkDirForConflicts(root) {
    const files = fs.readdirSync(root);
    const conflicts = files.filter((file) => !config.validFiles.includes(file));
  
    if (conflicts.length > 0) {
      console.log();
      console.log(
        `The directory ${chalk.green(root)} contains files that could conflict:`,
      );
      console.log();
      for (const file of conflicts) {
        console.log(`  ${file}`);
      }
      console.log();
      console.log(
        'Either try using a new directory name, or remove the files listed above.',
      );
  
      process.exit(1);
    }
  }
docs: If project only contains files generated by GH, it’s safe. We also special case IJ-based products .idea because it integrates with CRA: https://github.com/facebookincubator/create-react-app/pull/368#issuecomment-243446094