Browse Source

chore(nocodb): lint

pull/5903/head
Wing-Kam Wong 1 year ago
parent
commit
c69941609a
  1. 2
      packages/nocodb/src/db/sql-mgr/v2/SqlMgrv2Trans.ts
  2. 4
      packages/nocodb/src/models/Audit.ts
  3. 2
      packages/nocodb/src/models/Base.ts
  4. 4
      packages/nocodb/src/models/Filter.ts
  5. 2
      packages/nocodb/src/models/Project.ts
  6. 2
      packages/nocodb/src/models/RollupColumn.ts
  7. 2
      packages/nocodb/src/modules/event-emitter/nestjs-event-emitter.ts
  8. 3
      packages/nocodb/src/services/app-hooks/interfaces.ts
  9. 2
      packages/nocodb/src/services/bulk-data-alias.service.ts
  10. 2
      packages/nocodb/src/version-upgrader/ncProjectUpgraderV2_0090000.ts
  11. 4
      packages/nocodb/src/version-upgrader/v1-legacy/BaseApiBuilder.ts
  12. 4
      packages/nocodb/src/version-upgrader/v1-legacy/NcProjectBuilder.ts
  13. 8
      packages/nocodb/src/version-upgrader/v1-legacy/gql/GqlApiBuilder.ts
  14. 8
      packages/nocodb/src/version-upgrader/v1-legacy/rest/RestApiBuilder.ts

2
packages/nocodb/src/db/sql-mgr/v2/SqlMgrv2Trans.ts

