Browse Source

chore: lint errors

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/6315/head
mertmit 1 year ago
parent
commit
a6a27d73e2
  1. 14
      packages/nc-gui/components/cell/TextArea.vue
  2. 2
      packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue
  3. 2
      packages/nocodb/src/db/formulav2/formulaQueryBuilderv2.ts
  4. 1
      packages/nocodb/src/interface/XcMetaMgr.ts
  5. 2
      packages/nocodb/src/plugins/discord/Discord.ts
  6. 2
      packages/nocodb/src/plugins/mattermost/Mattermost.ts
  7. 2
      packages/nocodb/src/plugins/slack/Slack.ts
  8. 2
      packages/nocodb/src/plugins/teams/Teams.ts
  9. 2
      packages/nocodb/src/plugins/twilio/Twilio.ts
  10. 2
      packages/nocodb/src/plugins/twilioWhatsapp/TwilioWhatsapp.ts
  11. 2
      packages/nocodb/src/services/api-docs/swagger/templates/params.ts
  12. 2
      packages/nocodb/src/services/api-docs/swagger/templates/paths.ts
  13. 8
      packages/nocodb/src/services/tables.service.ts

14
packages/nc-gui/components/cell/TextArea.vue

@ -1,6 +1,6 @@
<script setup lang="ts">
import type { VNodeRef } from '@vue/runtime-core'
import { EditModeInj, IsExpandedFormOpenInj, RowHeightInj, inject, useVModel, iconMap, ActiveCellInj } from '#imports'
import { ActiveCellInj, EditModeInj, IsExpandedFormOpenInj, RowHeightInj, iconMap, inject, useVModel } from '#imports'
const props = defineProps<{
modelValue?: string | number
@ -91,16 +91,16 @@ onClickOutside(inputWrapperRef, (e) => {
<div
v-if="active"
class="!absolute right-0 bottom-0 h-6 w-5 group cursor-pointer flex justify-end gap-1 items-center active:(ring ring-accent ring-opacity-100) rounded border-none p-1 hover:(bg-primary bg-opacity-10) dark:(!bg-slate-500)"
:class="{'right-2 bottom-2':editEnabled}"
:class="{ 'right-2 bottom-2': editEnabled }"
data-testid="attachment-cell-file-picker-button"
@click.stop="isVisible = !isVisible"
>
<NcTooltip placement="bottom">
<template #title>Expand</template>
<component
:is="iconMap.expand"
class="transform dark:(!text-white) group-hover:(!text-grey-800 scale-120) text-gray-500 text-xs"
/>
<template #title>Expand</template>
<component
:is="iconMap.expand"
class="transform dark:(!text-white) group-hover:(!text-grey-800 scale-120) text-gray-500 text-xs"
/>
</NcTooltip>
</div>
</div>

2
packages/nc-gui/components/smartsheet/toolbar/FieldsMenu.vue

@ -378,7 +378,7 @@ useMenuCloseOnEsc(open)
<span class="mt-0.65">{{ field.title }}</span>
</div>
<NcSwitch :checked="field.show" v-e="['a:fields:show-hide']" :disabled="field.isViewEssentialField" />
<NcSwitch v-e="['a:fields:show-hide']" :checked="field.show" :disabled="field.isViewEssentialField" />
</div>
<div class="flex-1" />

2
packages/nocodb/src/db/formulav2/formulaQueryBuilderv2.ts

@ -768,7 +768,7 @@ async function _formulaQueryBuilder(
} else if (pt.type === 'Literal') {
return { builder: knex.raw(`?${colAlias}`, [pt.value]) };
} else if (pt.type === 'Identifier') {
const { builder } = await aliasToColumn?.[pt.name]?.();
const { builder } = (await aliasToColumn?.[pt.name]?.()) || {};
if (typeof builder === 'function') {
return { builder: knex.raw(`??${colAlias}`, builder(pt.fnName)) };
}

1
packages/nocodb/src/interface/XcMetaMgr.ts

@ -1,2 +1 @@
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export default interface XcMetaMgr {}

2
packages/nocodb/src/plugins/discord/Discord.ts

@ -7,7 +7,7 @@ export default class Discord implements IWebhookNotificationAdapter {
}
public async sendMessage(content: string, payload: any): Promise<any> {
for (const { webhook_url } of payload?.channels) {
for (const { webhook_url } of payload?.channels || []) {
try {
return await axios.post(webhook_url, {
content,

2
packages/nocodb/src/plugins/mattermost/Mattermost.ts

@ -7,7 +7,7 @@ export default class Mattermost implements IWebhookNotificationAdapter {
}
public async sendMessage(text: string, payload: any): Promise<any> {
for (const { webhook_url } of payload?.channels) {
for (const { webhook_url } of payload?.channels || []) {
try {
return await axios.post(webhook_url, {
text,

2
packages/nocodb/src/plugins/slack/Slack.ts

@ -7,7 +7,7 @@ export default class Slack implements IWebhookNotificationAdapter {
}
public async sendMessage(text: string, payload: any): Promise<any> {
for (const { webhook_url } of payload?.channels) {
for (const { webhook_url } of payload?.channels || []) {
try {
return await axios.post(webhook_url, {
text,

2
packages/nocodb/src/plugins/teams/Teams.ts

@ -7,7 +7,7 @@ export default class Teams implements IWebhookNotificationAdapter {
}
public async sendMessage(Text: string, payload: any): Promise<any> {
for (const { webhook_url } of payload?.channels) {
for (const { webhook_url } of payload?.channels || []) {
try {
return await axios.post(webhook_url, {
Text,

2
packages/nocodb/src/plugins/twilio/Twilio.ts

@ -14,7 +14,7 @@ export default class Twilio implements IWebhookNotificationAdapter {
}
public async sendMessage(content: string, payload: any): Promise<any> {
for (const num of payload?.to?.split(/\s*?,\s*?/)) {
for (const num of payload?.to?.split(/\s*?,\s*?/) || []) {
try {
await this.client.messages.create({
body: content,

2
packages/nocodb/src/plugins/twilioWhatsapp/TwilioWhatsapp.ts

@ -14,7 +14,7 @@ export default class TwilioWhatsapp implements IWebhookNotificationAdapter {
}
public async sendMessage(content: string, payload: any): Promise<any> {
for (const num of payload?.to?.split(/\s*?,\s*?/)) {
for (const num of payload?.to?.split(/\s*?,\s*?/) || []) {
try {
await this.client.messages.create({
body: content,

2
packages/nocodb/src/services/api-docs/swagger/templates/params.ts

@ -1,4 +1,4 @@
import { isLinksOrLTAR, RelationTypes, UITypes } from 'nocodb-sdk'
import { isLinksOrLTAR, RelationTypes, UITypes } from 'nocodb-sdk';
import type { LinkToAnotherRecordColumn } from '~/models';
import type { SwaggerColumn } from '../getSwaggerColumnMetas';

2
packages/nocodb/src/services/api-docs/swagger/templates/paths.ts

@ -1,4 +1,4 @@
import { isLinksOrLTAR, ModelTypes, UITypes } from 'nocodb-sdk';
import { isLinksOrLTAR, ModelTypes } from 'nocodb-sdk';
import {
columnNameParam,
columnNameQueryParam,

8
packages/nocodb/src/services/tables.service.ts

@ -1,6 +1,12 @@
import { Injectable } from '@nestjs/common';
import DOMPurify from 'isomorphic-dompurify';
import { isLinksOrLTAR, isVirtualCol, ModelTypes, ProjectRoles, UITypes } from 'nocodb-sdk'
import {
isLinksOrLTAR,
isVirtualCol,
ModelTypes,
ProjectRoles,
UITypes,
} from 'nocodb-sdk';
import { AppEvents } from 'nocodb-sdk';
import { MetaDiffsService } from './meta-diffs.service';
import { ColumnsService } from './columns.service';

Loading…
Cancel
Save