sbdchd / eslint-plugin-cake

:cake: Sweet rules for ESLint
MIT License
1 stars 0 forks source link

Prefer argument unpacking #3

Open sbdchd opened 3 years ago

sbdchd commented 3 years ago
// err
function foo(params) {
  const { a, b, c } = params
  // ...
}

// ok
function foo({ a, b, c }) {
  // ...
}
function foo(params) {
  const { a, b, c } = params
  // ...
  params.foo
}