Showing 150 of 428 total issues
Function useApi
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function useApi<T>(endPoint: string, options: IUseApiOptions<T>) {
const isRestoring = useIsRestoring();
const builtOptions = buildApiOptions(options);
const router = useRouter();
Function validations
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
typescriptSafeObjectDotEntries(fields).map(([field, config]) => {
const validationsToRun = config.validations || [];
const firstFailedValidation = validationsToRun.find((validation) =>
ENTITY_VALIDATION_CONFIG[validation.validationType]?.implementation(
Function useSyncTableState
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function useSyncTableState<T>(
table: Table<Record<string, unknown>>,
overridePaginatedDataState: IPaginatedDataState<T> | undefined,
syncPaginatedDataStateOut: (params: IPaginatedDataState<T>) => void
) {
Function getDbInstance
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async getDbInstance(): Promise<Knex> {
if (DatabaseConfigDataPersistenceAdaptor._dbInstance) {
return DatabaseConfigDataPersistenceAdaptor._dbInstance;
}
Function useStringSelections
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function useStringSelections(key: string) {
const [values, set] = useSelectionStore((store) => [store.values, store.set]);
const selections = values[key] || {};
Function CredentialsSetup
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const CredentialsSetup: CustomNextPage = () => {
const setupCredentialsMutation = useSetupCredentialsMutation();
const isChecking = useSetupCheck([
{
Function integrationsConfigurationDetailsRequestHandler
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const integrationsConfigurationDetailsRequestHandler = (
group: IntegrationsConfigurationGroup
) => {
return requestHandler(
{
Function DetailsCanvas
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function DetailsCanvas() {
const router = useRouter();
const [closeDetailsCanvas, detailsCanvasEntity, detailsCanvasId] =
useDetailsOffCanvasStore((state) => [state.close, state.entity, state.id]);
Function FormCodeEditor
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function FormCodeEditor(formInput: IFormCodeEditor) {
const {
input: { onFocus, name, onBlur, ...inputProps },
meta,
language,
Function isAuthenticatedValidationImpl
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const isAuthenticatedValidationImpl: ValidationImplType<void> = async (
req,
protectedRoute: boolean
) => {
try {
Function delete
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async delete(
entity: string,
id: string,
accountProfile: IAccountProfile
): Promise<void> {
Function useEntityReferenceCount
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const useEntityReferenceCount = (
entities: string[],
reference: { entity: string; entityId: string }
) => {
const multipleEntityReferenceFields =
Function PersistentDocumentation
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function PersistentDocumentation() {
return (
<DocumentationRoot>
<p>
Persistent query is used to define a set of queries that are persisted
Function EntityFormActionsSettings
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function EntityFormActionsSettings() {
const entity = useEntitySlug();
const domainMessages = useDomainMessages(
LANG_DOMAINS.INTEGRATIONS.FORM_ACTIONS
);
Function getRelationshipSettings
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async getRelationshipSettings(entity: string): Promise<{
format: string;
fields: string[];
}> {
const relationshipSettings = await this._configurationApiService.show(
Function useRevealedCredentialsList
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const useRevealedCredentialsList = (
group: IntegrationsConfigurationGroup
) => {
const rootPassword = usePasswordStore((state) => state.password);
const queryClient = useQueryClient();
Function buildFilterConfigFromType
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const buildFilterConfigFromType = (prop: {
entityType: FormFieldTypes;
entityFieldSelections: IColorableSelection[];
isIdField: boolean;
referenceField?: string;
Function doesPermissionAllowPermission
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export const doesPermissionAllowPermission = (
permissions: string[],
requiredPermission: string,
checkGranular: boolean
): boolean => {
Function getEntityRelationsForUserRole
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async getEntityRelationsForUserRole(
entity: string,
userRole: string
): Promise<IEntityRelation[]> {
const [validRelations, entityLabels, entityOrders] = await Promise.all([
Function do
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
do: async (config: IActionConfig, messageConfig: IConfig) => {
return await makeIntegrationRequest("POST", {
url: `https://api.sendgrid.com/v3/mail/send`,
body: JSON.stringify({
personalizations: [