mirror of https://github.com/keeweb/keeweb.git
up eslint
This commit is contained in:
parent
fcd8a99924
commit
336c80e296
|
@ -21,7 +21,8 @@
|
|||
"prefer-promise-reject-errors": "off",
|
||||
"standard/no-callback-literal": "off",
|
||||
"import/no-webpack-loader-syntax": "off",
|
||||
"object-curly-spacing": "off"
|
||||
"object-curly-spacing": "off",
|
||||
"quote-props": "off"
|
||||
},
|
||||
"parserOptions": {
|
||||
"sourceType": "module",
|
||||
|
|
|
@ -392,7 +392,7 @@ const EntryModel = Backbone.Model.extend({
|
|||
this._entryModified();
|
||||
val = this.sanitizeFieldValue(val);
|
||||
this.entry.fields[field] = val;
|
||||
} else if (this.entry.fields.hasOwnProperty(field)) {
|
||||
} else if (Object.prototype.hasOwnProperty.call(this.entry.fields, field)) {
|
||||
this._entryModified();
|
||||
delete this.entry.fields[field];
|
||||
}
|
||||
|
@ -409,7 +409,7 @@ const EntryModel = Backbone.Model.extend({
|
|||
},
|
||||
|
||||
hasField: function(field) {
|
||||
return this.entry.fields.hasOwnProperty(field);
|
||||
return Object.prototype.hasOwnProperty.call(this.entry.fields, field);
|
||||
},
|
||||
|
||||
addAttachment: function(name, data) {
|
||||
|
|
|
@ -63,7 +63,7 @@ const StorageFile = StorageBase.extend({
|
|||
const ts = this.logger.ts();
|
||||
|
||||
const onError = e => {
|
||||
if (e.hasOwnProperty('code') && e.code === 'EISDIR') {
|
||||
if (Object.prototype.hasOwnProperty.call(e, 'code') && e.code === 'EISDIR') {
|
||||
e.isDir = true;
|
||||
}
|
||||
this.logger.error('Error writing local file', path, e);
|
||||
|
|
|
@ -225,7 +225,7 @@ function getNumericHash(data) {
|
|||
function postProcess(wordObj) {
|
||||
let regex;
|
||||
for (const i in REPLACEMENTS) {
|
||||
if (REPLACEMENTS.hasOwnProperty(i)) {
|
||||
if (Object.prototype.hasOwnProperty.call(REPLACEMENTS, i)) {
|
||||
regex = new RegExp(i);
|
||||
wordObj.word = wordObj.word.replace(regex, REPLACEMENTS[i]);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue