Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

forbid-component-props: How to distinguish a component from a library? #2766

Closed
mnn opened this issue Aug 24, 2020 · 1 comment · Fixed by #2767
Closed

forbid-component-props: How to distinguish a component from a library? #2766

mnn opened this issue Aug 24, 2020 · 1 comment · Fixed by #2767

Comments

@mnn
Copy link

mnn commented Aug 24, 2020

Situation:

import {Layout as AntdLayout} from 'antd';
...
            <AntdLayout.Content className={contentClassNames}>
...

Adding AntdLayout nor AntdLayout.Content into allowedFor isn't working. I don't want to add Content, because then linter won't report an error when our Content component is used with className.

Edit: I have attempted to improve it in #2767.

@ljharb
Copy link
Member

ljharb commented Aug 26, 2020

I would expect AntdLayout.Content to work; this seems like an omission.

ljharb pushed a commit to mnn/eslint-plugin-react that referenced this issue Aug 30, 2020
@ljharb ljharb closed this as completed in d6ee945 Aug 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants