Skip to content

Commit c6e0630

Browse files
committed
Add no-var ESLint disable for TypeScript declare global blocks
CI detects no-var violations in declare global blocks, while local ESLint does not. This appears to be an environment difference in how TypeScript ESLint processes ambient declarations. Adding the disable directive to match CI requirements. The declare global syntax requires var (not let/const) per TypeScript spec.
1 parent 446c6ac commit c6e0630

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react-on-rails/src/context.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import type { ReactOnRailsInternal, RailsContext } from './types/index.ts';
22

33
declare global {
4-
/* eslint-disable vars-on-top,no-underscore-dangle */
4+
/* eslint-disable vars-on-top,no-var,no-underscore-dangle */
55
var ReactOnRails: ReactOnRailsInternal | undefined;
66
var __REACT_ON_RAILS_EVENT_HANDLERS_RAN_ONCE__: boolean;
7-
/* eslint-enable vars-on-top,no-underscore-dangle */
7+
/* eslint-enable vars-on-top,no-var,no-underscore-dangle */
88
}
99

1010
let currentRailsContext: RailsContext | null = null;

0 commit comments

Comments
 (0)