Extend jsx-jcs-no-undef to work with <With />
martinmacko47 opened this issue · 5 comments
We have just added <With />
statement to jsx-control-statements. We need to extend jsx-jcs-no-undef
rule to work with variables declared by the new statement. I'll create a PR for it.
Usage of the With
statement:
<For each="item" of={this.props.items}>
<With value={computeValue(item)}>
<Choose>
<When condition={item.path}>
<Link to={item.path}>{value}</Link>
</When>
<Otherwise>
{value}
</Otherwise>
</Choose>
</With>
</For>
I've approved it. But the build is failing.
Also I'm looking for maintainers.
I'll try to fix CI errors. But they seem to be happening before the PR as well.
As for maintaining, I'm not sure I understand eslint-plugin-jsx-control-statements
nor jsx-control-statements
good enough to be able to maintain it.
@vkbansal I've fixed CI errors, but they were definitelly independent of with
control statements changes. So I put the test fix into a separate commit.
If you are ok with the changes, please merge the change a release a new version of the package to npm. Thanks
done