eslint-plugin-unicorn
eslint-plugin-unicorn copied to clipboard
`prefer-at`: ignore `arguments[arguments.length - 1]`
Description
When using arguments throughout the code, it is sometimes not easy to change those to use the spread notation.
It would be great to have an option to deactivate any arguments detection for this rule.
Examples
// ❌ Without the options this is marked as error
const cb = arguments[arguments.length - 1]
// ✅ With { acceptArguments: true } option, this is not marked as error
const cb = arguments[arguments.length - 1]
Additional Info
No response
We can ignore arguments, no need an option.
That would also work and might be best, since the prefer-rest arguments would just have to be activated to get to an array and afterwards this rule would apply.