no_param_reassign

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoParamReassignRule = rule.Rule{
	Name: "no-param-reassign",
	Run: func(ctx rule.RuleContext, options any) rule.RuleListeners {
		opts := parseOptions(options)
		handler := func(node *ast.Node) {
			checkFunction(node, opts, ctx)
		}

		return rule.RuleListeners{
			ast.KindFunctionDeclaration: handler,
			ast.KindFunctionExpression:  handler,
			ast.KindArrowFunction:       handler,
			ast.KindMethodDeclaration:   handler,
			ast.KindConstructor:         handler,
			ast.KindGetAccessor:         handler,
			ast.KindSetAccessor:         handler,
		}
	},
}

Functions

This section is empty.

Types

type Options

type Options struct {
	Props                               bool
	IgnorePropertyModificationsFor      []string
	IgnorePropertyModificationsForRegex []*regexp.Regexp
}

Jump to

Keyboard shortcuts

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