Skip to content

Commit 9447804

Browse files
committed
refactor(await-async-query): use custom rule creator
1 parent 79973d5 commit 9447804

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/rules/await-async-query.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import {
2-
ESLintUtils,
32
TSESTree,
43
ASTUtils,
54
} from '@typescript-eslint/experimental-utils';
6-
import { getDocsUrl, LIBRARY_MODULES } from '../utils';
5+
import { LIBRARY_MODULES } from '../utils';
76
import {
7+
getVariableReferences,
8+
isAwaited,
89
isCallExpression,
910
isMemberExpression,
10-
isAwaited,
1111
isPromiseResolved,
12-
getVariableReferences,
1312
} from '../node-utils';
1413
import { ReportDescriptor } from '@typescript-eslint/experimental-utils/dist/ts-eslint';
14+
import { createTestingLibraryRule } from '../create-testing-library-rule';
1515

1616
export const RULE_NAME = 'await-async-query';
1717
export type MessageIds = 'awaitAsyncQuery';
@@ -40,7 +40,7 @@ function hasClosestExpectResolvesRejects(node: TSESTree.Node): boolean {
4040
}
4141
}
4242

43-
export default ESLintUtils.RuleCreator(getDocsUrl)<Options, MessageIds>({
43+
export default createTestingLibraryRule<Options, MessageIds>({
4444
name: RULE_NAME,
4545
meta: {
4646
type: 'problem',

0 commit comments

Comments
 (0)