diff --git a/node_package/src/buildConsoleReplay.ts b/node_package/src/buildConsoleReplay.ts index 35c33c0356..38436467d5 100644 --- a/node_package/src/buildConsoleReplay.ts +++ b/node_package/src/buildConsoleReplay.ts @@ -1,6 +1,8 @@ import RenderUtils from './RenderUtils'; import scriptSanitizedVal from './scriptSanitizedVal'; +/* eslint-disable @typescript-eslint/no-explicit-any */ + declare global { interface Console { history?: { diff --git a/node_package/src/clientStartup.ts b/node_package/src/clientStartup.ts index 375e610a74..23260c7bdd 100644 --- a/node_package/src/clientStartup.ts +++ b/node_package/src/clientStartup.ts @@ -13,6 +13,8 @@ import { isServerRenderHash } from './isServerRenderResult'; import reactHydrateOrRender from './reactHydrateOrRender'; import { supportsRootApi } from './reactApis'; +/* eslint-disable @typescript-eslint/no-explicit-any */ + declare global { interface Window { ReactOnRails: ReactOnRailsType; @@ -302,7 +304,6 @@ export function clientStartup(context: Context): void { if (!isWindow(context)) { return; } - const { document } = context; // Tried with a file local variable, but the install handler gets called twice. // eslint-disable-next-line no-underscore-dangle diff --git a/node_package/src/reactApis.ts b/node_package/src/reactApis.ts index afee435bba..72c8eacad5 100644 --- a/node_package/src/reactApis.ts +++ b/node_package/src/reactApis.ts @@ -1,6 +1,6 @@ import ReactDOM from 'react-dom'; -const reactMajorVersion = ReactDOM.version?.split('.')[0] || 16; +const reactMajorVersion = Number(ReactDOM.version?.split('.')[0]) || 16; // TODO: once we require React 18, we can remove this and inline everything guarded by it. // Not the default export because others may be added for future React versions. diff --git a/node_package/src/serverRenderReactComponent.ts b/node_package/src/serverRenderReactComponent.ts index b58ea87a50..422b430c2b 100644 --- a/node_package/src/serverRenderReactComponent.ts +++ b/node_package/src/serverRenderReactComponent.ts @@ -9,6 +9,8 @@ import buildConsoleReplay from './buildConsoleReplay'; import handleError from './handleError'; import type { RenderParams, RenderResult, RenderingError } from './types/index'; +/* eslint-disable @typescript-eslint/no-explicit-any */ + function serverRenderReactComponentInternal(options: RenderParams): null | string | Promise { const { name, domNodeId, trace, props, railsContext, renderingReturnsPromises, throwJsErrors } = options;