I added validation of built bundles in https://github.com/facebook/react/pull/11432.

However I actually messed it up, and ESLint wasn't running on any files because of invalid arguments. I fixed that here: https://github.com/facebook/react/commit/61d35ce1f3f9c0706ed3630a2650d578497ae8c2#diff-edcddc0e0143d5a5a93d0951fd599794

We should fail the build if the glob patterns it's searching for don't exist.
const result = spawnSync(
    path.join('node_modules', '.bin', 'eslint' + extension),
    [
      ...filePatterns,
      '--config',
      path.join(__dirname, `eslintrc.${format}.js`),
      
      '--no-eslintrc',
      
      '--ignore-path',
      path.join(__dirname, 'eslintignore'),
    ],
    {
      
      stdio: 'inherit',
    }
  );
  if (result.status !== 0) {
    console.error(chalk.red(`Linting of ${format} bundles has failed.`));
    process.exit(result.status);
  } else {
    console.log(chalk.green(`Linted ${format} bundles successfully!`));
    console.log();
  }
}
run('fb', [`./build/facebook-www/*.js`]);
run('rn', [`./build/{react-cs,react-native,react-rt}/*.js`]);
run('umd', [`./build/packages/*/umd/*.js`]);
run('cjs', [`./build/packages/*/*.js`, `./build/packages/*/cjs/*.js`]);