Skip to main content

Interface: SpellCheckFileOptions

Defined in: packages/cspell-lib/src/lib/spellCheckFile.ts:22

Extends​

Properties​

configFile?​

optional configFile?: string

Defined in: packages/cspell-lib/src/lib/spellCheckFile.ts:27

Optional path to a configuration file. If given, it will be used instead of searching for a configuration file.


encoding?​

optional encoding?: BufferEncoding

Defined in: packages/cspell-lib/src/lib/spellCheckFile.ts:32

File encoding

Default Value​

'utf-8'

forceCheck?​

optional forceCheck?: boolean

Defined in: packages/cspell-lib/src/lib/spellCheckFile.ts:45

If true, the document will be checked even if it would normally be excluded.


generateSuggestions?​

optional generateSuggestions?: boolean

Defined in: packages/cspell-lib/src/lib/textValidation/ValidateTextOptions.ts:5

Generate suggestions where there are spelling issues.

Inherited from​

ValidateTextOptions.generateSuggestions


noConfigSearch?​

optional noConfigSearch?: boolean

Defined in: packages/cspell-lib/src/lib/spellCheckFile.ts:41

Prevents searching for local configuration files By default the spell checker looks for configuration files starting at the location of given filename. If configFile is defined it will still be loaded instead of searching. false will override the value in settings.noConfigSearch.

Default Value​

undefined

numSuggestions?​

optional numSuggestions?: number

Defined in: packages/cspell-lib/src/lib/textValidation/ValidateTextOptions.ts:10

The number of suggestions to generate. The higher the number the longer it takes.

Inherited from​

ValidateTextOptions.numSuggestions


skipValidation?​

optional skipValidation?: boolean

Defined in: packages/cspell-lib/src/lib/textValidation/ValidateTextOptions.ts:20

Skips spell checking the document. Useful for testing and dry runs. It will read the configuration and parse the document.

Inherited from​

ValidateTextOptions.skipValidation


unknownWords?​

optional unknownWords?: UnknownWordsChoices

Defined in: packages/cspell-types/dist/index.d.mts:396

Controls how unknown words are handled.

  • report-all - Report all unknown words (default behavior)
  • report-simple - Report unknown words that have simple spelling errors, typos, and flagged words.
  • report-common-typos - Report unknown words that are common typos and flagged words.
  • report-flagged - Report unknown words that are flagged.

Default​

"report-all"

Since​

9.1.0

Inherited from​

UnknownWordsConfiguration.unknownWords


validateDirectives?​

optional validateDirectives?: boolean

Defined in: packages/cspell-lib/src/lib/textValidation/ValidateTextOptions.ts:15

Verify that the in-document directives are correct.

Inherited from​

ValidateTextOptions.validateDirectives