I have the following component that triggers a no-shadow
ESlint error on the FilterButton
props
.
A fifth option:
eslintrc
rules.module.exports = {
rules: {
'no-shadow': [
'error',
{
allow: ['setFilter'],
},
],
}
}
Why?
You don't want variable shadowing but can't get around it in certain cases.
Why Not?
You really don't want variable shadowing in your code base.