Skip to content

Commit

Permalink
apply fixes for allow-parens as needed lint rule, phetsims/chipper#790
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Sep 19, 2019
1 parent 86a61f3 commit 82f6e31
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion js/build-server/addTranslator.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const winston = require( 'winston' );
* @param translatorId
*/
module.exports = async function addTranslator( locale, simName, translatorId ) {
return new Promise( ( resolve ) => {
return new Promise( resolve => {
// create the URL
const addTranslatorURL = constants.BUILD_SERVER_CONFIG.productionServerURL + '/services/add-html-translator?simName=' + simName +
'&locale=' + locale + '&userId=' + translatorId + '&authorizationCode=' +
Expand Down
2 changes: 1 addition & 1 deletion js/build-server/notifyServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const winston = require( 'winston' );
*/
module.exports = async function notifyServer( options ) {
if ( options.brand === constants.PHET_BRAND ) {
return new Promise( ( resolve ) => {
return new Promise( resolve => {
const project = 'html/' + options.simName;
let url = constants.BUILD_SERVER_CONFIG.productionServerURL + '/services/synchronize-project?projectName=' + project;
if ( options.locales && options.locales !== '*' && options.locales !== 'en' && options.locales.indexOf( ',' ) < 0 ) {
Expand Down
2 changes: 1 addition & 1 deletion js/build-server/taskWorker.js
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ module.exports = ( task, taskCallback ) => {
.then( () => {
taskCallback();
}
).catch( ( reason ) => {
).catch( reason => {
taskCallback( reason );
} );
};
10 changes: 5 additions & 5 deletions js/common/Maintenance.js
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ module.exports = ( function() {
const maintenance = Maintenance.load();
const patch = maintenance.findPatch( patchName );

await Maintenance.addNeededPatches( patchName, async ( releaseBranch ) => {
await Maintenance.addNeededPatches( patchName, async releaseBranch => {
return await releaseBranch.isMissingSHA( patch.repo, sha );
} );
}
Expand All @@ -429,7 +429,7 @@ module.exports = ( function() {
const maintenance = Maintenance.load();
const patch = maintenance.findPatch( patchName );

await Maintenance.addNeededPatches( patchName, async ( releaseBranch ) => {
await Maintenance.addNeededPatches( patchName, async releaseBranch => {
return await releaseBranch.includesSHA( patch.repo, sha );
} );
}
Expand All @@ -443,7 +443,7 @@ module.exports = ( function() {
* @param {function(ReleaseBranch, builtFile:string): Promise.<boolean>} filter
*/
static async addNeededPatchesBuildFilter( patchName, filter ) {
await Maintenance.addNeededPatches( patchName, async ( releaseBranch ) => {
await Maintenance.addNeededPatches( patchName, async releaseBranch => {
await checkoutTarget( releaseBranch.repo, releaseBranch.branch, true );
await gitPull( releaseBranch.repo );
await build( releaseBranch.repo );
Expand Down Expand Up @@ -530,7 +530,7 @@ module.exports = ( function() {
const maintenance = Maintenance.load();
const patch = maintenance.findPatch( patchName );

await Maintenance.removeNeededPatches( patchName, async ( releaseBranch ) => {
await Maintenance.removeNeededPatches( patchName, async releaseBranch => {
return await releaseBranch.isMissingSHA( patch.repo, sha );
} );
}
Expand All @@ -546,7 +546,7 @@ module.exports = ( function() {
const maintenance = Maintenance.load();
const patch = maintenance.findPatch( patchName );

await Maintenance.removeNeededPatches( patchName, async ( releaseBranch ) => {
await Maintenance.removeNeededPatches( patchName, async releaseBranch => {
return await releaseBranch.includesSHA( patch.repo, sha );
} );
}
Expand Down
2 changes: 1 addition & 1 deletion js/grunt/printPhetioLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async function usesTopLevelIndex( repo, branch ) {
const getVersion = simData => `${simData.versionMajor}.${simData.versionMinor}`;

// {Object} metadata -> branch name
const getBranch = ( simData ) => {
const getBranch = simData => {
let branch = `${simData.versionMajor}.${simData.versionMinor}`;
if ( simData.versionSuffix.length ) {
branch += '-' + simData.versionSuffix; // additional dash required
Expand Down
14 changes: 7 additions & 7 deletions test/perennialGruntTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,20 @@ async function getLikelyNextBranch( repo, incrementMajor, incrementMinor ) {
return `${currentMajor}.${currentMinor}`;
}

qunit.test( 'Checkout target', async ( assert ) => {
qunit.test( 'Checkout target', async assert => {
assert.timeout( 120000 );
await execute( gruntCommand, [ 'checkout-target', '--repo=chains', '--target=1.9' ], '.' );
await execute( gruntCommand, [ 'checkout-master', '--repo=chains' ], '.' );
assert.expect( 0 );
} );

qunit.test( 'NPM update', async ( assert ) => {
qunit.test( 'NPM update', async assert => {
assert.timeout( 120000 );
await execute( gruntCommand, [ 'npm-update', '--repo=chains' ], '.' );
assert.expect( 0 );
} );

qunit.test( 'Bumper one-off (random)', async ( assert ) => {
qunit.test( 'Bumper one-off (random)', async assert => {
assert.timeout( 3000000 );
const branch = 'oneoff' + Math.random().toString( 36 ).substring( 2 );

Expand All @@ -60,25 +60,25 @@ qunit.test( 'Bumper one-off (random)', async ( assert ) => {
assert.expect( 0 );
} );

qunit.test( 'Bumper dev phet,phet-io', async ( assert ) => {
qunit.test( 'Bumper dev phet,phet-io', async assert => {
assert.timeout( 600000 );
await execute( gruntCommand, [ 'dev', '--repo=bumper', '--brands=phet,phet-io', '--noninteractive' ], '.' );
assert.expect( 0 );
} );

qunit.test( 'Bumper dev phet', async ( assert ) => {
qunit.test( 'Bumper dev phet', async assert => {
assert.timeout( 600000 );
await execute( gruntCommand, [ 'dev', '--repo=bumper', '--brands=phet', '--noninteractive' ], '.' );
assert.expect( 0 );
} );

qunit.test( 'Bumper dev phet-io', async ( assert ) => {
qunit.test( 'Bumper dev phet-io', async assert => {
assert.timeout( 600000 );
await execute( gruntCommand, [ 'dev', '--repo=bumper', '--brands=phet-io', '--noninteractive' ], '.' );
assert.expect( 0 );
} );

qunit.test( 'Major bump, RC/Production', async( assert ) => {
qunit.test( 'Major bump, RC/Production', async assert => {
assert.timeout( 3000000 );
const branch = await getLikelyNextBranch( 'bumper', true, false );

Expand Down

0 comments on commit 82f6e31

Please sign in to comment.