Skip to content

Commit a4cf67b

Browse files
authored
Added linter rules (#423)
1 parent 6066b01 commit a4cf67b

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

.eslintrc.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ module.exports = {
4444
"no-cond-assign": "off",
4545
"no-confusing-arrow": "off",
4646
"no-console": "off",
47-
"no-dupe-keys": "off",
48-
"no-else-return": "off",
49-
"no-empty": "off",
50-
"no-empty-function": "off",
47+
"no-dupe-keys": "error",
48+
"no-else-return": "error",
49+
"no-empty": "error",
50+
"no-empty-function": "error",
5151
"no-lonely-if": "off",
5252
"no-loop-func": "off",
5353
"no-mixed-operators": "off",
@@ -57,7 +57,7 @@ module.exports = {
5757
"no-prototype-builtins": "off",
5858
"no-restricted-syntax": "off",
5959
"no-return-assign": "off",
60-
"no-shadow": "off",
60+
"no-shadow": "error",
6161
"no-throw-literal": "off",
6262
"no-unreachable": "error",
6363
"no-unused-vars": "off",

test/integration/api/admin/api_spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@ describe("api", function () {
161161
}).then(
162162
({ public_id }) => cloudinary.v2.api.resources({ type: "upload" })
163163
.then(result => [public_id, result])
164-
.then(([public_id, result]) => {
165-
let resource = findByAttr(result.resources, "public_id", public_id);
164+
.then(([resources_public_id, result]) => {
165+
let resource = findByAttr(result.resources, "public_id", resources_public_id);
166166
expect(resource).to.be.an(Object);
167167
expect(resource.type).to.eql("upload");
168168
}));

tools/createTestCloud.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ function setup() {
4040
api_key: cloudApiKey,
4141
api_secret: cloudApiSecret,
4242
public_id: 'sample'
43-
}).then((res) => {
43+
}).then((result) => {
4444
console.log('Successfully created a temporary cloud');
4545
console.log('Cloudname: ', cloudName);
46-
console.log('Sample image uploaded to: ', res.url);
46+
console.log('Sample image uploaded to: ', result.url);
4747
}).catch(() => {
4848
throw 'FATAL - Could not create sample asset';
4949
});

0 commit comments

Comments
 (0)