diff --git a/packages/realm/bindgen/src/js-passes.ts b/packages/realm/bindgen/src/js-passes.ts index 85e0a47eec..0ec6dbd4a5 100644 --- a/packages/realm/bindgen/src/js-passes.ts +++ b/packages/realm/bindgen/src/js-passes.ts @@ -71,7 +71,12 @@ function addSharedPtrMethods(spec: BoundSpec) { } class CustomProperty extends Property { - constructor(on: Class, public readonly name: string, type: Type, public call: MethodCallSig) { + constructor( + on: Class, + public readonly name: string, + type: Type, + public call: MethodCallSig, + ) { assert(name.startsWith("$")); super(on, "DOLLAR_" + name.slice(1), type); } @@ -82,7 +87,12 @@ class CustomProperty extends Property { } class CustomInstanceMethod extends InstanceMethod { - constructor(on: Class, public name: string, sig: Func, public call: MethodCallSig) { + constructor( + on: Class, + public name: string, + sig: Func, + public call: MethodCallSig, + ) { assert(name.startsWith("$")); const unique_name = "DOLLAR_" + name.slice(1); super(on, name, unique_name, unique_name, sig); diff --git a/packages/realm/bindgen/src/templates/jsi.ts b/packages/realm/bindgen/src/templates/jsi.ts index c91cd43379..575d10e387 100644 --- a/packages/realm/bindgen/src/templates/jsi.ts +++ b/packages/realm/bindgen/src/templates/jsi.ts @@ -55,7 +55,11 @@ function tryWrap(body: string) { } class CppJsiFunc extends CppFunc { - constructor(private addon: JsiAddon, name: string, props?: CppFuncProps) { + constructor( + private addon: JsiAddon, + name: string, + props?: CppFuncProps, + ) { super(name, "jsi::Value", jsi_callback_args, props); } diff --git a/packages/realm/bindgen/src/templates/node-wrapper.ts b/packages/realm/bindgen/src/templates/node-wrapper.ts index 597fd40176..ca05ae287e 100644 --- a/packages/realm/bindgen/src/templates/node-wrapper.ts +++ b/packages/realm/bindgen/src/templates/node-wrapper.ts @@ -22,6 +22,7 @@ import { TemplateContext } from "@realm/bindgen/context"; import { doJsPasses } from "../js-passes"; import { eslint } from "../eslint-formatter"; +// eslint-disable-next-line @typescript-eslint/no-unused-vars export function generate({ rawSpec, spec: boundSpec, file }: TemplateContext): void { const spec = doJsPasses(boundSpec); const reactLines = []; diff --git a/packages/realm/bindgen/src/templates/node.ts b/packages/realm/bindgen/src/templates/node.ts index b6220377c6..c360f6207e 100644 --- a/packages/realm/bindgen/src/templates/node.ts +++ b/packages/realm/bindgen/src/templates/node.ts @@ -51,7 +51,11 @@ function tryWrap(body: string) { } class CppNodeFunc extends CppFunc { - constructor(private addon: NodeAddon, name: string, props?: CppFuncProps) { + constructor( + private addon: NodeAddon, + name: string, + props?: CppFuncProps, + ) { super(name, "Napi::Value", [node_callback_info], props); } diff --git a/packages/realm/src/Realm.ts b/packages/realm/src/Realm.ts index 4577d12d45..3eafd455d7 100644 --- a/packages/realm/src/Realm.ts +++ b/packages/realm/src/Realm.ts @@ -296,7 +296,8 @@ export class Realm { * @example * Realm.setLogLevel({ category: LogCategory.Realm, level: "all" }); */ - static setLogLevel(_arg: LogLevel | LogArgs) { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + static setLogLevel(_: LogLevel | LogArgs) { // It is not possible to overload a static function: https://github.com/microsoft/TypeScript/issues/18945 // FIXME: don't use `arguments` but find a proper type if (arguments.length === 1) { @@ -955,6 +956,7 @@ export class Realm { * Deletes the provided Realm object, or each one inside the provided collection. * @param subject - The Realm object to delete, or a collection containing multiple Realm objects to delete. */ + // eslint-disable-next-line @typescript-eslint/no-explicit-any delete(subject: AnyRealmObject | AnyRealmObject[] | AnyList | AnyResults | any): void { assert.inTransaction(this, "Can only delete objects within a transaction."); assert.object(subject, "subject"); @@ -1653,6 +1655,7 @@ export declare namespace Realm { export type CountOptions = CountOptionsType; export type DeleteEvent = DeleteEventType; export type DeleteResult = DeleteResultType; + // eslint-disable-next-line @typescript-eslint/no-explicit-any export type Document = DocumentType; export type DocumentKey = DocumentKeyType; export type DocumentNamespace = DocumentNamespaceType; @@ -1695,6 +1698,7 @@ export declare namespace Realm { export type Set = Realm.Set; export type Dictionary = Realm.Dictionary; export type Mixed = unknown; + // eslint-disable-next-line @typescript-eslint/no-unused-vars export type LinkingObjects = Realm.Results; } } @@ -1875,6 +1879,7 @@ declare global { export type CountOptions = CountOptionsType; export type DeleteEvent = DeleteEventType; export type DeleteResult = DeleteResultType; + // eslint-disable-next-line @typescript-eslint/no-explicit-any export type Document = DocumentType; export type DocumentKey = DocumentKeyType; export type DocumentNamespace = DocumentNamespaceType; @@ -1917,6 +1922,7 @@ declare global { export type Set = Realm.Set; export type Dictionary = Realm.Dictionary; export type Mixed = unknown; + // eslint-disable-next-line @typescript-eslint/no-unused-vars export type LinkingObjects = Realm.Results; } } diff --git a/packages/realm/src/Unmanaged.ts b/packages/realm/src/Unmanaged.ts index e181794024..d75cd76168 100644 --- a/packages/realm/src/Unmanaged.ts +++ b/packages/realm/src/Unmanaged.ts @@ -16,6 +16,7 @@ // //////////////////////////////////////////////////////////////////////////// +// eslint-disable-next-line @typescript-eslint/no-unused-vars import { Collection, Dictionary, List, RealmObject } from "./internal"; import { AnyRealmObject } from "./Object"; diff --git a/packages/realm/src/app-services/App.ts b/packages/realm/src/app-services/App.ts index 15b4b97b15..4fa8e928c9 100644 --- a/packages/realm/src/app-services/App.ts +++ b/packages/realm/src/app-services/App.ts @@ -267,7 +267,7 @@ export class App< constructor(configOrId: AppConfiguration | string) { const config: AppConfiguration = typeof configOrId === "string" ? { id: configOrId } : configOrId; assert.object(config, "config"); - const { id, baseUrl, app, timeout, multiplexSessions = true, baseFilePath, metadata, fetch } = config; + const { id, baseUrl, timeout, multiplexSessions = true, baseFilePath, metadata, fetch } = config; assert.string(id, "id"); if (timeout !== undefined) { assert.number(timeout, "timeout"); diff --git a/packages/realm/src/tests/schema-transform.test.ts b/packages/realm/src/tests/schema-transform.test.ts index c5824fe931..3677bc8a95 100644 --- a/packages/realm/src/tests/schema-transform.test.ts +++ b/packages/realm/src/tests/schema-transform.test.ts @@ -49,6 +49,7 @@ describe("schema transform", () => { linkOriginPropertyName: "", isPrimary: false, isIndexed: false, + // eslint-disable-next-line @typescript-eslint/no-explicit-any columnKey: { value: 0n } as any, ...bindingSchema, });