-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wordpress source normaliser plugin extension #3783
Conversation
Deploy preview for gatsbygram ready! Built with commit 9caafa7 |
Deploy preview for gatsbygram ready! Built with commit be7c293 |
* @return {Array} | ||
*/ | ||
getNormalizers() { | ||
return _.concat( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Array.concat()
instead of lodash eliminates the need for extra dependency call in this file.
Looks great! Curious why the need for explicit prioritization? Not my favorite way of doing things — ideally each normalization is completely independent of other normalizations so the order is irrelevant. |
If order matters, this often leads to confusing bugs. |
I am not particularly fond of it myself tbh, only way I could think of doing it so a consuming plugin could be run before or after a certain built in normaliser. Might be worth scraping the priority system if it's too bug prone? |
Maybe instead, there's a normalizer / WP entity and then in the options, you can override the core normalizer? Or follow it? |
Hey, would love a PR adding a simpler normalizer setup but going to close this for now. |
This pull request references #3450