diff --git a/.eslintrc.js b/.eslintrc.js index 00a16c9b..620ad2ae 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -43,10 +43,10 @@ module.exports = { "no-cond-assign": "off", "no-confusing-arrow": "off", "no-console": "off", - "no-dupe-keys": "off", - "no-else-return": "off", - "no-empty": "off", - "no-empty-function": "off", + "no-dupe-keys": "error", + "no-else-return": "error", + "no-empty": "error", + "no-empty-function": "error", "no-lonely-if": "off", "no-loop-func": "off", "no-mixed-operators": "off", @@ -56,7 +56,7 @@ module.exports = { "no-prototype-builtins": "off", "no-restricted-syntax": "off", "no-return-assign": "off", - "no-shadow": "off", + "no-shadow": "error", "no-throw-literal": "off", "no-unreachable": "error", "no-unused-vars": "off", diff --git a/test/integration/api/admin/api_spec.js b/test/integration/api/admin/api_spec.js index 01984293..351f2c00 100644 --- a/test/integration/api/admin/api_spec.js +++ b/test/integration/api/admin/api_spec.js @@ -231,8 +231,8 @@ describe("api", function () { }).then( ({ public_id }) => cloudinary.v2.api.resources({ type: "upload" }) .then(result => [public_id, result]) - .then(([public_id, result]) => { - let resource = findByAttr(result.resources, "public_id", public_id); + .then(([resources_public_id, result]) => { + let resource = findByAttr(result.resources, "public_id", resources_public_id); expect(resource).to.be.an(Object); expect(resource.type).to.eql("upload"); })); diff --git a/tools/createTestCloud.js b/tools/createTestCloud.js index 4b8b0e8c..5952e01d 100644 --- a/tools/createTestCloud.js +++ b/tools/createTestCloud.js @@ -40,10 +40,10 @@ function setup() { api_key: cloudApiKey, api_secret: cloudApiSecret, public_id: 'sample' - }).then((res) => { + }).then((result) => { console.log('Successfully created a temporary cloud'); console.log('Cloudname: ', cloudName); - console.log('Sample image uploaded to: ', res.url); + console.log('Sample image uploaded to: ', result.url); }).catch(() => { throw 'FATAL - Could not create sample asset'; });