@textlint/kernel
Version:
textlint kernel is core logic by pure JavaScript.
43 lines • 1.37 kB
TypeScript
import { TextlintKernelRule } from "../textlint-kernel-interface";
import type { TextlintRuleModule, TextlintRuleOptions, TextlintRuleReporter } from "@textlint/types";
/**
* Textlint Rule Descriptor.
* It handle RuleCreator and RuleOption.
*/
export declare class TextlintLintableRuleDescriptor {
private textlintKernelRule;
constructor(textlintKernelRule: TextlintKernelRule);
get id(): string;
/**
* Rule module-self
*/
get rule(): TextlintRuleModule;
/**
* Return true if this rule is enabled.
*/
get enabled(): boolean;
/**
* Return linter function
* You should check hasLiner before call this.
*/
get linter(): TextlintRuleReporter;
/**
* Return normalized rule option object.
* If the rule have not options, return `true` by default.
*/
get normalizedOptions(): TextlintRuleOptions;
get rawOptions(): boolean | undefined | TextlintRuleOptions;
/**
* Return true if descriptor is same
*/
equals(descriptor: TextlintLintableRuleDescriptor): boolean;
toKernel(): TextlintKernelRule;
toJSON(): {
id: string;
options: {
[index: string]: any;
severity?: import("@textlint/types").TextlintRuleSeverityLevelKey | undefined;
};
};
}
//# sourceMappingURL=TextlintLintableRuleDescriptor.d.ts.map