finn-no / eslint-config-finn

ESLint config for Finn.no
2 stars 3 forks source link

max-params #25

Closed gregersrygg closed 8 years ago

gregersrygg commented 8 years ago

Limit Maximum Number of Parameters http://eslint.org/docs/rules/max-params options: 5

SimenB commented 8 years ago

Why is this needed?

gregersrygg commented 8 years ago

I find it hard to position arguments when a function has that many arguments. Especially when many of them are optional. Objects are easier to read when many args in my opinion, and with destructuring it's super-sweet imo...

// bad someFunc(null, null, null, true);

// good someFunc({ isAwesome: true });

SimenB commented 8 years ago

Ah yes, good point. At least with destructuring it makes sense 😄