no_param_reassign

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoParamReassignRule = rule.Rule{
	Name:   "no-param-reassign",
	Schema: rule.NewSchema(schemaJSON),
	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 []*esregexp.RegExp
}

Jump to

Keyboard shortcuts

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