Rules
no-context-provider
Full Name in eslint-plugin-react-x
Full Name in @eslint-react/eslint-plugin
Features
🔍
🔄
Presets
core
recommended
recommended-typescript
recommended-type-checked
What it does
Disallows using <Context.Provider>
.
In React 19, you can render <Context>
as a provider instead of <Context.Provider>
.
A safe codemod is available for this rule.
Examples
Failing
Passing
Implementation
Further Reading
See Also
no-forward-ref
Disallows usingReact.forwardRef
.no-use-context
Disallows usingReact.useContext
.