symbol_description

package
v0.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SymbolDescriptionRule = rule.Rule{
	Name: "symbol-description",
	Run: func(ctx rule.RuleContext, options any) rule.RuleListeners {
		return rule.RuleListeners{
			ast.KindCallExpression: func(node *ast.Node) {
				call := node.AsCallExpression()

				callee := ast.SkipParentheses(call.Expression)
				if callee == nil || callee.Kind != ast.KindIdentifier || callee.Text() != "Symbol" {
					return
				}
				if call.Arguments != nil && len(call.Arguments.Nodes) > 0 {
					return
				}
				if isUserBoundSymbol(ctx, callee) {
					return
				}
				ctx.ReportNode(node, rule.RuleMessage{
					Id:          "expected",
					Description: "Expected Symbol to have a description.",
				})
			},
		}
	},
}

https://eslint.org/docs/latest/rules/symbol-description

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL