We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5fc7eec commit 5296201Copy full SHA for 5296201
src/commands/reverse-if-else.ts
@@ -1,5 +1,5 @@
1
+import type { AST_NODE_TYPES } from '@typescript-eslint/utils'
2
import type { Command } from '../types'
-import { AST_NODE_TYPES } from '@typescript-eslint/utils'
3
4
export const reverseIfElse: Command = {
5
name: 'reverse-if-else',
@@ -12,7 +12,7 @@ export const reverseIfElse: Command = {
12
13
const elseNode = node.alternate
14
15
- const isElseif = elseNode?.type === AST_NODE_TYPES.IfStatement
+ const isElseif = elseNode?.type === ('IfStatement' as AST_NODE_TYPES.IfStatement)
16
if (isElseif)
17
return ctx.reportError('Unable reverse when `else if` statement exist')
18
0 commit comments