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
@@ -44,7 +44,7 @@ registerEnumType(FieldMetadataType, {
|
||||
|
||||
@ObjectType('Field')
|
||||
@Authorize({
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authorize: (context: any) => ({
|
||||
workspaceId: { eq: context?.req?.workspace?.id },
|
||||
}),
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import { fieldMetadataGraphqlApiExceptionHandler } from 'src/engine/metadata-mod
|
||||
|
||||
@Injectable()
|
||||
export class FieldMetadataGraphqlApiExceptionInterceptor implements NestInterceptor {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
intercept(_context: ExecutionContext, next: CallHandler): Observable<any> {
|
||||
return next
|
||||
.handle()
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ type MetadataSerializedRelationProperties = {
|
||||
[TSourceMetadataName in AllMetadataName]: [
|
||||
AllJsonbPropertiesWithSerializedPropertiesForMetadataName<TSourceMetadataName>,
|
||||
] extends [never]
|
||||
? // oxlint-disable-next-line @typescripttypescript/no-empty-object-type
|
||||
? // oxlint-disable-next-line typescript/no-empty-object-type
|
||||
{}
|
||||
: Partial<Record<AllMetadataName, true>>;
|
||||
};
|
||||
|
||||
+1
-1
@@ -26,5 +26,5 @@ export type FlatEntityFrom<
|
||||
? FromMetadataEntityToMetadataName<TEntity>
|
||||
: TMetadataName
|
||||
> & { universalIdentifier: string }
|
||||
: // oxlint-disable-next-line @typescripttypescript/no-empty-object-type
|
||||
: // oxlint-disable-next-line typescript/no-empty-object-type
|
||||
{});
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ import { IndexMetadataDTO } from './index-metadata.dto';
|
||||
|
||||
@ObjectType('IndexField')
|
||||
@Authorize({
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authorize: (context: any) => ({
|
||||
workspaceId: { eq: context?.req?.workspace?.id },
|
||||
}),
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ registerEnumType(IndexType, {
|
||||
|
||||
@ObjectType('Index')
|
||||
@Authorize({
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authorize: (context: any) => ({
|
||||
workspaceId: { eq: context?.req?.workspace?.id },
|
||||
}),
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ registerEnumType(LogicFunctionExecutionMode, {
|
||||
|
||||
@ObjectType('LogicFunction')
|
||||
@Authorize({
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authorize: (context: any) => ({
|
||||
workspaceId: { eq: context?.req?.workspace?.id },
|
||||
}),
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ import {
|
||||
LogicFunctionExceptionCode,
|
||||
} from 'src/engine/metadata-modules/logic-function/logic-function.exception';
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
export const logicFunctionGraphQLApiExceptionHandler = (error: any) => {
|
||||
if (error instanceof LogicFunctionException) {
|
||||
switch (error.code) {
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import { ObjectStandardOverridesDTO } from 'src/engine/metadata-modules/object-m
|
||||
|
||||
@ObjectType('Object')
|
||||
@Authorize({
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
authorize: (context: any) => ({
|
||||
workspaceId: { eq: context?.req?.workspace?.id },
|
||||
}),
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import { objectMetadataGraphqlApiExceptionHandler } from 'src/engine/metadata-mo
|
||||
|
||||
@Injectable()
|
||||
export class ObjectMetadataGraphqlApiExceptionInterceptor implements NestInterceptor {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
intercept(_context: ExecutionContext, next: CallHandler): Observable<any> {
|
||||
return next
|
||||
.handle()
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ export type CallWebhookJobData = WebhookJobBase & {
|
||||
objectMetadata: { id: string; nameSingular: string };
|
||||
workspaceMemberId?: string;
|
||||
applicationId?: string;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
record: any;
|
||||
updatedFields?: string[];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user