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
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user