Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function configPathsForRoot(workspaceRootUri?: string) {
const workspaceRoot = workspaceRootUri ? Uri.parse(workspaceRootUri).fsPath : '';
const paths = workspaceRoot ? [
path.join(workspaceRoot, '.vscode', CSpell.defaultSettingsFilename.toLowerCase()),
path.join(workspaceRoot, '.vscode', CSpell.defaultSettingsFilename),
path.join(workspaceRoot, '.' + CSpell.defaultSettingsFilename.toLowerCase()),
path.join(workspaceRoot, CSpell.defaultSettingsFilename.toLowerCase()),
path.join(workspaceRoot, CSpell.defaultSettingsFilename),
] : [];
return paths;
}
function configPathsForRoot(workspaceRootUri?: string) {
const workspaceRoot = workspaceRootUri ? Uri.parse(workspaceRootUri).fsPath : '';
const paths = workspaceRoot ? [
path.join(workspaceRoot, '.vscode', CSpell.defaultSettingsFilename.toLowerCase()),
path.join(workspaceRoot, '.vscode', CSpell.defaultSettingsFilename),
path.join(workspaceRoot, '.' + CSpell.defaultSettingsFilename.toLowerCase()),
path.join(workspaceRoot, CSpell.defaultSettingsFilename.toLowerCase()),
path.join(workspaceRoot, CSpell.defaultSettingsFilename),
] : [];
return paths;
}