Skip to content

Commit 3f83b26

Browse files
committed
lint:fix
1 parent c70367f commit 3f83b26

15 files changed

Lines changed: 51 additions & 46 deletions

addon/src/-internal/debug-info.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export class TestDebugInfo implements DebugInfo {
155155
}
156156

157157
toConsole(_console = console): void {
158-
let summary = this.summary;
158+
const summary = this.summary;
159159

160160
if (summary.hasPendingRequests) {
161161
_console.log(PENDING_AJAX_REQUESTS);
@@ -172,7 +172,7 @@ export class TestDebugInfo implements DebugInfo {
172172

173173
Object.keys(summary.pendingTestWaiterInfo.waiters).forEach(
174174
(waiterName) => {
175-
let waiterDebugInfo =
175+
const waiterDebugInfo =
176176
summary.pendingTestWaiterInfo.waiters[waiterName];
177177

178178
if (Array.isArray(waiterDebugInfo)) {

addon/src/-internal/deprecations.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ export function getDeprecationsDuringCallbackForContext(
8484
// * squelch deprecations by name via: `/tests/index.html?disabledDeprecations=this-property-fallback,some-other-thing`
8585
// * enable a debuggger when a deprecation by a specific name is encountered via: `/tests/index.html?debugDeprecations=some-other-thing` when the
8686
if (typeof URLSearchParams !== 'undefined') {
87-
let queryParams = new URLSearchParams(document.location.search.substring(1));
87+
const queryParams = new URLSearchParams(
88+
document.location.search.substring(1),
89+
);
8890
const disabledDeprecations = queryParams.get('disabledDeprecations');
8991
const debugDeprecations = queryParams.get('debugDeprecations');
9092

addon/src/build-owner.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ export default function buildOwner(
5555
);
5656
}
5757

58-
let { owner } = legacyBuildRegistry(resolver) as unknown as { owner: Owner };
58+
const { owner } = legacyBuildRegistry(resolver) as unknown as {
59+
owner: Owner;
60+
};
5961

6062
return Promise.resolve(owner);
6163
}

addon/src/dom/-get-description.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import type { Target } from './-target';
1010
@returns {string} a description of the target
1111
*/
1212
export default function getDescription(target: Target): string {
13-
let data = isDescriptor(target) ? lookupDescriptorData(target) : null;
13+
const data = isDescriptor(target) ? lookupDescriptorData(target) : null;
1414
if (data) {
1515
return data.description || '<unknown descriptor>';
1616
} else {

addon/src/dom/-guard-for-maxlength.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const constrainedInputTypes = [
1616
@returns {boolean} `true` when the element should constrain input by the maxlength attribute, `false` otherwise
1717
*/
1818
function isMaxLengthConstrained(
19-
element: Element
19+
element: Element,
2020
): element is HTMLInputElement | HTMLTextAreaElement {
2121
return (
2222
!!Number(element.getAttribute('maxlength')) &&
@@ -36,7 +36,7 @@ function isMaxLengthConstrained(
3636
export default function guardForMaxlength(
3737
element: FormControl,
3838
text: string,
39-
testHelper: string
39+
testHelper: string,
4040
): void {
4141
const maxlength = element.getAttribute('maxlength');
4242
if (
@@ -46,7 +46,7 @@ export default function guardForMaxlength(
4646
text.length > Number(maxlength)
4747
) {
4848
throw new Error(
49-
`Can not \`${testHelper}\` with text: '${text}' that exceeds maxlength: '${maxlength}'.`
49+
`Can not \`${testHelper}\` with text: '${text}' that exceeds maxlength: '${maxlength}'.`,
5050
);
5151
}
5252
}

addon/src/dom/-logging.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ export function log(helperName: string, target: Target, ...args: any[]) {
1313
// eslint-disable-next-line no-console
1414
console.log(
1515
`${helperName}(${[elementToString(target), ...args.filter(Boolean)].join(
16-
', '
17-
)})`
16+
', ',
17+
)})`,
1818
);
1919
}
2020
}

addon/src/dom/-target.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function isDocument(target: unknown): target is Document {
3636

3737
// eslint-disable-next-line require-jsdoc
3838
export function isContentEditable(
39-
element: Element
39+
element: Element,
4040
): element is HTMLElementContentEditable {
4141
return (
4242
'isContentEditable' in element && (element as HTMLElement).isContentEditable

addon/src/dom/-to-array.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
@returns {Array} an array
55
*/
66
export default function toArray<T extends Node>(nodelist: NodeListOf<T>): T[] {
7-
let array = new Array(nodelist.length);
7+
const array = new Array(nodelist.length);
88
for (let i = 0; i < nodelist.length; i++) {
99
array[i] = nodelist[i];
1010
}

addon/src/dom/click.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export default function click(
9494
target: Target,
9595
_options: MouseEventInit = {},
9696
): Promise<void> {
97-
let options = { ...DEFAULT_CLICK_OPTIONS, ..._options };
97+
const options = { ...DEFAULT_CLICK_OPTIONS, ..._options };
9898

9999
return Promise.resolve()
100100
.then(() => runHooks('click', 'start', target, _options))
@@ -105,9 +105,9 @@ export default function click(
105105
);
106106
}
107107

108-
let element = getWindowOrElement(target);
108+
const element = getWindowOrElement(target);
109109
if (!element) {
110-
let description = getDescription(target);
110+
const description = getDescription(target);
111111
throw new Error(
112112
`Element not found when calling \`click('${description}')\`.`,
113113
);

addon/src/dom/fill-in.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ export default function fillIn(target: Target, text: string): Promise<void> {
4040
);
4141
}
4242

43-
let element = getElement(target) as Element | HTMLElement;
43+
const element = getElement(target) as Element | HTMLElement;
4444
if (!element) {
45-
let description = getDescription(target);
45+
const description = getDescription(target);
4646
throw new Error(
4747
`Element not found when calling \`fillIn('${description}')\`.`,
4848
);

0 commit comments

Comments
 (0)