TextlintCore
Extends:
Constructor Summary
Public Constructor | ||
public |
constructor(config: *) |
Member Summary
Public Members | ||
public |
config: * |
|
public |
|
|
public |
messages: * |
|
public |
processors: * |
|
public |
ruleManager: * |
Method Summary
Public Methods | ||
public |
Gets the source code for the given node.
|
|
public |
getSyntax(): * |
|
public |
initializeForLinting(text: *) |
|
public |
lint file and return result object
|
|
public |
lintMarkdown(text: string): TextLintResult lint markdown text by registered rules.
|
|
public |
lint text by registered rules.
|
|
public |
pushReport(ruleId: string, txtNode: TxtNode, error: RuleError) push new RuleError to results
|
|
public |
Remove all registered rule and clear messages.
|
|
public |
setupRules(rules: object, rulesConfig: object) Register rules to EventEmitter.
|
Public Constructors
public constructor(config: *) source
Params:
Name | Type | Attribute | Description |
config | * |
Public Members
public config: * source
public messages: * source
public processors: * source
public ruleManager: * source
Public Methods
public getSource(node: TxtNode=, beforeCount: int=, afterCount: int=): string | null source
Gets the source code for the given node.
Params:
Name | Type | Attribute | Description |
node | TxtNode= | The AST node to get the text for. |
|
beforeCount | int= | The number of characters before the node to retrieve. |
|
afterCount | int= | The number of characters after the node to retrieve. |
public initializeForLinting(text: *) source
Params:
Name | Type | Attribute | Description |
text | * |
public lintFile(filePath: string): TextLintResult source
lint file and return result object
Params:
Name | Type | Attribute | Description |
filePath | string |
Return:
TextLintResult | result |
public lintMarkdown(text: string): TextLintResult source
lint markdown text by registered rules. The result contains target filePath and error messages.
Params:
Name | Type | Attribute | Description |
text | string | markdown format text |
Return:
TextLintResult |
public lintText(text: string, ext: string): TextLintResult source
lint text by registered rules. The result contains target filePath and error messages.
Return:
TextLintResult |