Skip to content

Commit

Permalink
chore: fix eslint no-prototype-builtins errors
Browse files Browse the repository at this point in the history
  • Loading branch information
hulkoba authored and janl committed Jan 18, 2022
1 parent d143e02 commit b1742b1
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/node_modules/pouchdb-adapter-http/src/index.js
Expand Up @@ -902,7 +902,7 @@ function HttpPouch(opts, callback) {
if (opts.query_params && typeof opts.query_params === 'object') {
for (var param_name in opts.query_params) {
/* istanbul ignore else */
if (opts.query_params.hasOwnProperty(param_name)) {
if (Object.prototype.hasOwnProperty.call(opts.query_params, param_name)) {
params[param_name] = opts.query_params[param_name];
}
}
Expand Down
Expand Up @@ -79,7 +79,7 @@ function generateKeyRange(opts) {
// ranged queries we're going to convert them to our IDB equivalents
if (k === COUCH_COLLATE_LO) {
return IDB_COLLATE_LO;
} else if (k.hasOwnProperty(COUCH_COLLATE_HI)) {
} else if (Object.prototype.hasOwnProperty.call(k, COUCH_COLLATE_HI)) {
return IDB_COLLATE_HI;
}
}
Expand Down
Expand Up @@ -935,7 +935,7 @@ function LevelPouch(opts, callback) {
}
}
for (var att in doc.doc._attachments) {
if (doc.doc._attachments.hasOwnProperty(att)) {
if (Object.prototype.hasOwnProperty.call(doc.doc._attachments, att)) {
doc.doc._attachments[att].stub = true;
}
}
Expand Down Expand Up @@ -1183,7 +1183,7 @@ function LevelPouch(opts, callback) {
eventEmitter.close();
adapterStore.delete(key);
});

callback();
}
});
Expand Down
Expand Up @@ -97,7 +97,7 @@ function preprocessAttachments(docInfos, blobType, callback) {
}

for (var key in docInfo.data._attachments) {
if (docInfo.data._attachments.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(docInfo.data._attachments, key)) {
preprocessAttachment(docInfo.data._attachments[key],
blobType, processedAttachment);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/node_modules/pouchdb-core/src/adapter.js
Expand Up @@ -694,7 +694,7 @@ AbstractPouchDB.prototype.get = adapterFun('get', function (id, opts, cb) {
if (doc._attachments) {
for (var key in doc._attachments) {
/* istanbul ignore else */
if (doc._attachments.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(doc._attachments, key)) {
doc._attachments[key].stub = true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/node_modules/pouchdb-utils/src/filterChange.js
Expand Up @@ -36,7 +36,7 @@ function filterChange(opts) {
} else if (!opts.attachments) {
for (var att in change.doc._attachments) {
/* istanbul ignore else */
if (change.doc._attachments.hasOwnProperty(att)) {
if (Object.prototype.hasOwnProperty.call(change.doc._attachments, att)) {
change.doc._attachments[att].stub = true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/node_modules/pouchdb-utils/src/scopeEval.js
Expand Up @@ -6,7 +6,7 @@ function scopeEval(source, scope) {
var keys = [];
var values = [];
for (var key in scope) {
if (scope.hasOwnProperty(key)) {
if (Object.prototype.hasOwnProperty.call(scope, key)) {
keys.push(key);
values.push(scope[key]);
}
Expand Down
4 changes: 1 addition & 3 deletions tests/integration/utils.js
@@ -1,5 +1,3 @@
/* global PouchDB */
/* jshint -W079 */
'use strict';

var testUtils = Object.create(require('../common-utils'));
Expand Down Expand Up @@ -196,7 +194,7 @@ testUtils.eliminateDuplicates = function (arr) {
obj[arr[i]] = 0;
}
for (element in obj) {
if (obj.hasOwnProperty(element)) {
if (Object.hasOwnProperty.call(obj, element)) {
out.push(element);
}
}
Expand Down

0 comments on commit b1742b1

Please sign in to comment.