// .eslintrc.js
{
// ...
plugins: ['@exodus/eslint-plugin-basic-utils'],
rules: {
'basic-utils/invalid-args-pick-omit': 'error',
}
}
pick
and omit
need an array as second argument. This rule reports if this is not the case.
// Bad
pick(obj, 'key')
omit(obj, 'key')
// Good
pick(obj, ['key'])
pick(obj, keys)
omit(obj, ['key'])
omit(obj, keys)