-
-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Labels
Status: ReleasedThe issue has been releasedThe issue has been releasedType: BugSomething isn't workingSomething isn't working
Description
👋 @Rel1cx!
Describe the bug
react-x/no-context-provider tiggers on symbols named Provider which are imported from third-party libs.
Reproduction
Example:
import { Provider } from "jotai";
function Component() {
return <Provider>hello world</Provider>;
}ESLint output:
In React 19, you can render '<Context>' as a provider instead of '<Context.Provider>'.
eslint@eslint-react/no-context-provider
Expected behavior
No error
Platform and versions
@eslint-react/[email protected]
Additional context
Likely cased by #985. The above code snippet works without errors in 1.32.0.
Changing code like this mitigates the error:
import { Provider as JotaiProvider } from "jotai";
function Component() {
return <JotaiProvider>hello world</JotaiProvider>;
}Metadata
Metadata
Assignees
Labels
Status: ReleasedThe issue has been releasedThe issue has been releasedType: BugSomething isn't workingSomething isn't working