Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var EqeqeqRule = rule.Rule{ Name: "eqeqeq", Run: func(ctx rule.RuleContext, options any) rule.RuleListeners { opts := parseOptions(options) return rule.RuleListeners{ ast.KindBinaryExpression: func(node *ast.Node) { binary := node.AsBinaryExpression() if binary == nil || binary.OperatorToken == nil { return } opKind := binary.OperatorToken.Kind left := binary.Left right := binary.Right if left == nil || right == nil { return } switch opts.mode { case "always": handleAlwaysMode(ctx, binary, opKind, left, right, opts.nullOption) case "smart": handleSmartMode(ctx, binary, opKind, left, right) } }, } }, }
EqeqeqRule requires use of === and !==. https://eslint.org/docs/latest/rules/eqeqeq
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.