Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tighten type imports #573

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion addon-test-support/audit.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { run, RunOptions, ElementContext, ContextObject } from 'axe-core';
import type { RunOptions, ElementContext, ContextObject } from 'axe-core';
import { run } from 'axe-core';
import { mark, markEndAndMeasure } from './performance';
import { getRunOptions } from './run-options';
import { reportA11yAudit } from './reporter';
Expand Down
3 changes: 2 additions & 1 deletion addon-test-support/logger.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import axeCore, { AxeResults, NodeResult, RelatedNode, Result } from 'axe-core';
import axeCore from 'axe-core';
import type { AxeResults, NodeResult, RelatedNode, Result } from 'axe-core';

/**
* This file is heavily borrowed from https://github.com/dequelabs/react-axe/blob/d3245b32fc5ed19e3c7b2c43d2815fe63f5875cb/index.ts
Expand Down
3 changes: 2 additions & 1 deletion addon-test-support/performance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@ export function measure(comment: string, startMark: string, endMark: string) {
if (HAS_PERFORMANCE) {
performance.measure(comment, startMark, endMark);
}
} catch (e) {
} catch (e: unknown) {
// eslint-disable-next-line no-console
console.warn(
'performance.measure could not be executed because of ',
// @ts-ignore
e.message,
);
}
Expand Down
2 changes: 1 addition & 1 deletion addon-test-support/reporter.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import QUnit from 'qunit';
import { AxeResults } from 'axe-core';
import formatViolation from './format-violation';
import { A11yAuditReporter } from './types';
import type { A11yAuditReporter } from './types';
import { storeResults } from './logger';

export const DEFAULT_REPORTER = async (results: AxeResults) => {
Expand Down
2 changes: 1 addition & 1 deletion addon-test-support/run-options.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { RunOptions } from 'axe-core';
import type { RunOptions } from 'axe-core';
import { getContext } from '@ember/test-helpers';
import { registerDestructor } from '@ember/destroyable';

Expand Down
2 changes: 1 addition & 1 deletion addon-test-support/setup-global-a11y-hooks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { registerHook, type HookUnregister } from '@ember/test-helpers';
import { InvocationStrategy, AuditFunction } from './types';
import type { InvocationStrategy, AuditFunction } from './types';
import { getRunOptions } from './run-options';
import a11yAudit from './audit';
import { shouldForceAudit } from './should-force-audit';
Expand Down
2 changes: 1 addition & 1 deletion addon-test-support/setup-middleware-reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
getContext,
getTestMetadata,
} from '@ember/test-helpers';
import { AxeResults, Result } from 'axe-core';
import type { AxeResults, Result } from 'axe-core';
import { setCustomReporter } from './reporter';
import { DEBUG } from '@glimmer/env';
import { setEnableA11yAudit } from './should-force-audit';
Expand Down
Loading