Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions scripts/tasks/danger.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ spawn(
).on('close', function(code) {
if (code !== 0) {
console.error('Danger failed');
} else {
console.log('Danger passed');
}
} else {}

process.exit(code);
});
10 changes: 2 additions & 8 deletions scripts/tasks/eslint.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,13 @@ const minimist = require('minimist');
const runESLint = require('../eslint');

async function main() {
console.log('Linting all files...');
// https://circleci.com/docs/2.0/env-vars/#circleci-environment-variable-descriptions
if (!process.env.CI) {
console.log('Hint: run `yarn linc` to only lint changed files.');
}
if (!process.env.CI) {}

// eslint-disable-next-line no-unused-vars
const {_, ...cliOptions} = minimist(process.argv.slice(2));

if (await runESLint({onlyChanged: false, ...cliOptions})) {
console.log('Lint passed.');
} else {
console.log('Lint failed.');
if (await runESLint({onlyChanged: false, ...cliOptions})) {} else {
process.exit(1);
}
}
Expand Down
1 change: 0 additions & 1 deletion scripts/tasks/flow-ci.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ async function checkAll() {
const rendererInfo = inlinedHostConfigs[i];
if (rendererInfo.isFlowTyped) {
await runFlow(rendererInfo.shortName, ['check']);
console.log();
}
}
}
Expand Down
23 changes: 1 addition & 22 deletions scripts/tasks/flow.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,30 +22,9 @@ const primaryRenderer = inlinedHostConfigs.find(
info => info.isFlowTyped && info.shortName === process.argv[2]
);
if (!primaryRenderer) {
console.log(
'The ' +
chalk.red('yarn flow') +
' command now requires you to pick a primary renderer:'
);
console.log();
inlinedHostConfigs.forEach(rendererInfo => {
if (rendererInfo.isFlowTyped) {
console.log(' * ' + chalk.cyan('yarn flow ' + rendererInfo.shortName));
}
if (rendererInfo.isFlowTyped) {}
});
console.log();
console.log('If you are not sure, run ' + chalk.green('yarn flow dom') + '.');
console.log(
'This will still typecheck non-DOM packages, although less precisely.'
);
console.log();
console.log('Note that checks for all renderers will run on CI.');
console.log(
'You can also do this locally with ' +
chalk.cyan('yarn flow-ci') +
' but it will be slow.'
);
console.log();
process.exit(1);
}

Expand Down
7 changes: 1 addition & 6 deletions scripts/tasks/linc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,10 @@ const minimist = require('minimist');
const runESLint = require('../eslint');

async function main() {
console.log('Linting changed files...');

// eslint-disable-next-line no-unused-vars
const {_, ...cliOptions} = minimist(process.argv.slice(2));

if (await runESLint({onlyChanged: true, ...cliOptions})) {
console.log('Lint passed for changed files.');
} else {
console.log('Lint failed for changed files.');
if (await runESLint({onlyChanged: true, ...cliOptions})) {} else {
process.exit(1);
}
}
Expand Down
6 changes: 0 additions & 6 deletions scripts/tasks/version-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ Object.keys(versions).forEach(function(name) {
const version = versions[name];
if (version !== reactVersion) {
allVersionsMatch = false;
console.log(
'%s version does not match package.json. Expected %s, saw %s.',
name,
reactVersion,
version
);
}
});

Expand Down