Skip to content

Commit ef08e4c

Browse files
committed
t2
1 parent 6c7702a commit ef08e4c

File tree

2 files changed

+530
-2
lines changed

2 files changed

+530
-2
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,19 @@
11
package rules_of_hooks
2+
3+
import (
4+
"github.com/microsoft/typescript-go/shim/ast"
5+
"github.com/web-infra-dev/rslint/internal/plugins/import/utils"
6+
"github.com/web-infra-dev/rslint/internal/rule"
7+
)
8+
9+
var RulesOfHooksRule = rule.Rule{
10+
Name: "react-hooks/rules-of-hooks",
11+
Run: func(ctx rule.RuleContext, options any) rule.RuleListeners {
12+
return utils.VisitModules(func(source, node *ast.Node) {
13+
14+
}, utils.VisitModulesOptions{
15+
Commonjs: true,
16+
ESModule: true,
17+
})
18+
},
19+
}

0 commit comments

Comments
 (0)