Revert "chore: lint all the files"

This reverts commit 4ef387b5bb.
This commit is contained in:
Alexis
2021-09-07 13:46:23 +09:30
parent 2d5b08b4ae
commit 010efe75bd
74 changed files with 368 additions and 404 deletions
+3 -3
View File
@@ -5,7 +5,7 @@
import { CoreContext, CoreResult } from '../../types';
import { hasFields, ensurePermission, emcmd, arrayIsRunning, uppercaseFirstChar } from '../../utils';
import { AppError, FieldMissingError, ParameterInvalidError } from '../../errors';
import { AppError, FieldMissingError, ParamInvalidError } from '../../errors';
import { getArray } from '..';
// @TODO: Fix this not working across node apps
@@ -25,7 +25,7 @@ export const updateArray = async (context: CoreContext): Promise<CoreResult> =>
const missingFields = hasFields(data, ['state']);
if (missingFields.length > 0) {
if (missingFields.length !== 0) {
// Only log first error
throw new FieldMissingError(missingFields[0]);
}
@@ -35,7 +35,7 @@ export const updateArray = async (context: CoreContext): Promise<CoreResult> =>
const pendingState = nextState === 'stop' ? 'stopping' : 'starting';
if (!['start', 'stop'].includes(nextState)) {
throw new ParameterInvalidError('state', nextState);
throw new ParamInvalidError('state', nextState);
}
// Prevent this running multiple times at once