File tree 2 files changed +8
-9
lines changed
2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change
1
+ import { ASTUtils , TSESTree } from '@typescript-eslint/experimental-utils' ;
2
+ import { ALL_QUERIES_COMBINATIONS } from '../utils' ;
1
3
import {
2
- ESLintUtils ,
3
- TSESTree ,
4
- ASTUtils ,
5
- } from '@typescript-eslint/experimental-utils' ;
6
- import { getDocsUrl , ALL_QUERIES_COMBINATIONS } from '../utils' ;
7
- import {
4
+ isCallExpression ,
8
5
isMemberExpression ,
6
+ isObjectExpression ,
9
7
isObjectPattern ,
10
- isCallExpression ,
11
8
isProperty ,
12
- isObjectExpression ,
13
9
} from '../node-utils' ;
10
+ import { createTestingLibraryRule } from '../create-testing-library-rule' ;
14
11
15
12
export const RULE_NAME = 'prefer-screen-queries' ;
16
13
export type MessageIds = 'preferScreenQueries' ;
@@ -35,7 +32,7 @@ function usesContainerOrBaseElement(node: TSESTree.CallExpression) {
35
32
) ;
36
33
}
37
34
38
- export default ESLintUtils . RuleCreator ( getDocsUrl ) < Options , MessageIds > ( {
35
+ export default createTestingLibraryRule < Options , MessageIds > ( {
39
36
name : RULE_NAME ,
40
37
meta : {
41
38
type : 'suggestion' ,
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ import { ALL_QUERIES_COMBINATIONS } from '../../../lib/utils';
4
4
5
5
const ruleTester = createRuleTester ( ) ;
6
6
7
+ // TODO: include custom queries in test cases
8
+
7
9
ruleTester . run ( RULE_NAME , rule , {
8
10
valid : [
9
11
{
You can’t perform that action at this time.
0 commit comments