How to use the cspell-lib.ExclusionHelper function in cspell-lib

To help you get started, we’ve selected a few cspell-lib 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 streetsidesoftware / vscode-spell-checker / packages / _server / src / documentSettings.ts View on Github external
private async fetchSettingsFromVSCode(uri?: string): Promise {
        const configs = await this.fetchVSCodeConfiguration(uri || '');
        const [ cSpell, search ] = configs;
        const { exclude = {} } = search;
        const { ignorePaths = [] } = cSpell;
        const cSpellConfigSettings: CSpellUserSettings = {
            ...cSpell,
            id: 'VSCode-Config',
            ignorePaths: ignorePaths.concat(CSpell.ExclusionHelper.extractGlobsFromExcludeFilesGlobMap(exclude)),
        };
        return cSpellConfigSettings;
    }