fix: use canonical oxlint rule id in lint-disable directives (#21253)
## What Many `oxlint-disable` / `eslint-disable` directives across the repo carry a corrupted rule id — `@typescripttypescript/<rule>` — most likely a find-and-replace accident that mangled the eslint-era `@typescript-eslint/` prefix. oxlint matches disable directives **loosely by rule name**, so these still suppress in practice (not a silent no-op), but the id is malformed and misleading. ## Change Replace them with the **canonical oxlint id** `typescript/<rule>` — matching the plugin name and rule keys declared in `.oxlintrc.json` — **127 files, 262 directives**: | rule | count | | --- | ----- | | `typescript/no-explicit-any` | 250 | | `typescript/ban-ts-comment` | 6 | | `typescript/no-misused-promises` | 4 | | `typescript/no-empty-object-type` | 2 | - `twenty-server`: 122 files - `twenty-front`: 5 files Comment-only — no code or runtime changes. ## Verification `oxlint --type-aware -c .oxlintrc.json` reports **0 warnings / 0 errors** for both `twenty-server` and `twenty-front`. Every changed line is exactly the id correction inside a disable directive (262 insertions / 262 deletions, no collateral edits). > Addresses the cubic review, which flagged that the canonical oxlint id is `typescript/...` (no `@`). Worth noting the original `@typescripttypescript/` was not actually a silent no-op — oxlint matches these directives loosely by rule name — but `typescript/` is the correct, config-aligned id.
This commit is contained in:
+1
-1
@@ -49,7 +49,7 @@ export class AdminPanelHealthService {
|
||||
: AdminPanelHealthServiceStatus.OUTAGE;
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
private transformServiceDetails(details: any) {
|
||||
if (!details) return details;
|
||||
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
export class HealthStateManager {
|
||||
private lastKnownState: {
|
||||
timestamp: Date;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
details: Record<string, any>;
|
||||
} | null = null;
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
updateState(details: Record<string, any>) {
|
||||
this.lastKnownState = {
|
||||
timestamp: new Date(),
|
||||
|
||||
+3
-3
@@ -9,13 +9,13 @@ import { CreateAppTokenInput } from 'src/engine/core-modules/app-token/dtos/crea
|
||||
import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard';
|
||||
|
||||
export const appTokenAutoResolverOpts: AutoResolverOpts<
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
any,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
any,
|
||||
unknown,
|
||||
unknown,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
ReadResolverOpts<any>,
|
||||
PagingStrategies
|
||||
>[] = [
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ export class BeforeCreateOneAppToken<
|
||||
> implements BeforeCreateOneHook<T> {
|
||||
async run(
|
||||
instance: CreateOneInputType<T>,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
context: any,
|
||||
): Promise<CreateOneInputType<T>> {
|
||||
const userId = context?.req?.user?.id;
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ export class ApplicationLogsModule extends ConfigurableModuleClass {
|
||||
static forRootAsync(options: typeof ASYNC_OPTIONS_TYPE): DynamicModule {
|
||||
const provider = {
|
||||
provide: APPLICATION_LOG_DRIVER,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
useFactory: async (
|
||||
clickHouseService: ClickHouseService,
|
||||
...args: unknown[]
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ export const copyYarnEngineAndBuildDependencies = async (
|
||||
env: cleanEnv,
|
||||
},
|
||||
);
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
} catch (error: any) {
|
||||
const errorMessage =
|
||||
[error?.stdout, error?.stderr].filter(Boolean).join('\n') ||
|
||||
|
||||
+1
-1
@@ -32,6 +32,6 @@ export class CreateObjectEventInput {
|
||||
@Field(() => GraphQLJSON, { nullable: true })
|
||||
@IsObject()
|
||||
@IsOptional()
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
properties?: Record<string, any>;
|
||||
}
|
||||
|
||||
+3
-3
@@ -11,7 +11,7 @@ export const genericTrackSchema = baseEventSchema.extend({
|
||||
export type GenericTrackEvent<E extends string = string> = {
|
||||
type: 'track';
|
||||
event: E;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
properties: any;
|
||||
timestamp: string;
|
||||
version: string;
|
||||
@@ -19,10 +19,10 @@ export type GenericTrackEvent<E extends string = string> = {
|
||||
workspaceId?: string;
|
||||
};
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
export const eventsRegistry = new Map<string, z.ZodSchema<any>>();
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
export function registerEvent<E extends string, S extends z.ZodObject<any>>(
|
||||
event: E,
|
||||
schema: S,
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ export class SSOAuthController {
|
||||
PublicEndpointGuard,
|
||||
NoPermissionGuard,
|
||||
)
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
async generateMetadata(@Req() req: any): Promise<string | void> {
|
||||
return generateServiceProviderMetadata({
|
||||
wantAssertionsSigned: true,
|
||||
|
||||
@@ -26,7 +26,7 @@ export class OIDCAuthGuard extends AuthGuard('openidconnect') {
|
||||
super();
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
private getStateByRequest(request: any): {
|
||||
identityProviderId: string;
|
||||
} {
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ export class GoogleAPIsOauthRequestCodeStrategy extends GoogleAPIsOauthCommonStr
|
||||
super(twentyConfigService);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authenticate(req: any, options: any) {
|
||||
options = {
|
||||
...options,
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ export class GoogleStrategy extends PassportStrategy(Strategy, 'google') {
|
||||
});
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authenticate(req: Request, options: any) {
|
||||
options = {
|
||||
...options,
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ export class MicrosoftAPIsOauthRequestCodeStrategy extends MicrosoftAPIsOauthCom
|
||||
super(twentyConfigService);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authenticate(req: any, options: any) {
|
||||
options = {
|
||||
...options,
|
||||
|
||||
+1
-1
@@ -47,7 +47,7 @@ export class MicrosoftStrategy extends PassportStrategy(Strategy, 'microsoft') {
|
||||
});
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authenticate(req: Request, options: any) {
|
||||
options = {
|
||||
...options,
|
||||
|
||||
+2
-2
@@ -46,7 +46,7 @@ export class OIDCAuthStrategy extends PassportStrategy(
|
||||
});
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authenticate(req: Request, options: any) {
|
||||
return super.authenticate(req, {
|
||||
...options,
|
||||
@@ -86,7 +86,7 @@ export class OIDCAuthStrategy extends PassportStrategy(
|
||||
async validate(
|
||||
req: Request,
|
||||
tokenset: TokenSet,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
done: (err: any, user?: OIDCRequest['user']) => void,
|
||||
) {
|
||||
try {
|
||||
|
||||
@@ -16,7 +16,7 @@ export const WithLock = (
|
||||
|
||||
const originalMethod = descriptor.value;
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
descriptor.value = async function (...args: any[]) {
|
||||
const self = this as { cacheLockService: CacheLockService };
|
||||
|
||||
|
||||
+2
-2
@@ -34,9 +34,9 @@ export class CacheStorageModule implements OnModuleDestroy {
|
||||
constructor(@Inject(CACHE_MANAGER) private cacheManager: Cache) {}
|
||||
|
||||
async onModuleDestroy() {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
if ((this.cacheManager.store as any)?.name === 'redis') {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
await (this.cacheManager.store as any).client.quit();
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -403,7 +403,7 @@ end`;
|
||||
}
|
||||
|
||||
private isRedisCache() {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
return (this.cache.store as any)?.name === 'redis';
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -2,14 +2,14 @@ import * as Sentry from '@sentry/node';
|
||||
|
||||
export function SentryCronMonitor(monitorSlug: string, schedule: string) {
|
||||
return function (
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
_target: any,
|
||||
_propertyKey: string,
|
||||
descriptor: PropertyDescriptor,
|
||||
) {
|
||||
const originalMethod = descriptor.value;
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
descriptor.value = async function (...args: any[]) {
|
||||
if (!Sentry.isInitialized()) {
|
||||
return await originalMethod.apply(this, args);
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ export const objectRecordChangedValues = (
|
||||
return diffAccumulator;
|
||||
},
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
{} as Record<string, { before: any; after: any }>,
|
||||
);
|
||||
|
||||
|
||||
+4
-4
@@ -1,11 +1,11 @@
|
||||
export function objectRecordDiffMerge(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
oldRecord: Record<string, any>,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
newRecord: Record<string, any>,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
): Record<string, any> {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const result: Record<string, any> = { diff: {} };
|
||||
|
||||
// Iterate over the keys in the oldRecord diff
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import { type ExceptionHandlerDriverInterface } from 'src/engine/core-modules/ex
|
||||
|
||||
export class ExceptionHandlerConsoleDriver implements ExceptionHandlerDriverInterface {
|
||||
captureExceptions(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
exceptions: ReadonlyArray<any>,
|
||||
options?: ExceptionHandlerOptions,
|
||||
) {
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import { CustomException } from 'src/utils/custom-exception';
|
||||
|
||||
export class ExceptionHandlerSentryDriver implements ExceptionHandlerDriverInterface {
|
||||
captureExceptions(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
exceptions: ReadonlyArray<any>,
|
||||
options?: ExceptionHandlerOptions,
|
||||
) {
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ export class ExceptionHandlerModule extends ConfigurableModuleClass {
|
||||
static forRootAsync(options: typeof ASYNC_OPTIONS_TYPE): DynamicModule {
|
||||
const provider = {
|
||||
provide: EXCEPTION_HANDLER_DRIVER,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
useFactory: async (...args: any[]) => {
|
||||
const config = await options?.useFactory?.(...args);
|
||||
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ export class ExceptionHandlerService {
|
||||
) {}
|
||||
|
||||
captureExceptions(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
exceptions: ReadonlyArray<any>,
|
||||
options?: ExceptionHandlerOptions,
|
||||
): string[] {
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { type ExceptionHandlerOptions } from 'src/engine/core-modules/exception-
|
||||
|
||||
export interface ExceptionHandlerDriverInterface {
|
||||
captureExceptions(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
exceptions: ReadonlyArray<any>,
|
||||
options?: ExceptionHandlerOptions,
|
||||
): string[];
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ export interface ExceptionHandlerOptions {
|
||||
name: string;
|
||||
};
|
||||
document?: string;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
additionalData?: Record<string, any>;
|
||||
user?: ExceptionHandlerUser | null;
|
||||
workspace?: ExceptionHandlerWorkspace | null;
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import { type ExceptionHandlerDriverInterface } from 'src/engine/core-modules/ex
|
||||
@Injectable()
|
||||
export class ExceptionHandlerMockService implements ExceptionHandlerDriverInterface {
|
||||
captureExceptions(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
exceptions: readonly any[],
|
||||
_?: ExceptionHandlerOptions | undefined,
|
||||
): string[] {
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ export class MockedUnhandledExceptionFilter
|
||||
extends BaseExceptionFilter
|
||||
implements ExceptionFilter
|
||||
{
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
catch(exception: any, _host: ArgumentsHost) {
|
||||
throw exception;
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ export class FileController {
|
||||
@Param('fileFolder') fileFolder: SupportedFileFolder,
|
||||
@Param('id') fileId: string,
|
||||
) {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const workspaceId = (req as any)?.workspaceId;
|
||||
|
||||
const fileResponse = await this.fileService
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ export class ResolverValidationPipe implements PipeTransform {
|
||||
throw new UserInputError(errorMessage);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
private toValidate(metatype: Type<any>): boolean {
|
||||
const types: unknown[] = [String, Boolean, Number, Array, Object];
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ type RestrictedGraphQLErrorExtensions = {
|
||||
};
|
||||
|
||||
export class BaseGraphQLError extends GraphQLError {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
public extensions: Record<string, any>;
|
||||
override readonly name!: string;
|
||||
readonly locations: ReadonlyArray<SourceLocation> | undefined;
|
||||
@@ -51,12 +51,12 @@ export class BaseGraphQLError extends GraphQLError {
|
||||
readonly nodes: ReadonlyArray<ASTNode> | undefined;
|
||||
public originalError: Error | undefined;
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
[key: string]: any;
|
||||
constructor(
|
||||
exceptionOrMessage: string | CustomException,
|
||||
code?: string,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
extensions?: Record<string, any>,
|
||||
) {
|
||||
if (exceptionOrMessage instanceof CustomException) {
|
||||
|
||||
@@ -70,7 +70,7 @@ export class JwtWrapperService {
|
||||
return jwt.sign(payload as object, signingKey.privateKeyPem, signOptions);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
verify<T extends object = any>(
|
||||
token: string,
|
||||
options?: { secret: string },
|
||||
@@ -78,7 +78,7 @@ export class JwtWrapperService {
|
||||
return this.jwtService.verify(token, options);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
decode<T = any>(payload: string, options?: jwt.DecodeOptions): T {
|
||||
return this.jwtService.decode(payload, options);
|
||||
}
|
||||
@@ -129,7 +129,7 @@ export class JwtWrapperService {
|
||||
async verifyJwtToken(
|
||||
token: string,
|
||||
options?: JwtVerifyOptions,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
): Promise<any> {
|
||||
const header = decodeJwtHeader(token);
|
||||
const payload = this.decode<JwtPayload>(token, { json: true });
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ import {
|
||||
} from 'src/engine/core-modules/key-value-pair/key-value-pair.entity';
|
||||
|
||||
export class KeyValuePairService<
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
KeyValueTypesMap extends Record<string, any> = Record<string, any>,
|
||||
> {
|
||||
constructor(
|
||||
|
||||
@@ -39,7 +39,7 @@ export class LoggerModule extends ConfigurableModuleClass {
|
||||
static forRootAsync(options: typeof ASYNC_OPTIONS_TYPE): DynamicModule {
|
||||
const provider = {
|
||||
provide: LOGGER_DRIVER,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
useFactory: async (...args: any[]) => {
|
||||
const config = await options?.useFactory?.(...args);
|
||||
|
||||
|
||||
@@ -18,12 +18,12 @@ type LoggerDriverType = ConsoleLogger & {
|
||||
export class LoggerService implements LoggerServiceInterface {
|
||||
constructor(@Inject(LOGGER_DRIVER) private driver: LoggerDriverType) {}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
log(message: any, category: string, ...optionalParams: any[]) {
|
||||
this.driver.log.apply(this.driver, [message, category, ...optionalParams]);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
error(message: any, category: string, ...optionalParams: any[]) {
|
||||
this.driver.error.apply(this.driver, [
|
||||
message,
|
||||
@@ -32,12 +32,12 @@ export class LoggerService implements LoggerServiceInterface {
|
||||
]);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
warn(message: any, category: string, ...optionalParams: any[]) {
|
||||
this.driver.warn.apply(this.driver, [message, category, ...optionalParams]);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
debug?(message: any, category: string, ...optionalParams: any[]) {
|
||||
this.driver.debug?.apply(this.driver, [
|
||||
message,
|
||||
@@ -46,7 +46,7 @@ export class LoggerService implements LoggerServiceInterface {
|
||||
]);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
verbose?(message: any, category: string, ...optionalParams: any[]) {
|
||||
this.driver.verbose?.apply(this.driver, [
|
||||
message,
|
||||
|
||||
+3
-3
@@ -12,11 +12,11 @@ export class ConsoleListener {
|
||||
};
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
intercept(callback: (type: string, message: any[]) => void) {
|
||||
Object.keys(this.originalConsole).forEach((method) => {
|
||||
// @ts-expect-error legacy noImplicitAny
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
console[method] = (...args: any[]) => {
|
||||
callback(method, args);
|
||||
};
|
||||
@@ -26,7 +26,7 @@ export class ConsoleListener {
|
||||
release() {
|
||||
Object.keys(this.originalConsole).forEach((method) => {
|
||||
// @ts-expect-error legacy noImplicitAny
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
console[method] = (...args: any[]) => {
|
||||
// @ts-expect-error legacy noImplicitAny
|
||||
this.originalConsole[method](...args);
|
||||
|
||||
@@ -39,7 +39,7 @@ export class SyncDriver implements MessageQueueDriver {
|
||||
id: '',
|
||||
name: jobName,
|
||||
// TODO: Fix this type issue
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
data: data as any,
|
||||
});
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
export interface MessageQueueJob<T = any> {
|
||||
id: string;
|
||||
name: string;
|
||||
@@ -12,6 +12,6 @@ export interface MessageQueueCronJobData<
|
||||
}
|
||||
|
||||
export interface MessageQueueJobData {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ export interface BullMQDriverFactoryOptions {
|
||||
|
||||
export interface SyncDriverFactoryOptions {
|
||||
type: MessageQueueDriverType.Sync;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
options: Record<string, any>;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -62,7 +62,7 @@ export class MessageQueueCoreModule extends ConfigurableModuleClass {
|
||||
|
||||
const driverProvider: Provider = {
|
||||
provide: QUEUE_DRIVER,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
useFactory: async (...args: any[]) => {
|
||||
if (options.useFactory) {
|
||||
const config = await options.useFactory(...args);
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
export type ObjectRecordProperties = Record<string, any>;
|
||||
|
||||
+3
-3
@@ -26,14 +26,14 @@ export type DeleteRecordInput = {
|
||||
export type FindRecordsInput = {
|
||||
objectName: string;
|
||||
filter?: {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
recordFilterGroups?: any;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
recordFilters?: any;
|
||||
gqlOperationFilter?: Partial<ObjectRecordFilter>[];
|
||||
};
|
||||
orderBy?: {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
recordSorts?: any;
|
||||
gqlOperationOrderBy?: Partial<ObjectRecordOrderBy>;
|
||||
};
|
||||
|
||||
+5
-5
@@ -65,9 +65,9 @@ export class RecordInputTransformerService {
|
||||
|
||||
private async transformFieldValue(
|
||||
fieldType: FieldMetadataType,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
value: any,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
): Promise<any> {
|
||||
if (!isDefined(value)) {
|
||||
return value;
|
||||
@@ -91,7 +91,7 @@ export class RecordInputTransformerService {
|
||||
}
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
private stringifySubFields(fieldMetadataType: FieldMetadataType, value: any) {
|
||||
const compositeType = compositeTypeDefinitions.get(fieldMetadataType);
|
||||
|
||||
@@ -120,7 +120,7 @@ export class RecordInputTransformerService {
|
||||
);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
private parseSubFields(fieldMetadataType: FieldMetadataType, value: any) {
|
||||
const compositeType = compositeTypeDefinitions.get(fieldMetadataType);
|
||||
|
||||
@@ -129,7 +129,7 @@ export class RecordInputTransformerService {
|
||||
}
|
||||
|
||||
return Object.entries(value).reduce(
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
(acc, [subFieldName, subFieldValue]: [string, any]) => {
|
||||
const subFieldType = compositeType.properties.find(
|
||||
(property) => property.name === subFieldName,
|
||||
|
||||
+2
-2
@@ -2,9 +2,9 @@ import { isNonEmptyArray, isNonEmptyString } from '@sniptt/guards';
|
||||
import { isDefined } from 'class-validator';
|
||||
|
||||
export const transformEmailsValue = (
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
value: any,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
): any => {
|
||||
if (!isDefined(value)) {
|
||||
return value;
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ const getServerBlockNoteEditor = async (): Promise<ServerBlockNoteEditor> => {
|
||||
};
|
||||
|
||||
export const transformRichTextValue = async (
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
richTextValue: any,
|
||||
): Promise<RichTextMetadata> => {
|
||||
const parsedValue = isNonEmptyString(richTextValue)
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import {
|
||||
|
||||
@ValidatorConstraint({ async: false })
|
||||
export class IsX509CertificateConstraint implements ValidatorConstraintInterface {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
validate(value: any) {
|
||||
if (typeof value !== 'string') {
|
||||
return false;
|
||||
|
||||
+1
-1
@@ -76,7 +76,7 @@ export class ConfigValueConverterService {
|
||||
return appValue;
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
return transformer.toStorage(appValue as any, options);
|
||||
} catch (error) {
|
||||
if (error instanceof ConfigVariableException) {
|
||||
|
||||
+3
-3
@@ -5,11 +5,11 @@ import {
|
||||
} from 'class-validator';
|
||||
|
||||
export const AssertOrWarn = (
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
condition: (object: any, value: any) => boolean,
|
||||
validationOptions?: ValidationOptions,
|
||||
) => {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
return function (object: any, propertyName: string) {
|
||||
registerDecorator({
|
||||
name: 'AssertOrWarn',
|
||||
@@ -21,7 +21,7 @@ export const AssertOrWarn = (
|
||||
},
|
||||
constraints: [condition],
|
||||
validator: {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
validate(value: any, args: ValidationArguments) {
|
||||
return condition(args.object, value);
|
||||
},
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ const VALID_LOG_LEVELS = ['log', 'error', 'warn', 'debug', 'verbose'];
|
||||
export const CastToLogLevelArray = () =>
|
||||
Transform(({ value }: { value: string }) => toLogLevelArray(value));
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const toLogLevelArray = (value: any) => {
|
||||
if (typeof value === 'string') {
|
||||
const rawLogLevels = value.split(',').map((level) => level.trim());
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import { isNonEmptyString } from '@sniptt/guards';
|
||||
export const CastToTypeORMLogLevelArray = () =>
|
||||
Transform(({ value }: { value: string }) => toTypeORMLogLevelArray(value));
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const toTypeORMLogLevelArray = (value: any) => {
|
||||
if (isNonEmptyString(value)) {
|
||||
const rawLogLevels = value.split(',').map((level) => level.trim());
|
||||
|
||||
+2
-2
@@ -16,10 +16,10 @@ export const IsStrictlyLowerThan = (
|
||||
constraints: [property],
|
||||
options: validationOptions,
|
||||
validator: {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
validate(value: any, args: ValidationArguments) {
|
||||
const [relatedPropertyName] = args.constraints;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
const relatedValue = (args.object as any)[relatedPropertyName];
|
||||
|
||||
return (
|
||||
|
||||
+2
-2
@@ -246,10 +246,10 @@ export class TwentyConfigService {
|
||||
|
||||
private maskSensitiveValue<T extends keyof ConfigVariables>(
|
||||
key: T,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
value: any,
|
||||
metadata: ConfigVariablesMetadataOptions,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
): any {
|
||||
if (key in CONFIG_VARIABLES_MASKING_CONFIG) {
|
||||
if (!isString(value)) {
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ export interface TypeTransformer<T> {
|
||||
|
||||
export const typeTransformers: Record<
|
||||
ConfigVariableType,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
TypeTransformer<any>
|
||||
> = {
|
||||
[ConfigVariableType.BOOLEAN]: {
|
||||
|
||||
+6
-6
@@ -8,7 +8,7 @@ import { mergeUserVars } from 'src/engine/core-modules/user/user-vars/utils/merg
|
||||
|
||||
@Injectable()
|
||||
export class UserVarsService<
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
KeyValueTypesMap extends Record<string, any> = Record<string, any>,
|
||||
> {
|
||||
constructor(private readonly keyValuePairService: KeyValuePairService) {}
|
||||
@@ -22,7 +22,7 @@ export class UserVarsService<
|
||||
workspaceId?: string;
|
||||
key: Extract<K, string>;
|
||||
}): Promise<KeyValueTypesMap[K]> {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
let userVarWorkspaceLevel: any[] = [];
|
||||
|
||||
if (workspaceId) {
|
||||
@@ -40,7 +40,7 @@ export class UserVarsService<
|
||||
);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
let userVarUserLevel: any[] = [];
|
||||
|
||||
if (userId) {
|
||||
@@ -56,7 +56,7 @@ export class UserVarsService<
|
||||
throw new Error(`Multiple values found for key ${key} at user level`);
|
||||
}
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
let userVarWorkspaceAndUserLevel: any[] = [];
|
||||
|
||||
if (userId && workspaceId) {
|
||||
@@ -87,9 +87,9 @@ export class UserVarsService<
|
||||
}: {
|
||||
userId?: string;
|
||||
workspaceId?: string;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
}): Promise<Map<Extract<keyof KeyValueTypesMap, string>, any>> {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
let result: any[] = [];
|
||||
|
||||
if (userId) {
|
||||
|
||||
@@ -8,13 +8,13 @@ import { UserEntity } from 'src/engine/core-modules/user/user.entity';
|
||||
import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard';
|
||||
|
||||
export const userAutoResolverOpts: AutoResolverOpts<
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
any,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
any,
|
||||
unknown,
|
||||
unknown,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
ReadResolverOpts<any>,
|
||||
PagingStrategies
|
||||
>[] = [
|
||||
|
||||
+3
-3
@@ -9,13 +9,13 @@ import { WorkspaceAuthGuard } from 'src/engine/guards/workspace-auth.guard';
|
||||
import { WorkspaceEntity } from 'src/engine/core-modules/workspace/workspace.entity';
|
||||
|
||||
export const workspaceAutoResolverOpts: AutoResolverOpts<
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
any,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
any,
|
||||
unknown,
|
||||
unknown,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
ReadResolverOpts<any>,
|
||||
PagingStrategies
|
||||
>[] = [
|
||||
|
||||
Reference in New Issue
Block a user