getify / eslint-plugin-proper-arrows

ESLint rules to ensure proper arrow function definitions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add rule to forbid unused parameters

getify opened this issue · comments

Some people like to define arrows like this:

x => 1;
x => {};
x => void 0;

Those forms are all generally to avoid the () => ... But since this can be confusing to a reader to see a parameter listed that isn't used, this rule would forbid that.

It would also catch straight-up mistakes like:

(x,y,z) => x + y;   // z is unused here

This is similar to the built-in "no-unused-vars" rule, but is much narrower in focus: only for arrow functions.