public function loadConfiguration(array $possibleConfigurationFiles = [], LinterConfiguration $configuration = null): LinterConfiguration
    {
        $configs = [$this->loader->load('typoscript-lint.dist.yml')];
        foreach ($possibleConfigurationFiles as $configurationFile) {
            $loadedConfig = $this->loader->load($configurationFile);

            // Simple mechanism to detect tslint config files ("ts" as in "TypeScript", not "Typoscript")
            // and excluding them from being loaded.
            if (isset($loadedConfig["extends"]) || isset($loadedConfig["rulesDirectory"]) || isset($loadedConfig["rules"])) {
                continue;
            }

            $configs[] = $loadedConfig;
        }

        $configuration = $configuration ?? new LinterConfiguration();

        $processedConfiguration = $this->processor->processConfiguration(
            $configuration,
            $configs
        );

        $configuration->setConfiguration($processedConfiguration);
        return $configuration;
    }