Skip to content

Commit 1f8e4a6

Browse files
committed
Manual lint-fixes, more disables
1 parent 3f83b26 commit 1f8e4a6

7 files changed

Lines changed: 18 additions & 12 deletions

File tree

addon/.eslintrc.cjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,20 @@ module.exports = {
4141
// (public types do not always exist for the things we need to import)
4242
'@typescript-eslint/ban-ts-comment': 'off',
4343
'@typescript-eslint/no-explicit-any': 'off',
44+
'@typescript-eslint/ban-types': 'off',
4445
// We access the _routerMicrolib
4546
// and router:main
4647
'ember/no-private-routing-service': 'off',
48+
// This library must violate this rule so that consumers
49+
// can have some additional protections for working _with_ this rule.
50+
'ember/no-ember-testing-in-module-scope': 'off',
51+
// Used in `setupRenderingContext` to hook in to "appendTo"
52+
// on the -top-level-view:main
53+
'ember/no-runloop': 'off',
54+
// For accessing container_proxy and registry_proxy
55+
'ember/no-mixins': 'off',
56+
// We violate this for making the owner in build-registry.
57+
'ember/no-classic-classes': 'off',
4758
},
4859
},
4960
{

addon/src/dom/trigger-key-event.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,12 +215,6 @@ export function __triggerKeyEvent__(
215215
});
216216
}
217217

218-
// eslint-disable-next-line require-jsdoc
219-
function errorMessage(message: string, target: Target) {
220-
const description = getDescription(target);
221-
return `${message} when calling \`triggerKeyEvent('${description}')\`.`;
222-
}
223-
224218
/**
225219
Triggers a keyboard event of given type in the target element.
226220
It also requires the developer to provide either a string with the [`key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values)

addon/src/dom/wait-for.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ export default function waitFor(
4141
);
4242
}
4343

44-
let { timeout = 1000, count = null, timeoutMessage } = options;
44+
const { timeout = 1000, count = null } = options;
45+
let { timeoutMessage } = options;
46+
4547
if (!timeoutMessage) {
4648
const description = getDescription(target);
4749
timeoutMessage = `waitFor timed out waiting for selector "${description}"`;

addon/src/has-ember-version.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import Ember from 'ember';
1+
// @ts-ignore
2+
import { VERSION } from '@ember/version';
23

34
/**
45
Checks if the currently running Ember version is greater than or equal to the
@@ -10,7 +11,7 @@ import Ember from 'ember';
1011
@returns {boolean} true if the Ember version is >= MAJOR.MINOR specified, false otherwise
1112
*/
1213
export default function hasEmberVersion(major: number, minor: number): boolean {
13-
const numbers = Ember.VERSION.split('-')[0]?.split('.');
14+
const numbers = VERSION.split('-')[0]?.split('.');
1415

1516
if (!numbers || !numbers[0] || !numbers[1]) {
1617
throw new Error('`Ember.VERSION` is not set.');

addon/src/settled.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* globals jQuery */
21
// @ts-ignore: this is private API. This import will work Ember 5.1+ since it
32
// "provides" this public API, but does not for earlier versions. As a result,
43
// this type will be `any`.

addon/src/setup-context.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ export function resumeTest(): void {
215215
@private
216216
@param {Object} context the test context being cleaned up
217217
*/
218+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
218219
function cleanup(context: BaseContext) {
219220
_teardownAJAXHooks();
220221

addon/src/setup-rendering-context.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* globals EmberENV */
21
import { run } from '@ember/runloop';
32
import Ember from 'ember';
43
import global from './global.ts';
@@ -40,7 +39,6 @@ export interface RenderingTestContext extends TestContext {
4039
// Isolates the notion of transforming a TextContext into a RenderingTestContext.
4140
// eslint-disable-next-line require-jsdoc
4241
function prepare(context: TestContext): RenderingTestContext {
43-
const renderingTestContext = context as RenderingTestContext;
4442
(context as RenderingTestContext)[hasCalledSetupRenderingContext] = true;
4543
return context as RenderingTestContext;
4644
}

0 commit comments

Comments
 (0)