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:
Kevin Ansfield 2019-07-22 11:15:33 +01:00
parent 5e94d31673
commit 4ae9151923
5 changed files with 2 additions and 9 deletions

View File

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

View File

@ -772,7 +772,6 @@ export default Controller.extend({
let errorMessage;
function isString(str) {
/* global toString */
return toString.call(str) === '[object String]';
}

View File

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

View File

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

View File

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