How to use @fimbul/wotan - 2 common examples

To help you get started, we’ve selected a few @fimbul/wotan examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fimbullinter / wotan / packages / valtyr / src / configuration-provider.ts View on Github external
return this.baseConfig;
        if (!this.options.valtyr)
            return this.baseConfig = [];
        try {
            const fullPath = path.join(this.directories.getCurrentDirectory(), '.fimbullinter.yaml');
            const configProvider = new DefaultConfigurationProvider(this.fs, this.resolver, this.builtinResolver, this.cacheFactory);
            const config = configProvider.parse(this.options.valtyr, fullPath, {
                stack: [],
                load() {
                    throw new Error('Global configuration is not allowed to extend other configs.');
                },
            });
            validateGlobalConfig(config);
            return this.baseConfig = [config];
        } catch (e) {
            throw new ConfigurationError(`Error parsing global configuration for 'valtyr': ${e.message}`);
        }
    }
}
github fimbullinter / wotan / packages / valtyr / src / configuration-provider.ts View on Github external
private getBaseConfiguration() {
        if (this.baseConfig !== undefined)
            return this.baseConfig;
        if (!this.options.valtyr)
            return this.baseConfig = [];
        try {
            const fullPath = path.join(this.directories.getCurrentDirectory(), '.fimbullinter.yaml');
            const configProvider = new DefaultConfigurationProvider(this.fs, this.resolver, this.builtinResolver, this.cacheFactory);
            const config = configProvider.parse(this.options.valtyr, fullPath, {
                stack: [],
                load() {
                    throw new Error('Global configuration is not allowed to extend other configs.');
                },
            });
            validateGlobalConfig(config);
            return this.baseConfig = [config];
        } catch (e) {
            throw new ConfigurationError(`Error parsing global configuration for 'valtyr': ${e.message}`);
        }
    }
}

@fimbul/wotan

Pluggable TypeScript and JavaScript linter

Apache-2.0
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis