Abstract Interface: CSpellConfigFile
Defined in: packages/cspell-config-lib/dist/CSpellConfigFile.d.ts:30
Implements
Properties
settings
abstractreadonlysettings:CSpellSettings
Defined in: packages/cspell-config-lib/dist/CSpellConfigFile.d.ts:38
The settings from the config file. Note: this is a copy of the settings from the config file. It should be treated as immutable. For performance reasons, it might not be frozen.
Implementation of
ICSpellConfigFile.settings
url
readonlyurl:URL
Defined in: packages/cspell-config-lib/dist/CSpellConfigFile.d.ts:31
The url of the config file, used to resolve imports.
Implementation of
ICSpellConfigFile.url
Accessors
readonly
Get Signature
get readonly():
boolean
Defined in: packages/cspell-config-lib/dist/CSpellConfigFile.d.ts:63
Indicate that the config file is readonly.
Returns
boolean
Implementation of
ICSpellConfigFile.readonly
remote
Get Signature
get remote():
boolean
Defined in: packages/cspell-config-lib/dist/CSpellConfigFile.d.ts:65
Indicate that the config file is remote and not associated with a file on disk.
Returns
boolean
Implementation of
ICSpellConfigFile.remote
virtual
Get Signature
get virtual():
boolean
Defined in: packages/cspell-config-lib/dist/CSpellConfigFile.d.ts:64
Indicate that the config file is virtual and not associated with a file on disk.
Returns
boolean
Implementation of
ICSpellConfigFile.virtual
Methods
addWords()
abstractaddWords(words):this
Defined in: packages/cspell-config-lib/dist/CSpellConfigFile.d.ts:43
Helper function to add words to the config file.
Parameters
words
string[]
words to add to the config file.
Returns
this
removeAllComments()
abstractremoveAllComments():this
Defined in: packages/cspell-config-lib/dist/CSpellConfigFile.d.ts:49
Tell the config file to remove all comments. This is useful when the config file is being serialized and comments are not needed.
Returns
this
this - the config file.
setComment()
abstractsetComment(key,comment,inline?):this
Defined in: packages/cspell-config-lib/dist/CSpellConfigFile.d.ts:62
Parameters
key
keyof CSpellSettings
the field to set the comment for.
comment
string
the comment to set.
inline?
boolean
if true, the comment will be set as an inline comment.
Returns
this
setSchema()
abstractsetSchema(schema):this
Defined in: packages/cspell-config-lib/dist/CSpellConfigFile.d.ts:54
Configure the jason.schema for the config file.
Parameters
schema
string
The schema to set for the config file.
Returns
this
setValue()
abstractsetValue<K>(key,value):this
Defined in: packages/cspell-config-lib/dist/CSpellConfigFile.d.ts:55
Type Parameters
K
K extends keyof CSpellSettings
Parameters
key
K
value
Returns
this