Background
The current purity rule relies on explicit IMPURE_FUNCS / IMPURE_CTORS deny-lists, while React Compiler infers impurity automatically via effect inference. This can lead to false negatives for built-ins not yet catalogued.
Examples of potentially missing built-ins
performance.now() (mentioned in the SPEC as a built-in inferred with Impure effect)
- Other environment-specific impure APIs not yet catalogued
Expected behavior
Systematically audit and add common impure built-in functions / constructors to the catalog.
References
- Diff report:
plugins/eslint-plugin-react-x/src/rules/purity/purity.spec.diff.md (§4)
- Related files: catalog definitions in the rule implementation / shared constants
Priority
P1 — low implementation cost (list maintenance), steadily improves coverage.
Background
The current
purityrule relies on explicitIMPURE_FUNCS/IMPURE_CTORSdeny-lists, while React Compiler infers impurity automatically via effect inference. This can lead to false negatives for built-ins not yet catalogued.Examples of potentially missing built-ins
performance.now()(mentioned in the SPEC as a built-in inferred withImpureeffect)Expected behavior
Systematically audit and add common impure built-in functions / constructors to the catalog.
References
plugins/eslint-plugin-react-x/src/rules/purity/purity.spec.diff.md(§4)Priority
P1 — low implementation cost (list maintenance), steadily improves coverage.