From 2d162fda314a78fc8d89b1f81c1db28622b5e38b Mon Sep 17 00:00:00 2001 From: mike12345567 Date: Mon, 28 Jun 2021 10:21:37 +0100 Subject: [PATCH] Linting. --- packages/server/src/definitions/common.ts | 98 +++++++++++------------ packages/server/src/integrations/mysql.ts | 5 +- 2 files changed, 50 insertions(+), 53 deletions(-) diff --git a/packages/server/src/definitions/common.ts b/packages/server/src/definitions/common.ts index 4d2b0edc00..0690f2954e 100644 --- a/packages/server/src/definitions/common.ts +++ b/packages/server/src/definitions/common.ts @@ -1,78 +1,78 @@ interface Base { - _id?: string, - _rev?: string, + _id?: string + _rev?: string } export interface TableSchema { [key: string]: { // TODO: replace with field types enum when done - type: string, - fieldName?: string, - name: string, + type: string + fieldName?: string + name: string constraints?: { - type?: string, - email?: boolean, - inclusion?: string[], + type?: string + email?: boolean + inclusion?: string[] length?: { - minimum?: string | number, - maximum?: string | number, - }, - presence?: boolean, - }, - }, + minimum?: string | number + maximum?: string | number + } + presence?: boolean + } + } } export interface Table extends Base { - type?: string, - views?: {}, - name?: string, - primary?: string[], - schema: TableSchema, - primaryDisplay?: string, - sourceId?: string, + type?: string + views?: {} + name?: string + primary?: string[] + schema: TableSchema + primaryDisplay?: string + sourceId?: string } export interface Row extends Base { - type?: string, - tableId: string, - [key: string]: any, + type?: string + tableId: string + [key: string]: any } interface JsonSchemaField { properties: { [key: string]: { - type: string, - title: string, - customType?: string, - }, - }, - required?: string[], + type: string + title: string + customType?: string + } + } + required?: string[] } export interface AutomationStep { - description: string, - event?: string, - icon: string, - id: string, + description: string + event?: string + icon: string + id: string inputs: { - [key: string]: any, - }, - name: string, + [key: string]: any + } + name: string schema: { - inputs: JsonSchemaField, - outputs: JsonSchemaField, - }, - stepId: string, - tagline: string, - type: string, + inputs: JsonSchemaField + outputs: JsonSchemaField + } + stepId: string + tagline: string + type: string } export interface Automation extends Base { - name: string, - type: string, - appId?: string, + name: string + type: string + appId?: string definition: { - steps: AutomationStep[], - trigger?: AutomationStep, - }, + steps: AutomationStep[] + trigger?: AutomationStep + } } diff --git a/packages/server/src/integrations/mysql.ts b/packages/server/src/integrations/mysql.ts index dec95433ac..1cfe96986f 100644 --- a/packages/server/src/integrations/mysql.ts +++ b/packages/server/src/integrations/mysql.ts @@ -6,10 +6,7 @@ import { QueryJson, SqlQuery, } from "../definitions/datasource" -import { - Table, - TableSchema, -} from "../definitions/common" +import { Table, TableSchema } from "../definitions/common" import { getSqlQuery } from "./utils" module MySQLModule {