Skip to content

Commit 06a2e25

Browse files
committed
fix review comments: use eslint config instead of globals DOMRect DOMRectList, unused function, and avoid declaring global types
1 parent b59b36e commit 06a2e25

5 files changed

Lines changed: 13 additions & 16 deletions

File tree

eslint.config.mjs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ export default [
154154
Symbol: true,
155155
WeakMap: true,
156156
Event: true,
157+
MouseEvent: true,
158+
KeyboardEvent: true,
159+
DOMRect: true,
160+
DOMRectList: true,
157161
},
158162

159163
ecmaVersion: 2017,
Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
import type { GlobalContext } from './context';
22

3-
declare global {
4-
var Ember: Partial<GlobalContext> | undefined;
5-
var EmberENV:
6-
| (Record<string, unknown> & {
7-
EXTEND_PROTOTYPES?: boolean;
8-
EMBER_LOAD_HOOKS?: Record<string, unknown>;
9-
FEATURES?: Record<string, unknown>;
10-
})
11-
| undefined;
3+
export interface EmberGlobal {
4+
Ember?: Partial<GlobalContext>;
5+
EmberENV?: Record<string, unknown> & {
6+
EXTEND_PROTOTYPES?: boolean;
7+
EMBER_LOAD_HOOKS?: Record<string, unknown>;
8+
FEATURES?: Record<string, unknown>;
9+
};
10+
[key: string]: unknown;
1211
}
1312

1413
// export real global
15-
export default globalThis;
14+
export default globalThis as unknown as EmberGlobal;

packages/@ember/-internals/glimmer/tests/integration/components/link-to/routing-angle-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* globals MouseEvent */
21
import {
32
ApplicationTestCase,
43
ModuleBasedTestResolver,

packages/@ember/-internals/glimmer/tests/integration/components/utils-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* globals DOMRect DOMRectList */
21
import { moduleFor, ApplicationTestCase, RenderingTestCase, runTask } from 'internal-test-helpers';
32

43
import { tracked } from '@glimmer/tracking';

packages/@ember/-internals/views/lib/system/utils.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,3 @@ export function getViewBoundingClientRect(view: View): DOMRect {
204204
let range = getViewRange(view);
205205
return range.getBoundingClientRect();
206206
}
207-
208-
export function contains(a: Node, b: Node): boolean {
209-
return a.contains(b);
210-
}

0 commit comments

Comments
 (0)