@textlint/kernel
Version:
textlint kernel is core logic by pure JavaScript.
21 lines (19 loc) • 637 B
text/typescript
// LICENSE : MIT
;
import { getFixer } from "./rule-creator-helper";
import { TextlintLintableRuleDescriptor } from "./TextlintLintableRuleDescriptor";
import type { TextlintRuleReporter } from "@textlint/types";
/**
* Textlint Fixable Rule Descriptor.
* It is inherit **Rule** Descriptor and add fixer() method.
* It handle RuleCreator and RuleOption.
*/
export class TextlintFixableRuleDescriptor extends TextlintLintableRuleDescriptor {
/**
* Return fixer function
* You should check hasFixer before call this.
*/
get fixer(): TextlintRuleReporter {
return getFixer(this.rule);
}
}