up eslint

This commit is contained in:
antelle 2019-08-16 21:36:22 +02:00
parent fcd8a99924
commit 336c80e296
4 changed files with 6 additions and 5 deletions

View File

@ -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",

View File

@ -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) {

View File

@ -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);

View File

@ -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]);
}