Skip to content

Dont-Reassign-Parameters

Sourcery rule id: dont-reassign-parameters

Description

Don't reassign parameter - ${param}

Match

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

Explanation

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