@ -1,8 +1,8 @@
import KnexMigratorv2Tans from '../../sql-migrator/lib/KnexMigratorv2Tans';
import SqlMgrv2 from './SqlMgrv2';
import type Base from '~/models/Base';
import type { Knex } from 'knex';
import type { XKnex } from '../../CustomKnex';
import Base from '~/models/Base';
import NcConnectionMgrv2 from '~/utils/common/NcConnectionMgrv2';
export default class SqlMgrv2Trans extends SqlMgrv2 {

4
packages/nocodb/src/models/Audit.ts

@ -54,8 +54,8 @@ export default class Audit implements AuditType {
project_id?: string;
fk_model_id?: string;
row_id?: string;
op_type?: typeof opTypes[number];
op_sub_type?: typeof opSubTypes[number];
op_type?: (typeof opTypes)[number];
op_sub_type?: (typeof opSubTypes)[number];
status?: string;
description?: string;
details?: string;

2
packages/nocodb/src/models/Base.ts

@ -23,7 +23,7 @@ export default class Base implements BaseType {
id?: string;
project_id?: string;
alias?: string;
type?: typeof DB_TYPES[number];
type?: (typeof DB_TYPES)[number];
is_meta?: BoolType;
config?: string;
inflection_column?: string;

4
packages/nocodb/src/models/Filter.ts

@ -25,8 +25,8 @@ export default class Filter implements FilterType {
fk_column_id?: string;
fk_parent_id?: string;
comparison_op?: typeof COMPARISON_OPS[number];
comparison_sub_op?: typeof COMPARISON_SUB_OPS[number];
comparison_op?: (typeof COMPARISON_OPS)[number];
comparison_sub_op?: (typeof COMPARISON_SUB_OPS)[number];
value?: string;

2
packages/nocodb/src/models/Project.ts

@ -72,7 +72,7 @@ export default class Project implements ProjectType {
for (const base of project.bases) {
await Base.createBase(
{
type: base.config?.client as typeof DB_TYPES[number],
type: base.config?.client as (typeof DB_TYPES)[number],
...base,
projectId,
},

2
packages/nocodb/src/models/RollupColumn.ts

@ -20,7 +20,7 @@ export default class RollupColumn implements RollupType {
fk_column_id;
fk_relation_column_id;
fk_rollup_column_id;
rollup_function: typeof ROLLUP_FUNCTIONS[number];
rollup_function: (typeof ROLLUP_FUNCTIONS)[number];
constructor(data: Partial<RollupColumn>) {
Object.assign(this, data);

2
packages/nocodb/src/modules/event-emitter/nestjs-event-emitter.ts

@ -1,4 +1,4 @@
import type { EventEmitter2 } from '@nestjs/event-emitter';
import { EventEmitter2 } from '@nestjs/event-emitter';
import type { IEventEmitter } from './event-emitter.interface';
export class NestjsEventEmitter implements IEventEmitter {

3
packages/nocodb/src/services/app-hooks/interfaces.ts

@ -179,9 +179,8 @@ export interface AttachmentEvent {
type: 'url' | 'file';
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface FormColumnEvent {}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface GridColumnEvent {}
export interface MetaDiffEvent {

2
packages/nocodb/src/services/bulk-data-alias.service.ts

@ -24,7 +24,7 @@ export class BulkDataAliasService {
async executeBulkOperation<T extends BulkOperation>(
param: PathParams & {
operation: T;
options: Parameters<typeof BaseModelSqlv2.prototype[T]>;
options: Parameters<(typeof BaseModelSqlv2.prototype)[T]>;
},
) {
const { model, view, base } = await this.getModelViewBase(param);

2
packages/nocodb/src/version-upgrader/ncProjectUpgraderV2_0090000.ts

@ -605,7 +605,7 @@ async function migrateProjectModels(
const colBody: Partial<RollupColumn & Column> = {
title: columnMeta._cn,
rollup_function: columnMeta.rl
.fn as typeof ROLLUP_FUNCTIONS[number],
.fn as (typeof ROLLUP_FUNCTIONS)[number],
};
colBody.fk_rollup_column_id =

4
packages/nocodb/src/version-upgrader/v1-legacy/BaseApiBuilder.ts

@ -4,13 +4,13 @@ import inflection from 'inflection';
import ncModelsOrderUpgrader from './jobs/ncModelsOrderUpgrader';
import ncParentModelTitleUpgrader from './jobs/ncParentModelTitleUpgrader';
import ncRemoveDuplicatedRelationRows from './jobs/ncRemoveDuplicatedRelationRows';
import type { DbConfig, NcConfig } from '~/interface/config';
import NcProjectBuilder from './NcProjectBuilder';
import type { XKnex } from '~/db/CustomKnex';
import type { BaseModelSql } from '~/db/BaseModelSql';
import type { MetaService } from '~/meta/meta.service';
import type Noco from '~/Noco';
import type NcProjectBuilder from './NcProjectBuilder';
import type { MysqlClient, PgClient, SqlClient } from 'nc-help';
import { DbConfig, NcConfig } from '~/interface/config';
import ModelXcMetaFactory from '~/db/sql-mgr/code/models/xc/ModelXcMetaFactory';
import NcConnectionMgr from '~/utils/common/NcConnectionMgr';

4
packages/nocodb/src/version-upgrader/v1-legacy/NcProjectBuilder.ts

@ -1,8 +1,8 @@
import { Router } from 'express';
import { GqlApiBuilder } from './gql/GqlApiBuilder';
import { RestApiBuilder } from './rest/RestApiBuilder';
import type Noco from '~/Noco';
import type { NcConfig } from '~/interface/config';
import Noco from '~/Noco';
import { NcConfig } from '~/interface/config';
import { SqlClientFactory } from '~/db/sql-client/lib/SqlClientFactory';
export default class NcProjectBuilder {

8
packages/nocodb/src/version-upgrader/v1-legacy/gql/GqlApiBuilder.ts

@ -1,10 +1,10 @@
import { Router } from 'express';
import BaseApiBuilder from '../BaseApiBuilder';
import type NcProjectBuilder from '../NcProjectBuilder';
import type { DbConfig, NcConfig } from '~/interface/config';
import NcProjectBuilder from '../NcProjectBuilder';
import type XcMetaMgr from '~/interface/XcMetaMgr';
import type { MetaService } from '~/meta/meta.service';
import type Noco from '~/Noco';
import { DbConfig, NcConfig } from '~/interface/config';
import { MetaService } from '~/meta/meta.service';
import Noco from '~/Noco';
import GqlXcSchemaFactory from '~/db/sql-mgr/code/gql-schema/xc-ts/GqlXcSchemaFactory';
export class GqlApiBuilder extends BaseApiBuilder<Noco> implements XcMetaMgr {

8
packages/nocodb/src/version-upgrader/v1-legacy/rest/RestApiBuilder.ts

@ -1,10 +1,10 @@
import autoBind from 'auto-bind';
import BaseApiBuilder from '../BaseApiBuilder';
import NcProjectBuilder from '../NcProjectBuilder';
import type { Router } from 'express';
import type { DbConfig, NcConfig } from '~/interface/config';
import type NcProjectBuilder from '../NcProjectBuilder';
import type { MetaService } from '~/meta/meta.service';
import type Noco from '~/Noco';
import { DbConfig, NcConfig } from '~/interface/config';
import { MetaService } from '~/meta/meta.service';
import Noco from '~/Noco';
import NcHelp from '~/utils/NcHelp';
import ExpressXcTsRoutes from '~/db/sql-mgr/code/routes/xc-ts/ExpressXcTsRoutes';
import SwaggerXc from '~/db/sql-mgr/code/routers/xc-ts/SwaggerXc';

Loading…
Cancel
Save