Skip to main content

Class: abstract CSpellConfigFile

Defined in: packages/cspell-config-lib/dist/CSpellConfigFile.d.ts:30

Implements

Constructors

Constructor

new CSpellConfigFile(url): CSpellConfigFile

Defined in: packages/cspell-config-lib/dist/CSpellConfigFile.d.ts:32

Parameters

url

URL

Returns

CSpellConfigFile

Properties

settings

abstract readonly settings: 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

readonly url: 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

Indicate that the config file is readonly.

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

Indicate that the config file is remote and not associated with a file on disk.

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

Indicate that the config file is virtual and not associated with a file on disk.

Implementation of

ICSpellConfigFile.virtual

Methods

addWords()

abstract addWords(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()

abstract removeAllComments(): 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()

abstract setComment(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()

abstract setSchema(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()

abstract setValue<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

CSpellSettings[K]

Returns

this