Skip to main content

Interface: DocumentValidatorOptions

Defined in: packages/cspell-lib/src/lib/textValidation/docValidator.ts:68

Extends​

  • ValidateDocumentOptions

Properties​

configFile?​

optional configFile?: string

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

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

Inherited from​

ValidateDocumentOptions.configFile


forceCheck?​

optional forceCheck?: boolean

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

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

Inherited from​

ValidateDocumentOptions.forceCheck


generateSuggestions?​

optional generateSuggestions?: boolean

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

Generate suggestions where there are spelling issues.

Inherited from​

ValidateDocumentOptions.generateSuggestions


noConfigSearch?​

optional noConfigSearch?: boolean

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

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

Inherited from​

ValidateDocumentOptions.noConfigSearch


numSuggestions?​

optional numSuggestions?: number

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

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

Inherited from​

ValidateDocumentOptions.numSuggestions


recordCheckedRanges?​

optional recordCheckedRanges?: boolean

Defined in: packages/cspell-lib/src/lib/textValidation/docValidator.ts:78

If true, the ranges of text that have been checked will be recorded and available for later using the getCheckedRanges method.


resolveImportsRelativeTo?​

optional resolveImportsRelativeTo?: string | URL

Defined in: packages/cspell-lib/src/lib/textValidation/docValidator.ts:73

If settings: CSpellUserSettings contains imports, they will be resolved using this path. If not set, the current working directory will be used.


skipValidation?​

optional skipValidation?: boolean

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

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

Inherited from​

ValidateDocumentOptions.skipValidation


stopConfigSearchAt?​

optional stopConfigSearchAt?: readonly (URL | StopAtLocation)[]

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

Directories where the search for the document's configuration file stops.

The search starts in the document's directory and moves up one directory at a time, up to the file system root. It stops sooner at the first stop directory it reaches:

  • A URL, or a StopAtLocation without exclusive, is inclusive: a configuration file in that directory is still found.
  • A StopAtLocation with exclusive: true stops without looking in that directory.

A URL that doesn't end in / is taken as a file, and the search stops at its directory.

It has no effect when configFile is set, or when noConfigSearch disables the search.

Inherited from​

ValidateDocumentOptions.stopConfigSearchAt


validateDirectives?​

optional validateDirectives?: boolean

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

Verify that the in-document directives are correct.

Inherited from​

ValidateDocumentOptions.validateDirectives