Skip to content

Dont-Reassign-Parameters

Documentation Index

Fetch the complete documentation index at: https://docs.sourcery.ai/llms.txt

Use this file to discover all available pages before exploring further.

Sourcery rule id: dont-reassign-parameters

Section titled “Sourcery rule id: dont-reassign-parameters”

Don’t reassign parameter - ${param}

function foo(name, options, arguments) {
name = 1;
}

Reassigning parameters can lead to unexpected behavior, especially when accessing the arguments object. It can also cause optimization issues, especially in V8.

From the Airbnb JavaScript Style Guide