Next.js Discord

Discord Forum

Is there an ESLint rule for importing server components into client components?

Answered
Scaly-naped Pigeon posted this in #help-forum
Open in Discord
Scaly-naped PigeonOP
I want to throw error when I import ServerComponent in the ClientComponent
Answered by "use php"
You might need to create a eslint rule for that, if eslint-config-next doesn't have that
View full answer

12 Replies

@Scaly-naped Pigeon I want to throw error when I import ServerComponent in the ClientComponent
But why do you want to do that?

You might need to create a custom rule
Scaly-naped PigeonOP
about this
I want to throw ESlint error in this case
@Scaly-naped Pigeon about this
can you send a link to this uri
@Scaly-naped Pigeon about this
You might need to create a eslint rule for that, if eslint-config-next doesn't have that
Answer
Scaly-naped PigeonOP
Thankyou!
I'll try that
@"use php" You might need to create a eslint rule for that, if `eslint-config-next` doesn't have that
Hey, just wanted to let you know that when someone asks you to mark solution, you need to mark the solution which solved your query
You can follow this next time.
Scaly-naped PigeonOP
sorry, I understood