mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-23 02:41:50 +03:00
Fix linting errors
refs https://github.com/TryGhost/Ghost-Admin/pull/1274 - fixes errors introduced from upgrading to eslint@6
This commit is contained in:
parent
5e94d31673
commit
4ae9151923
@ -122,7 +122,6 @@ export default Component.extend({
|
||||
fileSelected(fileList, resetInput) {
|
||||
// can't use array destructuring here as FileList is not a strict
|
||||
// array and fails in Safari
|
||||
// eslint-disable-next-line ember-suave/prefer-destructuring
|
||||
let file = fileList[0];
|
||||
let validationResult = this._validate(file);
|
||||
|
||||
|
@ -772,7 +772,6 @@ export default Controller.extend({
|
||||
let errorMessage;
|
||||
|
||||
function isString(str) {
|
||||
/* global toString */
|
||||
return toString.call(str) === '[object String]';
|
||||
}
|
||||
|
||||
|
@ -296,11 +296,7 @@ export default Controller.extend({
|
||||
}).drop(),
|
||||
|
||||
saveSettings: task(function* () {
|
||||
try {
|
||||
return yield this.settings.save();
|
||||
} catch (error) {
|
||||
throw error;
|
||||
}
|
||||
return yield this.settings.save();
|
||||
}).drop(),
|
||||
|
||||
redirectUploadResult: task(function* (success) {
|
||||
|
@ -15,7 +15,7 @@ function rand(min, max) {
|
||||
var key, value, arr = new Uint8Array(max);
|
||||
getRandomValues(arr);
|
||||
for (key in arr) {
|
||||
if (arr.hasOwnProperty(key)) {
|
||||
if (Object.prototype.hasOwnProperty.call(arr, key)) {
|
||||
value = arr[key];
|
||||
if (value > min && value < max) {
|
||||
return value;
|
||||
|
@ -10,7 +10,6 @@ export default function mockAuthentication(server) {
|
||||
|
||||
server.post('/authentication/passwordreset', function (schema, request) {
|
||||
let {passwordreset} = JSON.parse(request.requestBody);
|
||||
// eslint-disable-next-line ember-suave/prefer-destructuring
|
||||
let email = passwordreset[0].email;
|
||||
|
||||
if (email === 'unknown@example.com') {
|
||||
|
Loading…
Reference in New Issue
Block a user