diff --git a/script/publish.ts b/script/publish.ts index 17670fb8087..4d6fbd45519 100644 --- a/script/publish.ts +++ b/script/publish.ts @@ -9,16 +9,13 @@ if (PUBLISH_CHANNELS.indexOf(distInfo.getReleaseChannel()) < 0) { } const releaseSHA = distInfo.getReleaseSHA() -if (!releaseSHA) { +if (releaseSHA == null) { console.log(`No release SHA found for build. Skipping publish.`) process.exit(0) } const currentTipSHA = gitInfo.getSHA() -if ( - !currentTipSHA || - !currentTipSHA.toUpperCase().startsWith(releaseSHA!.toUpperCase()) -) { +if (!currentTipSHA.toUpperCase().startsWith(releaseSHA!.toUpperCase())) { console.log( `Current tip '${currentTipSHA}' does not match release SHA '${releaseSHA}'. Skipping publish.` ) @@ -34,7 +31,7 @@ import * as request from 'request' console.log('Packaging…') execSync('yarn package') -const getSha = () => { +function getSha() { if (process.platform === 'darwin' && process.env.CIRCLE_SHA1 != null) { return process.env.CIRCLE_SHA1 } else if ( @@ -51,7 +48,7 @@ const getSha = () => { const sha = getSha().substr(0, 8) -const getSecret = () => { +function getSecret() { if (process.env.DEPLOYMENT_SECRET != null) { return process.env.DEPLOYMENT_SECRET } @@ -151,7 +148,7 @@ function upload(assetName: string, assetPath: string) { s3.upload( uploadParams, (error: Error, data: AWS.S3.ManagedUpload.SendData) => { - if (error) { + if (error != null) { reject(error) } else { // eslint-disable-next-line no-sync diff --git a/script/start.ts b/script/start.ts index 86fcc07dcde..96fdc173cf1 100644 --- a/script/start.ts +++ b/script/start.ts @@ -24,7 +24,7 @@ function getPortOrDefault() { function startApp() { const runningApp = run({ stdio: 'inherit' }) - if (!runningApp) { + if (runningApp == null) { console.error( "Couldn't launch the app. You probably need to build it first. Run `yarn build:dev`." ) diff --git a/tsconfig.json b/tsconfig.json index bb1e688f5d4..3162be12e32 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,8 +15,7 @@ "include": [ "app/**/*.ts", "app/**/*.tsx", - "app/**/*.d.tsx", - "app/webpack.*.ts" + "app/**/*.d.tsx" ], "exclude": [ "node_modules",