getify / eslint-plugin-proper-arrows

ESLint rules to ensure proper arrow function definitions
MIT License
305 stars 14 forks source link

Check for null identifiers from destructured arguments #17

Closed palnes closed 5 years ago

palnes commented 5 years ago

Ref issue #16.

The following function will cause the plugin to fail, as the omitted first parameter will return null.

function something([, y]) {
  console.log(y);
}

something([1, 2]);

This fix contains an added check for null in getAllIdentifiers().