Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
[New]no-unused-state
: Support ignore option#3881
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Sorry this fell through the cracks. Can you elaborate a bit more on the problem this will solve? |
fwgood commentedJun 28, 2025 • edited by ljharb
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by ljharb
Uh oh!
There was an error while loading.Please reload this page.
@ljharb I'm very glad that you can reopen this PR. In some React frameworks that use JSX, certain specific states are defined for internal rendering purposes (such as marking rendering stages, measuring performance, etc.). There is a similar usage pattern where the state is not consumed by the developers but is consumed by the framework internally. In this case, an ignore rule is needed (the usage of links uses hooks, which is different from class-based states, but the principle is similar).https://lynxjs.org/guide/performance/evaluating-performance.html |
I'm not familiar with Lynx but this is eslint-plugin-react - it's intended for use with a react codebase, not any jsx codebase. Unfortunately that link doesn't explain the use case to me - but it doesn't make sense to me that you'd declare state that you don't personally set - if the framework is assigning state, it should be declaring it. |
This is adding a new property
ignore
to ignore specific state.