Home > harper.js > WorkerLinter

WorkerLinter class

A Linter that spins up a dedicated web worker to do processing on a separate thread. Main benefit: this Linter will not block the event loop for large documents.

NOTE: This class will not work properly in Node. In that case, just use LocalLinter.

Signature:

export declare class WorkerLinter implements Linter 

Implements: Linter

Constructors

Constructor

Modifiers

Description

(constructor)(init)

Constructs a new instance of the WorkerLinter class

Methods

Method

Modifiers

Description

applySuggestion(text, lint, suggestion)

clearIgnoredLints()

clearWords()

contextHash(source, lint)

exportIgnoredLints()

exportWords()

generateStatsFile()

getDefaultLintConfig()

getDefaultLintConfigAsJSON()

getDialect()

getLintConfig()

getLintConfigAsJSON()

getLintDescriptions()

getLintDescriptionsAsJSON()

getLintDescriptionsHTML()

getLintDescriptionsHTMLAsJSON()

ignoreLint(source, lint)

ignoreLintHash(hash)

importIgnoredLints(json)

importStatsFile(statsFile)

importWords(words)

isLikelyEnglish(text)

isolateEnglish(text)

lint(text, options)

organizedLints(text, options)

setDialect(dialect)

setLintConfig(config)

setLintConfigWithJSON(config)

setup()

summarizeStats(start, end)

toTitleCase(text)