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
@@ -14,7 +14,7 @@ export class QueryRunnerArgsFactory {
|
||||
|
||||
async overrideValueByFieldMetadata(
|
||||
key: string,
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
value: any,
|
||||
fieldIdByName: Record<string, string>,
|
||||
flatObjectMetadata: FlatObjectMetadata,
|
||||
|
||||
+12
-12
@@ -52,7 +52,7 @@ export class ProcessNestedRelationsV2Helper {
|
||||
flatFieldMetadataMaps: FlatEntityMaps<FlatFieldMetadata>;
|
||||
parentObjectMetadataItem: FlatObjectMetadata;
|
||||
parentObjectRecords: T[];
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
parentObjectRecordsAggregatedValues?: Record<string, any>;
|
||||
relations: Record<string, FindOptionsRelations<ObjectLiteral>>;
|
||||
aggregate?: Record<string, AggregationField>;
|
||||
@@ -60,7 +60,7 @@ export class ProcessNestedRelationsV2Helper {
|
||||
authContext: WorkspaceAuthContext;
|
||||
workspaceDataSource: GlobalWorkspaceDataSource;
|
||||
rolePermissionConfig?: RolePermissionConfig;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
selectedFields: Record<string, any>;
|
||||
}): Promise<void> {
|
||||
const processRelationTasks = Object.entries(relations).map(
|
||||
@@ -107,7 +107,7 @@ export class ProcessNestedRelationsV2Helper {
|
||||
flatFieldMetadataMaps: FlatEntityMaps<FlatFieldMetadata>;
|
||||
parentObjectMetadataItem: FlatObjectMetadata;
|
||||
parentObjectRecords: T[];
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
parentObjectRecordsAggregatedValues: Record<string, any>;
|
||||
sourceFieldName: string;
|
||||
nestedRelations: FindOptionsRelations<ObjectLiteral>;
|
||||
@@ -333,7 +333,7 @@ export class ProcessNestedRelationsV2Helper {
|
||||
}: {
|
||||
records: ObjectRecord[];
|
||||
idField: string;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
}): any[] {
|
||||
return [...new Set(records.map((item) => item[idField]))];
|
||||
}
|
||||
@@ -347,24 +347,24 @@ export class ProcessNestedRelationsV2Helper {
|
||||
sourceFieldName,
|
||||
targetObjectNameSingular,
|
||||
}: {
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
referenceQueryBuilder: WorkspaceSelectQueryBuilder<any>;
|
||||
column: string;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
ids: any[];
|
||||
limit: number;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
aggregate: Record<string, any>;
|
||||
sourceFieldName: string;
|
||||
targetObjectNameSingular: string;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
}): Promise<{ relationResults: any[]; relationAggregatedFieldsResult: any }> {
|
||||
if (ids.length === 0) {
|
||||
return { relationResults: [], relationAggregatedFieldsResult: {} };
|
||||
}
|
||||
|
||||
const aggregateForRelation = aggregate[sourceFieldName];
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
let relationAggregatedFieldsResult: Record<string, any> = {};
|
||||
|
||||
if (aggregateForRelation) {
|
||||
@@ -427,11 +427,11 @@ export class ProcessNestedRelationsV2Helper {
|
||||
selectedFields,
|
||||
}: {
|
||||
parentRecords: ObjectRecord[];
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
parentObjectRecordsAggregatedValues: Record<string, any>;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
relationResults: any[];
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
relationAggregatedFieldsResult: Record<string, any>;
|
||||
sourceFieldName: string;
|
||||
joinField: string;
|
||||
|
||||
+2
-2
@@ -36,7 +36,7 @@ export class ProcessNestedRelationsHelper {
|
||||
flatFieldMetadataMaps: FlatEntityMaps<FlatFieldMetadata>;
|
||||
parentObjectMetadataItem: FlatObjectMetadata;
|
||||
parentObjectRecords: T[];
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
parentObjectRecordsAggregatedValues?: Record<string, any>;
|
||||
relations: Record<string, FindOptionsRelations<ObjectLiteral>>;
|
||||
aggregate?: Record<string, AggregationField>;
|
||||
@@ -44,7 +44,7 @@ export class ProcessNestedRelationsHelper {
|
||||
authContext: WorkspaceAuthContext;
|
||||
workspaceDataSource: GlobalWorkspaceDataSource;
|
||||
rolePermissionConfig?: RolePermissionConfig;
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
selectedFields: Record<string, any>;
|
||||
}): Promise<void> {
|
||||
return this.processNestedRelationsV2Helper.processNestedRelations({
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import { type FileUrlService } from 'src/engine/core-modules/file/file-url/file-
|
||||
import { extractFileIdFromUrl } from 'src/engine/core-modules/file/files-field/utils/extract-file-id-from-url.util';
|
||||
import { type FlatFieldMetadata } from 'src/engine/metadata-modules/flat-field-metadata/types/flat-field-metadata.type';
|
||||
|
||||
// oxlint-disable-next-line @typescripttypescript/no-explicit-any
|
||||
// oxlint-disable-next-line typescript/no-explicit-any
|
||||
type RichTextBlock = Record<string, any>;
|
||||
|
||||
const parseBlocknoteJsonSafely = (
|
||||
|
||||
Reference in New Issue
Block a user