1- import type { _ } from "@eslint-react/eff" ;
1+ import type { unit } from "@eslint-react/eff" ;
22import type { RuleContext } from "@eslint-react/kit" ;
33import type { TSESTree } from "@typescript-eslint/types" ;
44import * as AST from "@eslint-react/ast" ;
@@ -9,7 +9,7 @@ import { AST_NODE_TYPES as T } from "@typescript-eslint/types";
99import { isInitializedFromReact } from "../utils" ;
1010import { isReactHookName } from "./hook-name" ;
1111
12- export function isReactHook ( node : AST . TSESTreeFunction | _ ) {
12+ export function isReactHook ( node : AST . TSESTreeFunction | unit ) {
1313 if ( node == null ) return false ;
1414 const id = AST . getFunctionId ( node ) ;
1515 return id ?. name != null && isReactHookName ( id . name ) ;
@@ -20,7 +20,7 @@ export function isReactHook(node: AST.TSESTreeFunction | _) {
2020 * @param node The node to check.
2121 * @returns `true` if the node is a React Hook call, `false` otherwise.
2222 */
23- export function isReactHookCall ( node : TSESTree . Node | _ ) {
23+ export function isReactHookCall ( node : TSESTree . Node | unit ) {
2424 if ( node == null ) return false ;
2525 if ( node . type !== T . CallExpression ) {
2626 return false ;
@@ -35,7 +35,7 @@ export function isReactHookCall(node: TSESTree.Node | _) {
3535}
3636
3737/* eslint-disable function/function-return-boolean */
38- export function isReactHookCallWithName ( context : RuleContext , node : TSESTree . Node | _ ) {
38+ export function isReactHookCallWithName ( context : RuleContext , node : TSESTree . Node | unit ) {
3939 if ( node == null || node . type !== T . CallExpression ) return constFalse ;
4040 const {
4141 importSource = DEFAULT_ESLINT_REACT_SETTINGS . importSource ,
@@ -58,7 +58,7 @@ export function isReactHookCallWithName(context: RuleContext, node: TSESTree.Nod
5858 } ;
5959}
6060
61- export function isReactHookCallWithNameLoose ( node : TSESTree . Node | _ ) {
61+ export function isReactHookCallWithNameLoose ( node : TSESTree . Node | unit ) {
6262 if ( node == null || node . type !== T . CallExpression ) return constFalse ;
6363 return ( name : string ) => {
6464 switch ( node . callee . type ) {
@@ -72,7 +72,7 @@ export function isReactHookCallWithNameLoose(node: TSESTree.Node | _) {
7272 } ;
7373}
7474
75- export function isReactHookCallWithNameAlias ( context : RuleContext , name : string , alias : _ | string [ ] = [ ] ) {
75+ export function isReactHookCallWithNameAlias ( context : RuleContext , name : string , alias : unit | string [ ] = [ ] ) {
7676 const {
7777 importSource = DEFAULT_ESLINT_REACT_SETTINGS . importSource ,
7878 skipImportCheck = true ,
@@ -95,7 +95,7 @@ export function isReactHookCallWithNameAlias(context: RuleContext, name: string,
9595}
9696/* eslint-enable function/function-return-boolean */
9797
98- export function isUseEffectCallLoose ( node : TSESTree . Node | _ ) {
98+ export function isUseEffectCallLoose ( node : TSESTree . Node | unit ) {
9999 if ( node == null ) return false ;
100100 if ( node . type !== T . CallExpression ) {
101101 return false ;
0 commit comments