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 6c7702a commit ef08e4cCopy full SHA for ef08e4c
internal/plugins/react-hooks/rules/rules_of_hooks/rules_of_hooks.go
@@ -1 +1,19 @@
1
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