@exodus/eslint-plugin-basic-utils
v2.0.0
Published
Eslint plugin for enforcing correct usage of basic-utils
Downloads
5,996
Readme
@exodus/eslint-plugin-basic-utils
Usage
// .eslintrc.js
{
// ...
plugins: ['@exodus/eslint-plugin-basic-utils'],
rules: {
'basic-utils/invalid-args-pick-omit': 'error',
}
}
Rules
invalid-args-pick-omit
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)