Commit ba4b8df 1 parent 25c0179 commit ba4b8df Copy full SHA for ba4b8df
File tree 2 files changed +8
-8
lines changed
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,13 @@ export default createRule({
24
24
CallExpression ( node ) {
25
25
const scope = context . getScope ( ) ;
26
26
27
- const parsed = parseJestFnCall ( node , scope ) ;
27
+ const jestFnCall = parseJestFnCall ( node , scope ) ;
28
28
29
- if ( parsed ?. type !== 'test' && parsed ?. type !== 'describe' ) {
29
+ if ( jestFnCall ?. type !== 'test' && jestFnCall ?. type !== 'describe' ) {
30
30
return ;
31
31
}
32
32
33
- if ( parsed . name . startsWith ( 'f' ) ) {
33
+ if ( jestFnCall . name . startsWith ( 'f' ) ) {
34
34
context . report ( {
35
35
messageId : 'focusedTest' ,
36
36
node,
@@ -40,8 +40,8 @@ export default createRule({
40
40
fix ( fixer ) {
41
41
// don't apply the fixer if we're an aliased import
42
42
if (
43
- parsed . head . type === 'import' &&
44
- parsed . name !== parsed . head . local
43
+ jestFnCall . head . type === 'import' &&
44
+ jestFnCall . name !== jestFnCall . head . local
45
45
) {
46
46
return null ;
47
47
}
@@ -55,7 +55,7 @@ export default createRule({
55
55
return ;
56
56
}
57
57
58
- const onlyNode = parsed . members . find (
58
+ const onlyNode = jestFnCall . members . find (
59
59
s => getAccessorValue ( s ) === 'only' ,
60
60
) ;
61
61
Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ export const isTypeOfJestFnCall = (
16
16
scope : TSESLint . Scope . Scope ,
17
17
types : JestFnType [ ] ,
18
18
) : boolean => {
19
- const parsed = parseJestFnCall ( node , scope ) ;
19
+ const jestFnCall = parseJestFnCall ( node , scope ) ;
20
20
21
- return parsed !== null && types . includes ( parsed . type ) ;
21
+ return jestFnCall !== null && types . includes ( jestFnCall . type ) ;
22
22
} ;
23
23
24
24
export function getNodeChain ( node : TSESTree . Node ) : AccessorNode [ ] {
You can’t perform that action at this time.
0 commit comments