hasIntegration checks whether an integration has already been added to the Astro config. For example:
Relative position check
Sometimes two integrations must be installed in an specific order to work together correctly.
For that use-case, this utility accepts optional position and relativeTo parameters to check for the presence of one integration in relation to another.
Checking for the presence of an integration in relation to an uninstalled integration will result in an error.