Function: readSettings()
Call Signature
readSettings(
filename):Promise<CSpellSettingsInternal>
Defined in: packages/cspell-lib/src/lib/Settings/Controller/configLoader/readSettings.ts:13
Read / import a cspell configuration file.
Parameters
filename
the path to the file. Supported types: json, yaml, js, and cjs. ES Modules are not supported.
- absolute path
/absolute/path/to/file - relative path
./path/to/file(relative to the current working directory) - package
@cspell/dict-typescript/cspell-ext.json
string | URL
Returns
Promise<CSpellSettingsInternal>
Call Signature
readSettings(
filename,pnpSettings):Promise<CSpellSettingsInternal>
Defined in: packages/cspell-lib/src/lib/Settings/Controller/configLoader/readSettings.ts:14
Read / import a cspell configuration file.
Parameters
filename
the path to the file. Supported types: json, yaml, js, and cjs. ES Modules are not supported.
- absolute path
/absolute/path/to/file - relative path
./path/to/file(relative to the current working directory) - package
@cspell/dict-typescript/cspell-ext.json
string | URL
pnpSettings
PnPSettingsOptional
Returns
Promise<CSpellSettingsInternal>
Call Signature
readSettings(
filename,relativeTo):Promise<CSpellSettingsInternal>
Defined in: packages/cspell-lib/src/lib/Settings/Controller/configLoader/readSettings.ts:24
Read / import a cspell configuration file.
Parameters
filename
the path to the file. Supported types: json, yaml, js, and cjs. ES Modules are not supported.
- absolute path
/absolute/path/to/file - relative path
./path/to/file(relative torelativeTo) - package
@cspell/dict-typescript/cspell-ext.jsonsearches for node_modules relative torelativeTo
string | URL
relativeTo
absolute path to start searching for relative files or node_modules.
string | URL
Returns
Promise<CSpellSettingsInternal>
Call Signature
readSettings(
filename,relativeTo,pnpSettings):Promise<CSpellSettingsInternal>
Defined in: packages/cspell-lib/src/lib/Settings/Controller/configLoader/readSettings.ts:25
Read / import a cspell configuration file.
Parameters
filename
the path to the file. Supported types: json, yaml, js, and cjs. ES Modules are not supported.
- absolute path
/absolute/path/to/file - relative path
./path/to/file(relative to the current working directory) - package
@cspell/dict-typescript/cspell-ext.json
string | URL
relativeTo
string | URL
pnpSettings
PnPSettingsOptional
Returns
Promise<CSpellSettingsInternal>