-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Closed
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLintruleRelates to ESLint's core rulesRelates to ESLint's core rules
Description
ESLint version: 2.8.0
What parser are you using?
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"ecmaFeatures": {"jsx": true},
},
When linting this code:
function makeTree(rootPath, branches) {
console.assert(arguments.length === 2);
console.assert(_.isArray(rootPath));
console.assert(_.isArray(branches) && _.isArray(branches[0]));
return _.map(branches, branch => rootPath.concat(branch));
}
I get this warning:
Use the rest parameters instead of 'arguments' prefer-rest-params
I believe this to be a false positive. Imho just checking arguments.length
should be an exception to this rule (possibly configurable).
Metadata
Metadata
Assignees
Labels
acceptedThere is consensus among the team that this change meets the criteria for inclusionThere is consensus among the team that this change meets the criteria for inclusionarchived due to ageThis issue has been archived; please open a new issue for any further discussionThis issue has been archived; please open a new issue for any further discussionenhancementThis change enhances an existing feature of ESLintThis change enhances an existing feature of ESLintruleRelates to ESLint's core rulesRelates to ESLint's core rules