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

✨ feat(app): introduce allowList for custom components #73

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

huynhducduy
Copy link
Contributor

@@ -53,6 +53,21 @@ With this configuration, the "style" attribute is ignored for native elements fo
}
```

As of v3.4.0, each eslint-plugin-react-perf rule supports configuration to control whether custom component's props are ignored.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remember to change the version (v3.4.0) to your desired one

const { nativeAllowList } = options[0] || {};
const { nativeAllowList, allowList } = options[0] || {};

const allowListSet = new Set();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const allowListSet = new Set(allowList || []);

@cvazac
Copy link
Owner

cvazac commented Jan 8, 2025

Thanks for working on this @huynhducduy, this is a really great addition. If/when we support allowing component by name, we can name that param allowComponentList or something better to distinguish from allowList (which refers to prop names).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add an allowList like nativeAllowList that allows all custom nodes to have allowed exceptions.
2 participants