From 55d7cf38654157187c4a4c2b8784191acc97c8ee Mon Sep 17 00:00:00 2001 From: Audrey So Date: Mon, 19 Jun 2017 10:57:12 -0700 Subject: [PATCH] CB-12895 : updated .eslintrc file in spec dir and set jasmine true and removed root is true --- bin/templates/cordova/lib/check_reqs.js | 15 +++++++-------- spec/.eslintrc.yml | 2 ++ spec/e2e/.eslintrc.yml | 12 ------------ spec/unit/.eslintrc.yml | 12 ------------ 4 files changed, 9 insertions(+), 32 deletions(-) create mode 100644 spec/.eslintrc.yml delete mode 100644 spec/e2e/.eslintrc.yml delete mode 100644 spec/unit/.eslintrc.yml diff --git a/bin/templates/cordova/lib/check_reqs.js b/bin/templates/cordova/lib/check_reqs.js index fb385234..2c3f291d 100644 --- a/bin/templates/cordova/lib/check_reqs.js +++ b/bin/templates/cordova/lib/check_reqs.js @@ -109,12 +109,12 @@ module.exports.get_gradle_wrapper = function () { } else { ++i; } } } else if (module.exports.isWindows()) { - - var result = child_process.spawnSync(path.join(__dirname,'getASPath.bat')); - //console.log('result.stdout =' + result.stdout.toString()); - //console.log('result.stderr =' + result.stderr.toString()); - if(result.stderr.toString().length > 0) { + var result = child_process.spawnSync(path.join(__dirname, 'getASPath.bat')); + // console.log('result.stdout =' + result.stdout.toString()); + // console.log('result.stderr =' + result.stderr.toString()); + + if (result.stderr.toString().length > 0) { var androidPath = path.join(process.env['ProgramFiles'], 'Android') + '/'; if (fs.existsSync(androidPath)) { program_dir = fs.readdirSync(androidPath); @@ -125,12 +125,11 @@ module.exports.get_gradle_wrapper = function () { } else { ++i; } } } - } - else { + } else { // console.log('got android studio path from registry'); // remove the (os independent) new line char at the end of stdout // add gradle to match the above. - androidStudioPath = path.join(result.stdout.toString().split('\r\n')[0],'gradle'); + androidStudioPath = path.join(result.stdout.toString().split('\r\n')[0], 'gradle'); } } diff --git a/spec/.eslintrc.yml b/spec/.eslintrc.yml new file mode 100644 index 00000000..6afba65a --- /dev/null +++ b/spec/.eslintrc.yml @@ -0,0 +1,2 @@ +env: + jasmine: true \ No newline at end of file diff --git a/spec/e2e/.eslintrc.yml b/spec/e2e/.eslintrc.yml deleted file mode 100644 index 12c538c9..00000000 --- a/spec/e2e/.eslintrc.yml +++ /dev/null @@ -1,12 +0,0 @@ -env: - jasmine: true -root: true -extends: semistandard -rules: - indent: - - error - - 4 - camelcase: off - padded-blocks: off - operator-linebreak: off - no-throw-literal: off diff --git a/spec/unit/.eslintrc.yml b/spec/unit/.eslintrc.yml deleted file mode 100644 index 12c538c9..00000000 --- a/spec/unit/.eslintrc.yml +++ /dev/null @@ -1,12 +0,0 @@ -env: - jasmine: true -root: true -extends: semistandard -rules: - indent: - - error - - 4 - camelcase: off - padded-blocks: off - operator-linebreak: off - no-throw-literal: off