From b74878d31c125840ee5c31bd5da5f3f9bbf86bb3 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sun, 5 Mar 2017 22:29:28 +0000 Subject: [PATCH] Lint internal scripts with eslint:recommended (#1729) * Lint internal scripts with eslint:recommended * Warnings r bad --- bin/react-scripts.js | 4 ++-- fixtures/kitchensink/integration/initDOM.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/react-scripts.js b/bin/react-scripts.js index 5ed9b244ca6..e614d9b598e 100755 --- a/bin/react-scripts.js +++ b/bin/react-scripts.js @@ -14,13 +14,13 @@ case 'test': {stdio: 'inherit'} ); if (result.signal) { - if (result.signal == 'SIGKILL') { + if (result.signal === 'SIGKILL') { console.log( 'The build failed because the process exited too early. ' + 'This probably means the system ran out of memory or someone called ' + '`kill -9` on the process.' ); - } else if (result.signal == 'SIGTERM') { + } else if (result.signal === 'SIGTERM') { console.log( 'The build failed because the process exited too early. ' + 'Someone might have called `kill` or `killall`, or the system could ' + diff --git a/fixtures/kitchensink/integration/initDOM.js b/fixtures/kitchensink/integration/initDOM.js index 7cf8134b79f..9b6049104f9 100644 --- a/fixtures/kitchensink/integration/initDOM.js +++ b/fixtures/kitchensink/integration/initDOM.js @@ -15,7 +15,7 @@ if (process.env.E2E_FILE) { const markup = fs.readFileSync(file, 'utf8') getMarkup = () => markup - const pathPrefix = process.env.PUBLIC_URL.replace(/^https?:\/\/[^\/]+\/?/, '') + const pathPrefix = process.env.PUBLIC_URL.replace(/^https?:\/\/[^/]+\/?/, '') resourceLoader = (resource, callback) => callback( null,