Skip to content

Function: createMdScopedRuleBuilder() ​

ts
function createMdScopedRuleBuilder(path): MdFrontmatterSourceBuilder<{
  checks: BuiltInCheckASTNode<unknown>[];
  directive: string;
  id: string;
  when: {
     effects?: FsGlobMatcherNode;
     partitions: string[];
  };
}>;

Defined in: markdown/src/builders/create-md-scoped-rule-builder.ts:15

Builds a MdFrontmatterSourceBuilder<ScopedRule> for md.scopedRule(path).

Configures kind: 'scoped-rule' and id: "md:scoped-rule:${path}" so a single Markdown rule file can be passed into P.scopedRule(md.scopedRule(path)) or .scoped(...) and validated with ScopedRuleSchema.

Parameters ​

ParameterTypeDescription
pathstringHost-root-relative path to a single scoped rule Markdown file.

Returns ​

MdFrontmatterSourceBuilder<{ checks: BuiltInCheckASTNode<unknown>[]; directive: string; id: string; when: { effects?: FsGlobMatcherNode; partitions: string[]; }; }>

Frozen single scoped rule source builder.

Released under the MIT License.