Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ahangarha committed Jan 10, 2024
1 parent 32aeb9b commit caa3d6c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions node_package/src/buildConsoleReplay.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import RenderUtils from './RenderUtils';
import scriptSanitizedVal from './scriptSanitizedVal';

/* eslint-disable @typescript-eslint/no-explicit-any */

declare global {
interface Console {
history?: {
Expand Down
3 changes: 2 additions & 1 deletion node_package/src/clientStartup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion node_package/src/reactApis.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 2 additions & 0 deletions node_package/src/serverRenderReactComponent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<RenderResult> {
const { name, domNodeId, trace, props, railsContext, renderingReturnsPromises, throwJsErrors } = options;

Expand Down

0 comments on commit caa3d6c

Please sign in to comment.