I would recommend including at minimum a roadmap, either a separate doc or in ReadMe, outlining any expected direction the project is/will/should take and what is in scope or out of scope. That sort of a thing, especially with examples of scope, will likely grow over time based on such occurrences, but can help stave off further headaches.
In the event of a PR with a lot of work and just not aligning with the project's direction, thank them for their work. Then let them know what it would take for the PR to be accepted. They're trying to help, quite possibly on a project they care about, but are just going a different direction. If it's too different, there's a reason forks occur in open source.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I would recommend including at minimum a roadmap, either a separate doc or in ReadMe, outlining any expected direction the project is/will/should take and what is in scope or out of scope. That sort of a thing, especially with examples of scope, will likely grow over time based on such occurrences, but can help stave off further headaches.
In the event of a PR with a lot of work and just not aligning with the project's direction, thank them for their work. Then let them know what it would take for the PR to be accepted. They're trying to help, quite possibly on a project they care about, but are just going a different direction. If it's too different, there's a reason forks occur in open source.