On CI, we currently lint bundles:

https://github.com/facebook/react/blob/d1cb28c86b966cb33c373b532abe62dfe563d00e/scripts/circleci/build.sh#L11-L12

and then run both development and production bundle tests:

https://github.com/facebook/react/blob/d1cb28c86b966cb33c373b532abe62dfe563d00e/scripts/circleci/test_entry_point.sh#L24-L25

We should add the first step (linting bundles) into a `package.json` script called `lint-build`. Then we can change the CI command to run `yarn lint-build`.

Finally, we should add both `yarn lint-build`, `yarn test-prod`, `yarn test-build`, and `yarn test-build-prod` to the release script [into this function](https://github.com/facebook/react/blob/d1cb28c86b966cb33c373b532abe62dfe563d00e/scripts/release/build-commands/run-automated-tests.js#L23).

<s>Note that this function is already broken. We need to replace `runYarnTask(cwd, 'jest', 'Jest failed'),` with `runYarnTask(cwd, 'test', 'Jest failed'),` too since just running `jest` no longer works due to a custom config. Just running `test` should work because we have a custom `test` script.</s> Never mind, I fixed this in https://github.com/facebook/react/commit/f53bd033e79994dbda112a091ddbf784a3c30aaf.

To verify your changes, you can run `./scripts/release/build.js -v 16.2.0` and see that the whole workflow can run successfully.

This task requires understanding of how `scripts` in `package.json` work.
#!/usr/bin/env node
'use strict';
const chalk = require('chalk');
const {exec} = require('child-process-promise');
const {logPromise} = require('../utils');
const runYarnTask = async (cwd, task, errorMessage) => {
  try {
    await exec(`yarn ${task}`, {cwd});
  } catch (error) {
    throw Error(
      chalk`
      ${errorMessage}
      {white ${error.stdout}}
    `
    );
  }
};
module.exports = async ({cwd}) => {
  await logPromise(runYarnTask(cwd, 'lint', 'Lint failed'), 'Running ESLint');
  await logPromise(
    runYarnTask(cwd, 'flow', 'Flow failed'),
    'Running Flow checks'
  );
  await logPromise(
    runYarnTask(cwd, 'test', 'Jest failed'),
    'Running Jest tests',
    true
  );
};