@redocly/recheck 0.15.0 → 2.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -1886
- package/examples/appendices/google.appendix.yaml +1 -1
- package/examples/appendices/inclusive-language.appendix.yaml +1 -1
- package/examples/appendices/microsoft.appendix.yaml +1 -1
- package/examples/appendices/plain-language.appendix.yaml +1 -1
- package/examples/appendices/technical-english.appendix.yaml +1 -1
- package/examples/google.yaml +7 -7
- package/examples/inclusive-language.yaml +7 -7
- package/examples/microsoft.yaml +7 -7
- package/examples/plain-language.yaml +7 -7
- package/examples/technical-english.yaml +7 -7
- package/lib/actions/baseline.d.ts +15 -0
- package/lib/actions/baseline.d.ts.map +1 -0
- package/lib/actions/baseline.js +51 -0
- package/lib/actions/baseline.js.map +1 -0
- package/lib/actions/lint.d.ts +51 -0
- package/lib/actions/lint.d.ts.map +1 -0
- package/lib/actions/lint.js +123 -0
- package/lib/actions/lint.js.map +1 -0
- package/lib/actions/markdoc-schema.d.ts +34 -0
- package/lib/actions/markdoc-schema.d.ts.map +1 -0
- package/lib/actions/markdoc-schema.js +106 -0
- package/lib/actions/markdoc-schema.js.map +1 -0
- package/lib/actions/readability.d.ts +25 -0
- package/lib/actions/readability.d.ts.map +1 -0
- package/lib/actions/readability.js +47 -0
- package/lib/actions/readability.js.map +1 -0
- package/lib/actions/roots.d.ts +7 -0
- package/lib/actions/roots.d.ts.map +1 -0
- package/lib/actions/roots.js +36 -0
- package/lib/actions/roots.js.map +1 -0
- package/lib/config/presets/api-descriptions.d.ts +8 -0
- package/lib/config/presets/api-descriptions.d.ts.map +1 -0
- package/lib/config/presets/api-descriptions.js +24 -0
- package/lib/config/presets/api-descriptions.js.map +1 -0
- package/lib/config/presets/google.d.ts +3 -0
- package/lib/config/presets/google.d.ts.map +1 -0
- package/lib/config/presets/google.js +1086 -0
- package/lib/config/presets/google.js.map +1 -0
- package/lib/config/presets/inclusive-language.d.ts +3 -0
- package/lib/config/presets/inclusive-language.d.ts.map +1 -0
- package/lib/config/presets/inclusive-language.js +151 -0
- package/lib/config/presets/inclusive-language.js.map +1 -0
- package/lib/config/presets/index.d.ts +16 -0
- package/lib/config/presets/index.d.ts.map +1 -0
- package/lib/config/presets/index.js +38 -0
- package/lib/config/presets/index.js.map +1 -0
- package/lib/config/presets/markdoc.d.ts +3 -0
- package/lib/config/presets/markdoc.d.ts.map +1 -0
- package/lib/config/presets/markdoc.js +45 -0
- package/lib/config/presets/markdoc.js.map +1 -0
- package/lib/config/presets/markdown-relaxed.d.ts +3 -0
- package/lib/config/presets/markdown-relaxed.d.ts.map +1 -0
- package/lib/config/presets/markdown-relaxed.js +34 -0
- package/lib/config/presets/markdown-relaxed.js.map +1 -0
- package/lib/config/presets/markdown.d.ts +11 -0
- package/lib/config/presets/markdown.d.ts.map +1 -0
- package/lib/config/presets/markdown.js +73 -0
- package/lib/config/presets/markdown.js.map +1 -0
- package/lib/config/presets/microsoft.d.ts +3 -0
- package/lib/config/presets/microsoft.d.ts.map +1 -0
- package/lib/config/presets/microsoft.js +1260 -0
- package/lib/config/presets/microsoft.js.map +1 -0
- package/lib/config/presets/minimal.d.ts +3 -0
- package/lib/config/presets/minimal.d.ts.map +1 -0
- package/lib/config/presets/minimal.js +13 -0
- package/lib/config/presets/minimal.js.map +1 -0
- package/lib/config/presets/plain-language.d.ts +3 -0
- package/lib/config/presets/plain-language.d.ts.map +1 -0
- package/lib/config/presets/plain-language.js +175 -0
- package/lib/config/presets/plain-language.js.map +1 -0
- package/lib/config/presets/prose.d.ts +3 -0
- package/lib/config/presets/prose.d.ts.map +1 -0
- package/lib/config/presets/prose.js +60 -0
- package/lib/config/presets/prose.js.map +1 -0
- package/lib/config/presets/technical-english.d.ts +22 -0
- package/lib/config/presets/technical-english.d.ts.map +1 -0
- package/lib/config/presets/technical-english.js +61 -0
- package/lib/config/presets/technical-english.js.map +1 -0
- package/lib/config/resolve.d.ts +36 -0
- package/lib/config/resolve.d.ts.map +1 -0
- package/lib/config/resolve.js +106 -0
- package/lib/config/resolve.js.map +1 -0
- package/lib/config/schema.d.ts +215 -0
- package/lib/config/schema.d.ts.map +1 -0
- package/lib/config/schema.js +152 -0
- package/lib/config/schema.js.map +1 -0
- package/lib/config/validate.d.ts +19 -0
- package/lib/config/validate.d.ts.map +1 -0
- package/lib/config/validate.js +1049 -0
- package/lib/config/validate.js.map +1 -0
- package/lib/core/auto-fix.d.ts.map +1 -0
- package/lib/core/auto-fix.js +94 -0
- package/lib/core/auto-fix.js.map +1 -0
- package/lib/core/baseline.d.ts +43 -0
- package/lib/core/baseline.d.ts.map +1 -0
- package/lib/core/baseline.js +142 -0
- package/lib/core/baseline.js.map +1 -0
- package/lib/core/case-preserve.d.ts +11 -0
- package/lib/core/case-preserve.d.ts.map +1 -0
- package/lib/core/case-preserve.js +22 -0
- package/lib/core/case-preserve.js.map +1 -0
- package/lib/core/directives.d.ts.map +1 -0
- package/lib/core/directives.js +66 -0
- package/lib/core/directives.js.map +1 -0
- package/lib/core/files.d.ts +31 -0
- package/lib/core/files.d.ts.map +1 -0
- package/lib/core/files.js +184 -0
- package/lib/core/files.js.map +1 -0
- package/lib/core/inline-code.d.ts +33 -0
- package/lib/core/inline-code.d.ts.map +1 -0
- package/lib/core/inline-code.js +50 -0
- package/lib/core/inline-code.js.map +1 -0
- package/lib/core/line-endings.d.ts +13 -0
- package/lib/core/line-endings.d.ts.map +1 -0
- package/lib/core/line-endings.js +39 -0
- package/lib/core/line-endings.js.map +1 -0
- package/lib/core/markdoc-tags.d.ts +48 -0
- package/lib/core/markdoc-tags.d.ts.map +1 -0
- package/lib/core/markdoc-tags.js +102 -0
- package/lib/core/markdoc-tags.js.map +1 -0
- package/lib/core/prose-extract.d.ts +6 -0
- package/lib/core/prose-extract.d.ts.map +1 -0
- package/lib/core/prose-extract.js +71 -0
- package/lib/core/prose-extract.js.map +1 -0
- package/lib/core/readability.d.ts +17 -0
- package/lib/core/readability.d.ts.map +1 -0
- package/lib/core/readability.js +34 -0
- package/lib/core/readability.js.map +1 -0
- package/lib/core/rule-filters.d.ts +29 -0
- package/lib/core/rule-filters.d.ts.map +1 -0
- package/lib/core/rule-filters.js +88 -0
- package/lib/core/rule-filters.js.map +1 -0
- package/lib/core/runner.d.ts +60 -0
- package/lib/core/runner.d.ts.map +1 -0
- package/lib/core/runner.js +305 -0
- package/lib/core/runner.js.map +1 -0
- package/lib/core/summary.d.ts +4 -0
- package/lib/core/summary.d.ts.map +1 -0
- package/lib/core/summary.js +37 -0
- package/lib/core/summary.js.map +1 -0
- package/lib/core/timing.d.ts +9 -0
- package/lib/core/timing.d.ts.map +1 -0
- package/lib/core/timing.js +19 -0
- package/lib/core/timing.js.map +1 -0
- package/lib/data/markdoc-realm-schema.d.ts.map +1 -0
- package/lib/data/markdoc-realm-schema.js +782 -0
- package/lib/data/markdoc-realm-schema.js.map +1 -0
- package/lib/data/proper-nouns.d.ts.map +1 -0
- package/lib/data/proper-nouns.js +42 -0
- package/lib/data/proper-nouns.js.map +1 -0
- package/lib/data/realm-front-matter-schema.d.ts +12 -0
- package/lib/data/realm-front-matter-schema.d.ts.map +1 -0
- package/lib/data/realm-front-matter-schema.js +51 -0
- package/lib/data/realm-front-matter-schema.js.map +1 -0
- package/lib/index.d.ts +81 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +114 -0
- package/lib/index.js.map +1 -0
- package/lib/metrics/formulas.d.ts +9 -0
- package/lib/metrics/formulas.d.ts.map +1 -0
- package/lib/metrics/formulas.js +59 -0
- package/lib/metrics/formulas.js.map +1 -0
- package/lib/metrics/statistics.d.ts +14 -0
- package/lib/metrics/statistics.d.ts.map +1 -0
- package/lib/metrics/statistics.js +35 -0
- package/lib/metrics/statistics.js.map +1 -0
- package/lib/parser/index.d.ts +13 -0
- package/lib/parser/index.d.ts.map +1 -0
- package/lib/parser/index.js +123 -0
- package/lib/parser/index.js.map +1 -0
- package/lib/parser/markdoc/extract-statics.d.ts +28 -0
- package/lib/parser/markdoc/extract-statics.d.ts.map +1 -0
- package/lib/parser/markdoc/extract-statics.js +80 -0
- package/lib/parser/markdoc/extract-statics.js.map +1 -0
- package/lib/parser/markdoc/pairing.d.ts +38 -0
- package/lib/parser/markdoc/pairing.d.ts.map +1 -0
- package/lib/parser/markdoc/pairing.js +77 -0
- package/lib/parser/markdoc/pairing.js.map +1 -0
- package/lib/parser/markdoc/schema.d.ts +56 -0
- package/lib/parser/markdoc/schema.d.ts.map +1 -0
- package/lib/parser/markdoc/schema.js +60 -0
- package/lib/parser/markdoc/schema.js.map +1 -0
- package/lib/parser/markdoc/span.d.ts +52 -0
- package/lib/parser/markdoc/span.d.ts.map +1 -0
- package/lib/parser/markdoc/span.js +577 -0
- package/lib/parser/markdoc/span.js.map +1 -0
- package/lib/parser/markdoc/structure.d.ts +17 -0
- package/lib/parser/markdoc/structure.d.ts.map +1 -0
- package/lib/parser/markdoc/structure.js +121 -0
- package/lib/parser/markdoc/structure.js.map +1 -0
- package/lib/parser/markdoc/syntax.d.ts +17 -0
- package/lib/parser/markdoc/syntax.d.ts.map +1 -0
- package/lib/parser/markdoc/syntax.js +262 -0
- package/lib/parser/markdoc/syntax.js.map +1 -0
- package/lib/parser/types.d.ts.map +1 -0
- package/lib/presets.d.ts +6 -0
- package/lib/presets.d.ts.map +1 -0
- package/lib/presets.js +12 -0
- package/lib/presets.js.map +1 -0
- package/lib/rules/registry.d.ts +13 -0
- package/lib/rules/registry.d.ts.map +1 -0
- package/lib/rules/registry.js +54 -0
- package/lib/rules/registry.js.map +1 -0
- package/lib/rules/scope/capitalization.d.ts.map +1 -0
- package/lib/rules/scope/capitalization.js +128 -0
- package/lib/rules/scope/capitalization.js.map +1 -0
- package/lib/rules/scope/conditional.d.ts.map +1 -0
- package/lib/rules/scope/conditional.js +93 -0
- package/lib/rules/scope/conditional.js.map +1 -0
- package/lib/rules/scope/consistency.d.ts.map +1 -0
- package/lib/rules/scope/consistency.js +118 -0
- package/lib/rules/scope/consistency.js.map +1 -0
- package/lib/rules/scope/length.d.ts.map +1 -0
- package/lib/rules/scope/length.js +50 -0
- package/lib/rules/scope/length.js.map +1 -0
- package/lib/rules/scope/max-image-size.d.ts.map +1 -0
- package/lib/rules/scope/max-image-size.js +55 -0
- package/lib/rules/scope/max-image-size.js.map +1 -0
- package/lib/rules/scope/metric.d.ts +3 -0
- package/lib/rules/scope/metric.d.ts.map +1 -0
- package/lib/rules/scope/metric.js +59 -0
- package/lib/rules/scope/metric.js.map +1 -0
- package/lib/rules/scope/occurrence.d.ts.map +1 -0
- package/lib/rules/scope/occurrence.js +41 -0
- package/lib/rules/scope/occurrence.js.map +1 -0
- package/lib/rules/scope/pattern.d.ts.map +1 -0
- package/lib/rules/scope/pattern.js +58 -0
- package/lib/rules/scope/pattern.js.map +1 -0
- package/lib/rules/scope/repetition.d.ts.map +1 -0
- package/lib/rules/scope/repetition.js +134 -0
- package/lib/rules/scope/repetition.js.map +1 -0
- package/lib/rules/scope/semantic-line-breaks.d.ts.map +1 -0
- package/lib/rules/scope/semantic-line-breaks.js +180 -0
- package/lib/rules/scope/semantic-line-breaks.js.map +1 -0
- package/lib/rules/scope/spelling.d.ts +11 -0
- package/lib/rules/scope/spelling.d.ts.map +1 -0
- package/lib/rules/scope/spelling.js +146 -0
- package/lib/rules/scope/spelling.js.map +1 -0
- package/lib/rules/scope/swap.d.ts.map +1 -0
- package/lib/rules/scope/swap.js +111 -0
- package/lib/rules/scope/swap.js.map +1 -0
- package/lib/rules/scope/title-case.d.ts +24 -0
- package/lib/rules/scope/title-case.d.ts.map +1 -0
- package/lib/rules/scope/title-case.js +216 -0
- package/lib/rules/scope/title-case.js.map +1 -0
- package/lib/rules/token/blanks-around-fences.d.ts.map +1 -0
- package/lib/rules/token/blanks-around-fences.js.map +1 -0
- package/lib/rules/token/blanks-around-headings.d.ts.map +1 -0
- package/lib/rules/token/blanks-around-headings.js +96 -0
- package/lib/rules/token/blanks-around-headings.js.map +1 -0
- package/lib/rules/token/blanks-around-lists.d.ts.map +1 -0
- package/lib/rules/token/blanks-around-lists.js +48 -0
- package/lib/rules/token/blanks-around-lists.js.map +1 -0
- package/lib/rules/token/blanks-around-tables.d.ts.map +1 -0
- package/lib/rules/token/blanks-around-tables.js +40 -0
- package/lib/rules/token/blanks-around-tables.js.map +1 -0
- package/lib/rules/token/code-block-style.d.ts.map +1 -0
- package/lib/rules/token/code-block-style.js.map +1 -0
- package/lib/rules/token/code-fence-style.d.ts.map +1 -0
- package/lib/rules/token/code-fence-style.js.map +1 -0
- package/lib/rules/token/commands-show-output.d.ts.map +1 -0
- package/lib/rules/token/commands-show-output.js.map +1 -0
- package/lib/rules/token/descriptive-link-text.d.ts.map +1 -0
- package/lib/rules/token/descriptive-link-text.js +46 -0
- package/lib/rules/token/descriptive-link-text.js.map +1 -0
- package/lib/rules/token/fenced-code-language.d.ts.map +1 -0
- package/lib/rules/token/fenced-code-language.js.map +1 -0
- package/lib/rules/token/first-line-h1.d.ts.map +1 -0
- package/lib/rules/token/first-line-h1.js +83 -0
- package/lib/rules/token/first-line-h1.js.map +1 -0
- package/lib/rules/token/front-matter.d.ts.map +1 -0
- package/lib/rules/token/front-matter.js +169 -0
- package/lib/rules/token/front-matter.js.map +1 -0
- package/lib/rules/token/heading-increment.d.ts.map +1 -0
- package/lib/rules/token/heading-increment.js +26 -0
- package/lib/rules/token/heading-increment.js.map +1 -0
- package/lib/rules/token/heading-start-left.d.ts.map +1 -0
- package/lib/rules/token/heading-start-left.js.map +1 -0
- package/lib/rules/token/heading-style.d.ts.map +1 -0
- package/lib/rules/token/heading-style.js.map +1 -0
- package/lib/rules/token/helpers.d.ts +115 -0
- package/lib/rules/token/helpers.d.ts.map +1 -0
- package/lib/rules/token/helpers.js +502 -0
- package/lib/rules/token/helpers.js.map +1 -0
- package/lib/rules/token/hr-style.d.ts.map +1 -0
- package/lib/rules/token/hr-style.js.map +1 -0
- package/lib/rules/token/index.d.ts +65 -0
- package/lib/rules/token/index.d.ts.map +1 -0
- package/lib/rules/token/index.js +157 -0
- package/lib/rules/token/index.js.map +1 -0
- package/lib/rules/token/line-length.d.ts.map +1 -0
- package/lib/rules/token/line-length.js +96 -0
- package/lib/rules/token/line-length.js.map +1 -0
- package/lib/rules/token/link-fragments.d.ts.map +1 -0
- package/lib/rules/token/link-fragments.js +398 -0
- package/lib/rules/token/link-fragments.js.map +1 -0
- package/lib/rules/token/link-image-reference-definitions.d.ts.map +1 -0
- package/lib/rules/token/link-image-reference-definitions.js.map +1 -0
- package/lib/rules/token/link-image-style.d.ts.map +1 -0
- package/lib/rules/token/link-image-style.js +138 -0
- package/lib/rules/token/link-image-style.js.map +1 -0
- package/lib/rules/token/list-indent.d.ts.map +1 -0
- package/lib/rules/token/list-indent.js.map +1 -0
- package/lib/rules/token/list-length.d.ts.map +1 -0
- package/lib/rules/token/list-length.js +31 -0
- package/lib/rules/token/list-length.js.map +1 -0
- package/lib/rules/token/list-marker-space.d.ts.map +1 -0
- package/lib/rules/token/list-marker-space.js.map +1 -0
- package/lib/rules/token/markdoc-attributes.d.ts.map +1 -0
- package/lib/rules/token/markdoc-attributes.js +198 -0
- package/lib/rules/token/markdoc-attributes.js.map +1 -0
- package/lib/rules/token/markdoc-pairing.d.ts.map +1 -0
- package/lib/rules/token/markdoc-pairing.js +65 -0
- package/lib/rules/token/markdoc-pairing.js.map +1 -0
- package/lib/rules/token/markdoc-syntax.d.ts.map +1 -0
- package/lib/rules/token/markdoc-syntax.js +84 -0
- package/lib/rules/token/markdoc-syntax.js.map +1 -0
- package/lib/rules/token/markdoc-unknown-tag.d.ts.map +1 -0
- package/lib/rules/token/markdoc-unknown-tag.js +44 -0
- package/lib/rules/token/markdoc-unknown-tag.js.map +1 -0
- package/lib/rules/token/no-alt-text.d.ts.map +1 -0
- package/lib/rules/token/no-alt-text.js +43 -0
- package/lib/rules/token/no-alt-text.js.map +1 -0
- package/lib/rules/token/no-bare-urls.d.ts.map +1 -0
- package/lib/rules/token/no-bare-urls.js +74 -0
- package/lib/rules/token/no-bare-urls.js.map +1 -0
- package/lib/rules/token/no-blanks-blockquote.d.ts.map +1 -0
- package/lib/rules/token/no-blanks-blockquote.js.map +1 -0
- package/lib/rules/token/no-duplicate-heading.d.ts.map +1 -0
- package/lib/rules/token/no-duplicate-heading.js +89 -0
- package/lib/rules/token/no-duplicate-heading.js.map +1 -0
- package/lib/rules/token/no-duplicate-link-destinations.d.ts.map +1 -0
- package/lib/rules/token/no-duplicate-link-destinations.js +54 -0
- package/lib/rules/token/no-duplicate-link-destinations.js.map +1 -0
- package/lib/rules/token/no-emphasis-as-heading.d.ts.map +1 -0
- package/lib/rules/token/no-emphasis-as-heading.js +39 -0
- package/lib/rules/token/no-emphasis-as-heading.js.map +1 -0
- package/lib/rules/token/no-empty-headings.d.ts.map +1 -0
- package/lib/rules/token/no-empty-headings.js +21 -0
- package/lib/rules/token/no-empty-headings.js.map +1 -0
- package/lib/rules/token/no-empty-links.d.ts.map +1 -0
- package/lib/rules/token/no-empty-links.js.map +1 -0
- package/lib/rules/token/no-hard-tabs.d.ts.map +1 -0
- package/lib/rules/token/no-hard-tabs.js.map +1 -0
- package/lib/rules/token/no-inline-html.d.ts.map +1 -0
- package/lib/rules/token/no-inline-html.js +41 -0
- package/lib/rules/token/no-inline-html.js.map +1 -0
- package/lib/rules/token/no-multiple-blanks.d.ts.map +1 -0
- package/lib/rules/token/no-multiple-blanks.js.map +1 -0
- package/lib/rules/token/no-multiple-space-atx.d.ts +9 -0
- package/lib/rules/token/no-multiple-space-atx.d.ts.map +1 -0
- package/lib/rules/token/no-multiple-space-atx.js +46 -0
- package/lib/rules/token/no-multiple-space-atx.js.map +1 -0
- package/lib/rules/token/no-multiple-space-closed-atx.d.ts.map +1 -0
- package/lib/rules/token/no-multiple-space-closed-atx.js.map +1 -0
- package/lib/rules/token/no-reversed-links.d.ts.map +1 -0
- package/lib/rules/token/no-reversed-links.js.map +1 -0
- package/lib/rules/token/no-space-in-code.d.ts.map +1 -0
- package/lib/rules/token/no-space-in-code.js.map +1 -0
- package/lib/rules/token/no-space-in-emphasis.d.ts.map +1 -0
- package/lib/rules/token/no-space-in-emphasis.js +72 -0
- package/lib/rules/token/no-space-in-emphasis.js.map +1 -0
- package/lib/rules/token/no-space-in-links.d.ts.map +1 -0
- package/lib/rules/token/no-space-in-links.js.map +1 -0
- package/lib/rules/token/no-trailing-punctuation.d.ts.map +1 -0
- package/lib/rules/token/no-trailing-punctuation.js.map +1 -0
- package/lib/rules/token/no-trailing-spaces.d.ts.map +1 -0
- package/lib/rules/token/no-trailing-spaces.js.map +1 -0
- package/lib/rules/token/ol-prefix.d.ts.map +1 -0
- package/lib/rules/token/ol-prefix.js.map +1 -0
- package/lib/rules/token/proper-names.d.ts.map +1 -0
- package/lib/rules/token/proper-names.js +87 -0
- package/lib/rules/token/proper-names.js.map +1 -0
- package/lib/rules/token/reference-links-images.d.ts.map +1 -0
- package/lib/rules/token/reference-links-images.js.map +1 -0
- package/lib/rules/token/required-headings.d.ts.map +1 -0
- package/lib/rules/token/required-headings.js +73 -0
- package/lib/rules/token/required-headings.js.map +1 -0
- package/lib/rules/token/single-h1.d.ts.map +1 -0
- package/lib/rules/token/single-h1.js +43 -0
- package/lib/rules/token/single-h1.js.map +1 -0
- package/lib/rules/token/table-column-count.d.ts.map +1 -0
- package/lib/rules/token/table-column-count.js.map +1 -0
- package/lib/rules/token/table-column-style.d.ts.map +1 -0
- package/lib/rules/token/table-column-style.js +162 -0
- package/lib/rules/token/table-column-style.js.map +1 -0
- package/lib/rules/token/table-pipe-style.d.ts.map +1 -0
- package/lib/rules/token/table-pipe-style.js.map +1 -0
- package/lib/rules/token/ul-indent.d.ts.map +1 -0
- package/lib/rules/token/ul-indent.js.map +1 -0
- package/lib/rules/token/ul-style.d.ts.map +1 -0
- package/lib/rules/token/ul-style.js +70 -0
- package/lib/rules/token/ul-style.js.map +1 -0
- package/lib/rules/types.d.ts +62 -0
- package/lib/rules/types.d.ts.map +1 -0
- package/lib/rules/utils.d.ts +18 -0
- package/lib/rules/utils.d.ts.map +1 -0
- package/lib/rules/utils.js +75 -0
- package/lib/rules/utils.js.map +1 -0
- package/lib/scopes/extractor.d.ts +6 -0
- package/lib/scopes/extractor.d.ts.map +1 -0
- package/lib/scopes/extractor.js +398 -0
- package/lib/scopes/extractor.js.map +1 -0
- package/lib/scopes/selector.d.ts +26 -0
- package/lib/scopes/selector.d.ts.map +1 -0
- package/lib/scopes/selector.js +78 -0
- package/lib/scopes/selector.js.map +1 -0
- package/lib/scopes/sentences.d.ts +13 -0
- package/lib/scopes/sentences.d.ts.map +1 -0
- package/lib/scopes/sentences.js +237 -0
- package/lib/scopes/sentences.js.map +1 -0
- package/lib/scopes/types.d.ts +35 -0
- package/lib/scopes/types.d.ts.map +1 -0
- package/lib/scopes/vocabulary.d.ts +12 -0
- package/lib/scopes/vocabulary.d.ts.map +1 -0
- package/lib/scopes/vocabulary.js +56 -0
- package/lib/scopes/vocabulary.js.map +1 -0
- package/lib/types/assertions.d.ts +97 -0
- package/lib/types/assertions.d.ts.map +1 -0
- package/lib/types/reporting.d.ts +23 -0
- package/lib/types/reporting.d.ts.map +1 -0
- package/lib/types/rules.d.ts +53 -0
- package/lib/types/rules.d.ts.map +1 -0
- package/lib/types/validation.d.ts +5 -0
- package/lib/types/validation.d.ts.map +1 -0
- package/lib/utils/is-plain-object.d.ts +2 -0
- package/lib/utils/is-plain-object.d.ts.map +1 -0
- package/lib/utils/is-plain-object.js +5 -0
- package/lib/utils/is-plain-object.js.map +1 -0
- package/package.json +58 -61
- package/presets/google/PROVENANCE.md +217 -221
- package/presets/inclusive-language/PROVENANCE.md +20 -19
- package/presets/microsoft/PROVENANCE.md +242 -243
- package/presets/plain-language/PROVENANCE.md +66 -60
- package/presets/technical-english/PROVENANCE.md +5 -5
- package/skills/recheck-config/SKILL.md +70 -20
- package/skills/recheck-lint/SKILL.md +37 -13
- package/dist/cli.d.ts +0 -3
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -228
- package/dist/cli.js.map +0 -1
- package/dist/commands/baseline.d.ts +0 -10
- package/dist/commands/baseline.d.ts.map +0 -1
- package/dist/commands/baseline.js +0 -59
- package/dist/commands/baseline.js.map +0 -1
- package/dist/commands/markdoc-schema.d.ts +0 -17
- package/dist/commands/markdoc-schema.d.ts.map +0 -1
- package/dist/commands/markdoc-schema.js +0 -127
- package/dist/commands/markdoc-schema.js.map +0 -1
- package/dist/commands/readability.d.ts +0 -10
- package/dist/commands/readability.d.ts.map +0 -1
- package/dist/commands/readability.js +0 -90
- package/dist/commands/readability.js.map +0 -1
- package/dist/commands/run.d.ts +0 -21
- package/dist/commands/run.d.ts.map +0 -1
- package/dist/commands/run.js +0 -236
- package/dist/commands/run.js.map +0 -1
- package/dist/commands/validate.d.ts +0 -8
- package/dist/commands/validate.d.ts.map +0 -1
- package/dist/commands/validate.js +0 -43
- package/dist/commands/validate.js.map +0 -1
- package/dist/config/load.d.ts +0 -33
- package/dist/config/load.d.ts.map +0 -1
- package/dist/config/load.js +0 -98
- package/dist/config/load.js.map +0 -1
- package/dist/config/presets/api-descriptions.d.ts +0 -8
- package/dist/config/presets/api-descriptions.d.ts.map +0 -1
- package/dist/config/presets/api-descriptions.js +0 -24
- package/dist/config/presets/api-descriptions.js.map +0 -1
- package/dist/config/presets/google.d.ts +0 -3
- package/dist/config/presets/google.d.ts.map +0 -1
- package/dist/config/presets/google.js +0 -1671
- package/dist/config/presets/google.js.map +0 -1
- package/dist/config/presets/inclusive-language.d.ts +0 -3
- package/dist/config/presets/inclusive-language.d.ts.map +0 -1
- package/dist/config/presets/inclusive-language.js +0 -321
- package/dist/config/presets/inclusive-language.js.map +0 -1
- package/dist/config/presets/index.d.ts +0 -67
- package/dist/config/presets/index.d.ts.map +0 -1
- package/dist/config/presets/index.js +0 -141
- package/dist/config/presets/index.js.map +0 -1
- package/dist/config/presets/markdoc.d.ts +0 -21
- package/dist/config/presets/markdoc.d.ts.map +0 -1
- package/dist/config/presets/markdoc.js +0 -101
- package/dist/config/presets/markdoc.js.map +0 -1
- package/dist/config/presets/markdown-relaxed.d.ts +0 -3
- package/dist/config/presets/markdown-relaxed.d.ts.map +0 -1
- package/dist/config/presets/markdown-relaxed.js +0 -98
- package/dist/config/presets/markdown-relaxed.js.map +0 -1
- package/dist/config/presets/markdown.d.ts +0 -43
- package/dist/config/presets/markdown.d.ts.map +0 -1
- package/dist/config/presets/markdown.js +0 -132
- package/dist/config/presets/markdown.js.map +0 -1
- package/dist/config/presets/microsoft.d.ts +0 -3
- package/dist/config/presets/microsoft.d.ts.map +0 -1
- package/dist/config/presets/microsoft.js +0 -2268
- package/dist/config/presets/microsoft.js.map +0 -1
- package/dist/config/presets/minimal.d.ts +0 -3
- package/dist/config/presets/minimal.d.ts.map +0 -1
- package/dist/config/presets/minimal.js +0 -21
- package/dist/config/presets/minimal.js.map +0 -1
- package/dist/config/presets/plain-language.d.ts +0 -3
- package/dist/config/presets/plain-language.d.ts.map +0 -1
- package/dist/config/presets/plain-language.js +0 -351
- package/dist/config/presets/plain-language.js.map +0 -1
- package/dist/config/presets/prose.d.ts +0 -52
- package/dist/config/presets/prose.d.ts.map +0 -1
- package/dist/config/presets/prose.js +0 -138
- package/dist/config/presets/prose.js.map +0 -1
- package/dist/config/presets/technical-english.d.ts +0 -34
- package/dist/config/presets/technical-english.d.ts.map +0 -1
- package/dist/config/presets/technical-english.js +0 -79
- package/dist/config/presets/technical-english.js.map +0 -1
- package/dist/config/schema.d.ts +0 -226
- package/dist/config/schema.d.ts.map +0 -1
- package/dist/config/schema.js +0 -196
- package/dist/config/schema.js.map +0 -1
- package/dist/config/validate.d.ts +0 -22
- package/dist/config/validate.d.ts.map +0 -1
- package/dist/config/validate.js +0 -1315
- package/dist/config/validate.js.map +0 -1
- package/dist/core/auto-fix.d.ts.map +0 -1
- package/dist/core/auto-fix.js +0 -101
- package/dist/core/auto-fix.js.map +0 -1
- package/dist/core/baseline.d.ts +0 -49
- package/dist/core/baseline.d.ts.map +0 -1
- package/dist/core/baseline.js +0 -0
- package/dist/core/baseline.js.map +0 -1
- package/dist/core/case-preserve.d.ts +0 -46
- package/dist/core/case-preserve.d.ts.map +0 -1
- package/dist/core/case-preserve.js +0 -57
- package/dist/core/case-preserve.js.map +0 -1
- package/dist/core/directives.d.ts.map +0 -1
- package/dist/core/directives.js +0 -73
- package/dist/core/directives.js.map +0 -1
- package/dist/core/files.d.ts +0 -69
- package/dist/core/files.d.ts.map +0 -1
- package/dist/core/files.js +0 -260
- package/dist/core/files.js.map +0 -1
- package/dist/core/inline-code.d.ts +0 -87
- package/dist/core/inline-code.d.ts.map +0 -1
- package/dist/core/inline-code.js +0 -104
- package/dist/core/inline-code.js.map +0 -1
- package/dist/core/line-endings.d.ts +0 -32
- package/dist/core/line-endings.d.ts.map +0 -1
- package/dist/core/line-endings.js +0 -65
- package/dist/core/line-endings.js.map +0 -1
- package/dist/core/markdoc-tags.d.ts +0 -79
- package/dist/core/markdoc-tags.d.ts.map +0 -1
- package/dist/core/markdoc-tags.js +0 -131
- package/dist/core/markdoc-tags.js.map +0 -1
- package/dist/core/prose-extract.d.ts +0 -6
- package/dist/core/prose-extract.d.ts.map +0 -1
- package/dist/core/prose-extract.js +0 -79
- package/dist/core/prose-extract.js.map +0 -1
- package/dist/core/readability.d.ts +0 -17
- package/dist/core/readability.d.ts.map +0 -1
- package/dist/core/readability.js +0 -37
- package/dist/core/readability.js.map +0 -1
- package/dist/core/rule-filters.d.ts +0 -45
- package/dist/core/rule-filters.d.ts.map +0 -1
- package/dist/core/rule-filters.js +0 -118
- package/dist/core/rule-filters.js.map +0 -1
- package/dist/core/runner.d.ts +0 -98
- package/dist/core/runner.d.ts.map +0 -1
- package/dist/core/runner.js +0 -401
- package/dist/core/runner.js.map +0 -1
- package/dist/core/timing.d.ts +0 -24
- package/dist/core/timing.d.ts.map +0 -1
- package/dist/core/timing.js +0 -39
- package/dist/core/timing.js.map +0 -1
- package/dist/data/markdoc-realm-schema.d.ts.map +0 -1
- package/dist/data/markdoc-realm-schema.js +0 -798
- package/dist/data/markdoc-realm-schema.js.map +0 -1
- package/dist/data/proper-nouns.d.ts.map +0 -1
- package/dist/data/proper-nouns.js +0 -47
- package/dist/data/proper-nouns.js.map +0 -1
- package/dist/data/realm-front-matter-schema.d.ts +0 -28
- package/dist/data/realm-front-matter-schema.d.ts.map +0 -1
- package/dist/data/realm-front-matter-schema.js +0 -73
- package/dist/data/realm-front-matter-schema.js.map +0 -1
- package/dist/index.d.ts +0 -90
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -152
- package/dist/index.js.map +0 -1
- package/dist/metrics/formulas.d.ts +0 -17
- package/dist/metrics/formulas.d.ts.map +0 -1
- package/dist/metrics/formulas.js +0 -70
- package/dist/metrics/formulas.js.map +0 -1
- package/dist/metrics/statistics.d.ts +0 -27
- package/dist/metrics/statistics.d.ts.map +0 -1
- package/dist/metrics/statistics.js +0 -56
- package/dist/metrics/statistics.js.map +0 -1
- package/dist/parser/index.d.ts +0 -19
- package/dist/parser/index.d.ts.map +0 -1
- package/dist/parser/index.js +0 -174
- package/dist/parser/index.js.map +0 -1
- package/dist/parser/markdoc/extract-statics.d.ts +0 -45
- package/dist/parser/markdoc/extract-statics.d.ts.map +0 -1
- package/dist/parser/markdoc/extract-statics.js +0 -139
- package/dist/parser/markdoc/extract-statics.js.map +0 -1
- package/dist/parser/markdoc/pairing.d.ts +0 -63
- package/dist/parser/markdoc/pairing.d.ts.map +0 -1
- package/dist/parser/markdoc/pairing.js +0 -94
- package/dist/parser/markdoc/pairing.js.map +0 -1
- package/dist/parser/markdoc/schema.d.ts +0 -85
- package/dist/parser/markdoc/schema.d.ts.map +0 -1
- package/dist/parser/markdoc/schema.js +0 -86
- package/dist/parser/markdoc/schema.js.map +0 -1
- package/dist/parser/markdoc/span.d.ts +0 -64
- package/dist/parser/markdoc/span.d.ts.map +0 -1
- package/dist/parser/markdoc/span.js +0 -729
- package/dist/parser/markdoc/span.js.map +0 -1
- package/dist/parser/markdoc/structure.d.ts +0 -28
- package/dist/parser/markdoc/structure.d.ts.map +0 -1
- package/dist/parser/markdoc/structure.js +0 -153
- package/dist/parser/markdoc/structure.js.map +0 -1
- package/dist/parser/markdoc/syntax.d.ts +0 -44
- package/dist/parser/markdoc/syntax.d.ts.map +0 -1
- package/dist/parser/markdoc/syntax.js +0 -317
- package/dist/parser/markdoc/syntax.js.map +0 -1
- package/dist/parser/types.d.ts.map +0 -1
- package/dist/reporter/fixes.d.ts +0 -3
- package/dist/reporter/fixes.d.ts.map +0 -1
- package/dist/reporter/fixes.js +0 -41
- package/dist/reporter/fixes.js.map +0 -1
- package/dist/reporter/formats/github-actions.d.ts +0 -6
- package/dist/reporter/formats/github-actions.d.ts.map +0 -1
- package/dist/reporter/formats/github-actions.js +0 -20
- package/dist/reporter/formats/github-actions.js.map +0 -1
- package/dist/reporter/formats/json.d.ts +0 -10
- package/dist/reporter/formats/json.d.ts.map +0 -1
- package/dist/reporter/formats/json.js +0 -25
- package/dist/reporter/formats/json.js.map +0 -1
- package/dist/reporter/formats/sarif.d.ts +0 -10
- package/dist/reporter/formats/sarif.d.ts.map +0 -1
- package/dist/reporter/formats/sarif.js +0 -66
- package/dist/reporter/formats/sarif.js.map +0 -1
- package/dist/reporter/formats/table.d.ts +0 -6
- package/dist/reporter/formats/table.d.ts.map +0 -1
- package/dist/reporter/formats/table.js +0 -43
- package/dist/reporter/formats/table.js.map +0 -1
- package/dist/reporter/index.d.ts +0 -10
- package/dist/reporter/index.d.ts.map +0 -1
- package/dist/reporter/index.js +0 -42
- package/dist/reporter/index.js.map +0 -1
- package/dist/reporter/prioritize-problems.d.ts +0 -7
- package/dist/reporter/prioritize-problems.d.ts.map +0 -1
- package/dist/reporter/prioritize-problems.js +0 -29
- package/dist/reporter/prioritize-problems.js.map +0 -1
- package/dist/reporter/statistics.d.ts +0 -10
- package/dist/reporter/statistics.d.ts.map +0 -1
- package/dist/reporter/statistics.js +0 -52
- package/dist/reporter/statistics.js.map +0 -1
- package/dist/reporter/summary.d.ts +0 -10
- package/dist/reporter/summary.d.ts.map +0 -1
- package/dist/reporter/summary.js +0 -49
- package/dist/reporter/summary.js.map +0 -1
- package/dist/rules/registry.d.ts +0 -15
- package/dist/rules/registry.d.ts.map +0 -1
- package/dist/rules/registry.js +0 -81
- package/dist/rules/registry.js.map +0 -1
- package/dist/rules/scope/capitalization.d.ts.map +0 -1
- package/dist/rules/scope/capitalization.js +0 -164
- package/dist/rules/scope/capitalization.js.map +0 -1
- package/dist/rules/scope/conditional.d.ts.map +0 -1
- package/dist/rules/scope/conditional.js +0 -112
- package/dist/rules/scope/conditional.js.map +0 -1
- package/dist/rules/scope/consistency.d.ts.map +0 -1
- package/dist/rules/scope/consistency.js +0 -179
- package/dist/rules/scope/consistency.js.map +0 -1
- package/dist/rules/scope/length.d.ts.map +0 -1
- package/dist/rules/scope/length.js +0 -73
- package/dist/rules/scope/length.js.map +0 -1
- package/dist/rules/scope/max-image-size.d.ts.map +0 -1
- package/dist/rules/scope/max-image-size.js +0 -65
- package/dist/rules/scope/max-image-size.js.map +0 -1
- package/dist/rules/scope/metric.d.ts +0 -5
- package/dist/rules/scope/metric.d.ts.map +0 -1
- package/dist/rules/scope/metric.js +0 -74
- package/dist/rules/scope/metric.js.map +0 -1
- package/dist/rules/scope/occurrence.d.ts.map +0 -1
- package/dist/rules/scope/occurrence.js +0 -48
- package/dist/rules/scope/occurrence.js.map +0 -1
- package/dist/rules/scope/pattern.d.ts.map +0 -1
- package/dist/rules/scope/pattern.js +0 -75
- package/dist/rules/scope/pattern.js.map +0 -1
- package/dist/rules/scope/repetition.d.ts.map +0 -1
- package/dist/rules/scope/repetition.js +0 -139
- package/dist/rules/scope/repetition.js.map +0 -1
- package/dist/rules/scope/semantic-line-breaks.d.ts.map +0 -1
- package/dist/rules/scope/semantic-line-breaks.js +0 -236
- package/dist/rules/scope/semantic-line-breaks.js.map +0 -1
- package/dist/rules/scope/spelling.d.ts +0 -27
- package/dist/rules/scope/spelling.d.ts.map +0 -1
- package/dist/rules/scope/spelling.js +0 -227
- package/dist/rules/scope/spelling.js.map +0 -1
- package/dist/rules/scope/swap.d.ts.map +0 -1
- package/dist/rules/scope/swap.js +0 -149
- package/dist/rules/scope/swap.js.map +0 -1
- package/dist/rules/scope/title-case.d.ts +0 -46
- package/dist/rules/scope/title-case.d.ts.map +0 -1
- package/dist/rules/scope/title-case.js +0 -301
- package/dist/rules/scope/title-case.js.map +0 -1
- package/dist/rules/token/blanks-around-fences.d.ts.map +0 -1
- package/dist/rules/token/blanks-around-fences.js.map +0 -1
- package/dist/rules/token/blanks-around-headings.d.ts.map +0 -1
- package/dist/rules/token/blanks-around-headings.js +0 -108
- package/dist/rules/token/blanks-around-headings.js.map +0 -1
- package/dist/rules/token/blanks-around-lists.d.ts.map +0 -1
- package/dist/rules/token/blanks-around-lists.js +0 -56
- package/dist/rules/token/blanks-around-lists.js.map +0 -1
- package/dist/rules/token/blanks-around-tables.d.ts.map +0 -1
- package/dist/rules/token/blanks-around-tables.js +0 -42
- package/dist/rules/token/blanks-around-tables.js.map +0 -1
- package/dist/rules/token/code-block-style.d.ts.map +0 -1
- package/dist/rules/token/code-block-style.js.map +0 -1
- package/dist/rules/token/code-fence-style.d.ts.map +0 -1
- package/dist/rules/token/code-fence-style.js.map +0 -1
- package/dist/rules/token/commands-show-output.d.ts.map +0 -1
- package/dist/rules/token/commands-show-output.js.map +0 -1
- package/dist/rules/token/descriptive-link-text.d.ts.map +0 -1
- package/dist/rules/token/descriptive-link-text.js +0 -53
- package/dist/rules/token/descriptive-link-text.js.map +0 -1
- package/dist/rules/token/fenced-code-language.d.ts.map +0 -1
- package/dist/rules/token/fenced-code-language.js.map +0 -1
- package/dist/rules/token/first-line-h1.d.ts.map +0 -1
- package/dist/rules/token/first-line-h1.js +0 -107
- package/dist/rules/token/first-line-h1.js.map +0 -1
- package/dist/rules/token/front-matter.d.ts.map +0 -1
- package/dist/rules/token/front-matter.js +0 -177
- package/dist/rules/token/front-matter.js.map +0 -1
- package/dist/rules/token/heading-increment.d.ts.map +0 -1
- package/dist/rules/token/heading-increment.js +0 -27
- package/dist/rules/token/heading-increment.js.map +0 -1
- package/dist/rules/token/heading-start-left.d.ts.map +0 -1
- package/dist/rules/token/heading-start-left.js.map +0 -1
- package/dist/rules/token/heading-style.d.ts.map +0 -1
- package/dist/rules/token/heading-style.js.map +0 -1
- package/dist/rules/token/helpers.d.ts +0 -313
- package/dist/rules/token/helpers.d.ts.map +0 -1
- package/dist/rules/token/helpers.js +0 -746
- package/dist/rules/token/helpers.js.map +0 -1
- package/dist/rules/token/hr-style.d.ts.map +0 -1
- package/dist/rules/token/hr-style.js.map +0 -1
- package/dist/rules/token/index.d.ts +0 -76
- package/dist/rules/token/index.d.ts.map +0 -1
- package/dist/rules/token/index.js +0 -229
- package/dist/rules/token/index.js.map +0 -1
- package/dist/rules/token/line-length.d.ts.map +0 -1
- package/dist/rules/token/line-length.js +0 -120
- package/dist/rules/token/line-length.js.map +0 -1
- package/dist/rules/token/link-fragments.d.ts.map +0 -1
- package/dist/rules/token/link-fragments.js +0 -393
- package/dist/rules/token/link-fragments.js.map +0 -1
- package/dist/rules/token/link-image-reference-definitions.d.ts.map +0 -1
- package/dist/rules/token/link-image-reference-definitions.js.map +0 -1
- package/dist/rules/token/link-image-style.d.ts.map +0 -1
- package/dist/rules/token/link-image-style.js +0 -131
- package/dist/rules/token/link-image-style.js.map +0 -1
- package/dist/rules/token/list-indent.d.ts.map +0 -1
- package/dist/rules/token/list-indent.js.map +0 -1
- package/dist/rules/token/list-length.d.ts.map +0 -1
- package/dist/rules/token/list-length.js +0 -55
- package/dist/rules/token/list-length.js.map +0 -1
- package/dist/rules/token/list-marker-space.d.ts.map +0 -1
- package/dist/rules/token/list-marker-space.js.map +0 -1
- package/dist/rules/token/markdoc-attributes.d.ts.map +0 -1
- package/dist/rules/token/markdoc-attributes.js +0 -269
- package/dist/rules/token/markdoc-attributes.js.map +0 -1
- package/dist/rules/token/markdoc-pairing.d.ts.map +0 -1
- package/dist/rules/token/markdoc-pairing.js +0 -73
- package/dist/rules/token/markdoc-pairing.js.map +0 -1
- package/dist/rules/token/markdoc-syntax.d.ts.map +0 -1
- package/dist/rules/token/markdoc-syntax.js +0 -119
- package/dist/rules/token/markdoc-syntax.js.map +0 -1
- package/dist/rules/token/markdoc-unknown-tag.d.ts.map +0 -1
- package/dist/rules/token/markdoc-unknown-tag.js +0 -64
- package/dist/rules/token/markdoc-unknown-tag.js.map +0 -1
- package/dist/rules/token/no-alt-text.d.ts.map +0 -1
- package/dist/rules/token/no-alt-text.js +0 -47
- package/dist/rules/token/no-alt-text.js.map +0 -1
- package/dist/rules/token/no-bare-urls.d.ts.map +0 -1
- package/dist/rules/token/no-bare-urls.js +0 -88
- package/dist/rules/token/no-bare-urls.js.map +0 -1
- package/dist/rules/token/no-blanks-blockquote.d.ts.map +0 -1
- package/dist/rules/token/no-blanks-blockquote.js.map +0 -1
- package/dist/rules/token/no-duplicate-heading.d.ts.map +0 -1
- package/dist/rules/token/no-duplicate-heading.js +0 -101
- package/dist/rules/token/no-duplicate-heading.js.map +0 -1
- package/dist/rules/token/no-duplicate-link-destinations.d.ts.map +0 -1
- package/dist/rules/token/no-duplicate-link-destinations.js +0 -65
- package/dist/rules/token/no-duplicate-link-destinations.js.map +0 -1
- package/dist/rules/token/no-emphasis-as-heading.d.ts.map +0 -1
- package/dist/rules/token/no-emphasis-as-heading.js +0 -44
- package/dist/rules/token/no-emphasis-as-heading.js.map +0 -1
- package/dist/rules/token/no-empty-headings.d.ts.map +0 -1
- package/dist/rules/token/no-empty-headings.js +0 -28
- package/dist/rules/token/no-empty-headings.js.map +0 -1
- package/dist/rules/token/no-empty-links.d.ts.map +0 -1
- package/dist/rules/token/no-empty-links.js.map +0 -1
- package/dist/rules/token/no-hard-tabs.d.ts.map +0 -1
- package/dist/rules/token/no-hard-tabs.js.map +0 -1
- package/dist/rules/token/no-inline-html.d.ts.map +0 -1
- package/dist/rules/token/no-inline-html.js +0 -45
- package/dist/rules/token/no-inline-html.js.map +0 -1
- package/dist/rules/token/no-multiple-blanks.d.ts.map +0 -1
- package/dist/rules/token/no-multiple-blanks.js.map +0 -1
- package/dist/rules/token/no-multiple-space-atx.d.ts +0 -13
- package/dist/rules/token/no-multiple-space-atx.d.ts.map +0 -1
- package/dist/rules/token/no-multiple-space-atx.js +0 -50
- package/dist/rules/token/no-multiple-space-atx.js.map +0 -1
- package/dist/rules/token/no-multiple-space-closed-atx.d.ts.map +0 -1
- package/dist/rules/token/no-multiple-space-closed-atx.js.map +0 -1
- package/dist/rules/token/no-reversed-links.d.ts.map +0 -1
- package/dist/rules/token/no-reversed-links.js.map +0 -1
- package/dist/rules/token/no-space-in-code.d.ts.map +0 -1
- package/dist/rules/token/no-space-in-code.js.map +0 -1
- package/dist/rules/token/no-space-in-emphasis.d.ts.map +0 -1
- package/dist/rules/token/no-space-in-emphasis.js +0 -79
- package/dist/rules/token/no-space-in-emphasis.js.map +0 -1
- package/dist/rules/token/no-space-in-links.d.ts.map +0 -1
- package/dist/rules/token/no-space-in-links.js.map +0 -1
- package/dist/rules/token/no-trailing-punctuation.d.ts.map +0 -1
- package/dist/rules/token/no-trailing-punctuation.js.map +0 -1
- package/dist/rules/token/no-trailing-spaces.d.ts.map +0 -1
- package/dist/rules/token/no-trailing-spaces.js.map +0 -1
- package/dist/rules/token/ol-prefix.d.ts.map +0 -1
- package/dist/rules/token/ol-prefix.js.map +0 -1
- package/dist/rules/token/proper-names.d.ts.map +0 -1
- package/dist/rules/token/proper-names.js +0 -93
- package/dist/rules/token/proper-names.js.map +0 -1
- package/dist/rules/token/reference-links-images.d.ts.map +0 -1
- package/dist/rules/token/reference-links-images.js.map +0 -1
- package/dist/rules/token/required-headings.d.ts.map +0 -1
- package/dist/rules/token/required-headings.js +0 -83
- package/dist/rules/token/required-headings.js.map +0 -1
- package/dist/rules/token/single-h1.d.ts.map +0 -1
- package/dist/rules/token/single-h1.js +0 -56
- package/dist/rules/token/single-h1.js.map +0 -1
- package/dist/rules/token/table-column-count.d.ts.map +0 -1
- package/dist/rules/token/table-column-count.js.map +0 -1
- package/dist/rules/token/table-column-style.d.ts.map +0 -1
- package/dist/rules/token/table-column-style.js +0 -179
- package/dist/rules/token/table-column-style.js.map +0 -1
- package/dist/rules/token/table-pipe-style.d.ts.map +0 -1
- package/dist/rules/token/table-pipe-style.js.map +0 -1
- package/dist/rules/token/ul-indent.d.ts.map +0 -1
- package/dist/rules/token/ul-indent.js.map +0 -1
- package/dist/rules/token/ul-style.d.ts.map +0 -1
- package/dist/rules/token/ul-style.js +0 -80
- package/dist/rules/token/ul-style.js.map +0 -1
- package/dist/rules/types.d.ts +0 -83
- package/dist/rules/types.d.ts.map +0 -1
- package/dist/rules/utils.d.ts +0 -31
- package/dist/rules/utils.d.ts.map +0 -1
- package/dist/rules/utils.js +0 -90
- package/dist/rules/utils.js.map +0 -1
- package/dist/scopes/extractor.d.ts +0 -7
- package/dist/scopes/extractor.d.ts.map +0 -1
- package/dist/scopes/extractor.js +0 -536
- package/dist/scopes/extractor.js.map +0 -1
- package/dist/scopes/selector.d.ts +0 -51
- package/dist/scopes/selector.d.ts.map +0 -1
- package/dist/scopes/selector.js +0 -121
- package/dist/scopes/selector.js.map +0 -1
- package/dist/scopes/sentences.d.ts +0 -15
- package/dist/scopes/sentences.d.ts.map +0 -1
- package/dist/scopes/sentences.js +0 -202
- package/dist/scopes/sentences.js.map +0 -1
- package/dist/scopes/types.d.ts +0 -46
- package/dist/scopes/types.d.ts.map +0 -1
- package/dist/scopes/vocabulary.d.ts +0 -16
- package/dist/scopes/vocabulary.d.ts.map +0 -1
- package/dist/scopes/vocabulary.js +0 -70
- package/dist/scopes/vocabulary.js.map +0 -1
- package/dist/types/assertions.d.ts +0 -121
- package/dist/types/assertions.d.ts.map +0 -1
- package/dist/types/reporting.d.ts +0 -32
- package/dist/types/reporting.d.ts.map +0 -1
- package/dist/types/rules.d.ts +0 -41
- package/dist/types/rules.d.ts.map +0 -1
- package/dist/types/validation.d.ts +0 -6
- package/dist/types/validation.d.ts.map +0 -1
- /package/{dist → lib}/core/auto-fix.d.ts +0 -0
- /package/{dist → lib}/core/directives.d.ts +0 -0
- /package/{dist → lib}/data/markdoc-realm-schema.d.ts +0 -0
- /package/{dist → lib}/data/proper-nouns.d.ts +0 -0
- /package/{dist → lib}/metrics/index.d.ts +0 -0
- /package/{dist → lib}/metrics/index.d.ts.map +0 -0
- /package/{dist → lib}/metrics/index.js +0 -0
- /package/{dist → lib}/metrics/index.js.map +0 -0
- /package/{dist → lib}/parser/types.d.ts +0 -0
- /package/{dist → lib}/parser/types.js +0 -0
- /package/{dist → lib}/parser/types.js.map +0 -0
- /package/{dist → lib}/rules/scope/capitalization.d.ts +0 -0
- /package/{dist → lib}/rules/scope/conditional.d.ts +0 -0
- /package/{dist → lib}/rules/scope/consistency.d.ts +0 -0
- /package/{dist → lib}/rules/scope/length.d.ts +0 -0
- /package/{dist → lib}/rules/scope/max-image-size.d.ts +0 -0
- /package/{dist → lib}/rules/scope/occurrence.d.ts +0 -0
- /package/{dist → lib}/rules/scope/pattern.d.ts +0 -0
- /package/{dist → lib}/rules/scope/repetition.d.ts +0 -0
- /package/{dist → lib}/rules/scope/semantic-line-breaks.d.ts +0 -0
- /package/{dist → lib}/rules/scope/swap.d.ts +0 -0
- /package/{dist → lib}/rules/token/blanks-around-fences.d.ts +0 -0
- /package/{dist → lib}/rules/token/blanks-around-fences.js +0 -0
- /package/{dist → lib}/rules/token/blanks-around-headings.d.ts +0 -0
- /package/{dist → lib}/rules/token/blanks-around-lists.d.ts +0 -0
- /package/{dist → lib}/rules/token/blanks-around-tables.d.ts +0 -0
- /package/{dist → lib}/rules/token/code-block-style.d.ts +0 -0
- /package/{dist → lib}/rules/token/code-block-style.js +0 -0
- /package/{dist → lib}/rules/token/code-fence-style.d.ts +0 -0
- /package/{dist → lib}/rules/token/code-fence-style.js +0 -0
- /package/{dist → lib}/rules/token/commands-show-output.d.ts +0 -0
- /package/{dist → lib}/rules/token/commands-show-output.js +0 -0
- /package/{dist → lib}/rules/token/descriptive-link-text.d.ts +0 -0
- /package/{dist → lib}/rules/token/emphasis-style.d.ts +0 -0
- /package/{dist → lib}/rules/token/emphasis-style.d.ts.map +0 -0
- /package/{dist → lib}/rules/token/emphasis-style.js +0 -0
- /package/{dist → lib}/rules/token/emphasis-style.js.map +0 -0
- /package/{dist → lib}/rules/token/fenced-code-language.d.ts +0 -0
- /package/{dist → lib}/rules/token/fenced-code-language.js +0 -0
- /package/{dist → lib}/rules/token/first-line-h1.d.ts +0 -0
- /package/{dist → lib}/rules/token/front-matter.d.ts +0 -0
- /package/{dist → lib}/rules/token/heading-increment.d.ts +0 -0
- /package/{dist → lib}/rules/token/heading-start-left.d.ts +0 -0
- /package/{dist → lib}/rules/token/heading-start-left.js +0 -0
- /package/{dist → lib}/rules/token/heading-style.d.ts +0 -0
- /package/{dist → lib}/rules/token/heading-style.js +0 -0
- /package/{dist → lib}/rules/token/hr-style.d.ts +0 -0
- /package/{dist → lib}/rules/token/hr-style.js +0 -0
- /package/{dist → lib}/rules/token/line-length.d.ts +0 -0
- /package/{dist → lib}/rules/token/link-fragments.d.ts +0 -0
- /package/{dist → lib}/rules/token/link-image-reference-definitions.d.ts +0 -0
- /package/{dist → lib}/rules/token/link-image-reference-definitions.js +0 -0
- /package/{dist → lib}/rules/token/link-image-style.d.ts +0 -0
- /package/{dist → lib}/rules/token/list-indent.d.ts +0 -0
- /package/{dist → lib}/rules/token/list-indent.js +0 -0
- /package/{dist → lib}/rules/token/list-length.d.ts +0 -0
- /package/{dist → lib}/rules/token/list-marker-space.d.ts +0 -0
- /package/{dist → lib}/rules/token/list-marker-space.js +0 -0
- /package/{dist → lib}/rules/token/markdoc-attributes.d.ts +0 -0
- /package/{dist → lib}/rules/token/markdoc-pairing.d.ts +0 -0
- /package/{dist → lib}/rules/token/markdoc-syntax.d.ts +0 -0
- /package/{dist → lib}/rules/token/markdoc-unknown-tag.d.ts +0 -0
- /package/{dist → lib}/rules/token/messages.d.ts +0 -0
- /package/{dist → lib}/rules/token/messages.d.ts.map +0 -0
- /package/{dist → lib}/rules/token/messages.js +0 -0
- /package/{dist → lib}/rules/token/messages.js.map +0 -0
- /package/{dist → lib}/rules/token/no-alt-text.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-bare-urls.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-blanks-blockquote.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-blanks-blockquote.js +0 -0
- /package/{dist → lib}/rules/token/no-duplicate-heading.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-duplicate-link-destinations.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-emphasis-as-heading.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-empty-headings.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-empty-links.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-empty-links.js +0 -0
- /package/{dist → lib}/rules/token/no-hard-tabs.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-hard-tabs.js +0 -0
- /package/{dist → lib}/rules/token/no-inline-html.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-missing-space-atx.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-missing-space-atx.d.ts.map +0 -0
- /package/{dist → lib}/rules/token/no-missing-space-atx.js +0 -0
- /package/{dist → lib}/rules/token/no-missing-space-atx.js.map +0 -0
- /package/{dist → lib}/rules/token/no-missing-space-closed-atx.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-missing-space-closed-atx.d.ts.map +0 -0
- /package/{dist → lib}/rules/token/no-missing-space-closed-atx.js +0 -0
- /package/{dist → lib}/rules/token/no-missing-space-closed-atx.js.map +0 -0
- /package/{dist → lib}/rules/token/no-multiple-blanks.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-multiple-blanks.js +0 -0
- /package/{dist → lib}/rules/token/no-multiple-space-blockquote.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-multiple-space-blockquote.d.ts.map +0 -0
- /package/{dist → lib}/rules/token/no-multiple-space-blockquote.js +0 -0
- /package/{dist → lib}/rules/token/no-multiple-space-blockquote.js.map +0 -0
- /package/{dist → lib}/rules/token/no-multiple-space-closed-atx.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-multiple-space-closed-atx.js +0 -0
- /package/{dist → lib}/rules/token/no-reversed-links.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-reversed-links.js +0 -0
- /package/{dist → lib}/rules/token/no-space-in-code.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-space-in-code.js +0 -0
- /package/{dist → lib}/rules/token/no-space-in-emphasis.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-space-in-links.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-space-in-links.js +0 -0
- /package/{dist → lib}/rules/token/no-trailing-punctuation.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-trailing-punctuation.js +0 -0
- /package/{dist → lib}/rules/token/no-trailing-spaces.d.ts +0 -0
- /package/{dist → lib}/rules/token/no-trailing-spaces.js +0 -0
- /package/{dist → lib}/rules/token/ol-prefix.d.ts +0 -0
- /package/{dist → lib}/rules/token/ol-prefix.js +0 -0
- /package/{dist → lib}/rules/token/proper-names.d.ts +0 -0
- /package/{dist → lib}/rules/token/reference-links-images.d.ts +0 -0
- /package/{dist → lib}/rules/token/reference-links-images.js +0 -0
- /package/{dist → lib}/rules/token/required-headings.d.ts +0 -0
- /package/{dist → lib}/rules/token/single-h1.d.ts +0 -0
- /package/{dist → lib}/rules/token/single-trailing-newline.d.ts +0 -0
- /package/{dist → lib}/rules/token/single-trailing-newline.d.ts.map +0 -0
- /package/{dist → lib}/rules/token/single-trailing-newline.js +0 -0
- /package/{dist → lib}/rules/token/single-trailing-newline.js.map +0 -0
- /package/{dist → lib}/rules/token/strong-style.d.ts +0 -0
- /package/{dist → lib}/rules/token/strong-style.d.ts.map +0 -0
- /package/{dist → lib}/rules/token/strong-style.js +0 -0
- /package/{dist → lib}/rules/token/strong-style.js.map +0 -0
- /package/{dist → lib}/rules/token/table-column-count.d.ts +0 -0
- /package/{dist → lib}/rules/token/table-column-count.js +0 -0
- /package/{dist → lib}/rules/token/table-column-style.d.ts +0 -0
- /package/{dist → lib}/rules/token/table-pipe-style.d.ts +0 -0
- /package/{dist → lib}/rules/token/table-pipe-style.js +0 -0
- /package/{dist → lib}/rules/token/ul-indent.d.ts +0 -0
- /package/{dist → lib}/rules/token/ul-indent.js +0 -0
- /package/{dist → lib}/rules/token/ul-style.d.ts +0 -0
- /package/{dist → lib}/rules/types.js +0 -0
- /package/{dist → lib}/rules/types.js.map +0 -0
- /package/{dist → lib}/scopes/types.js +0 -0
- /package/{dist → lib}/scopes/types.js.map +0 -0
- /package/{dist → lib}/types/assertions.js +0 -0
- /package/{dist → lib}/types/assertions.js.map +0 -0
- /package/{dist → lib}/types/index.d.ts +0 -0
- /package/{dist → lib}/types/index.d.ts.map +0 -0
- /package/{dist → lib}/types/index.js +0 -0
- /package/{dist → lib}/types/index.js.map +0 -0
- /package/{dist → lib}/types/problems.d.ts +0 -0
- /package/{dist → lib}/types/problems.d.ts.map +0 -0
- /package/{dist → lib}/types/problems.js +0 -0
- /package/{dist → lib}/types/problems.js.map +0 -0
- /package/{dist → lib}/types/reporting.js +0 -0
- /package/{dist → lib}/types/reporting.js.map +0 -0
- /package/{dist → lib}/types/rules.js +0 -0
- /package/{dist → lib}/types/rules.js.map +0 -0
- /package/{dist → lib}/types/validation.js +0 -0
- /package/{dist → lib}/types/validation.js.map +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-length.js","sourceRoot":"","sources":["../../../src/rules/token/list-length.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,MAAM,MAAM,GAAG,CAAC,KAAY,EAAW,EAAE,CACvC,KAAK,CAAC,IAAI,KAAK,aAAa,IAAI,KAAK,CAAC,IAAI,KAAK,eAA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E;YACpE,UAAU;YACV,IAAI,KAAK,GAAG,GAAG,EAAE,CAAC;gBAChB,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,WAAW,GAAG,EAAE,EAAE,CAAC,CAAC;YAC1F,CAAC;iBAAM,IAAI,GAAG,KAAK,SAAS,IAAI,KAAK,GAAG,GAAG,EAAE,CAAC;gBAC5C,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,WAAW,GAAG,EAAE,EAAE,CAAC,CAAC;YAC1F,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-marker-space.d.ts","sourceRoot":"","sources":["../../../src/rules/token/list-marker-space.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C,eAAO,MAAM,eAAe,EAAE,SAqD7B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"list-marker-space.js","sourceRoot":"","sources":["../../../src/rules/token/list-marker-space.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,CAAC,MAAM,eAAe,GAAc;IACxC,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,YAAY,CAAC;IAChC,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE;QACR,OAAO,EAAE,2BAA2B;QACpC,QAAQ,EAAE,CAAC;QACX,QAAQ,EAAE,CAAC;QACX,OAAO,EAAE,CAAC;QACV,OAAO,EAAE,CAAC;KACX;IACD,KAAK,CAAC,GAAG;QACP,MAAM,QAAQ,GAAG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WAAW,EAAE,SAAS,EAAE,GAAG,wBAAwB,CAAC;oBACvE,MAAM,YAAY,GAAG,SAAS,GAAG,WAAW,CAAC;oBAC7C,IAAI,cAAc,KAAK,YAAY,EAAE,CAAC;wBACpC,GAAG,CAAC,OAAO,CAAC;4BACV,IAAI,EAAE,SAAS;4BACf,MAAM,EAAE,WAAW;4BACnB,MAAM,EAAE,aAAa,cAAc,aAAa,YAAY,EAAE;4BAC9D,OAAO,EAAE;gCACP,UAAU,EAAE,SAAS;gCACrB,UAAU,EAAE,WAAW;gCACvB,WAAW,EAAE,YAAY;gCACzB,UAAU,EAAE,EAAE,CAAC,MAAM,CAAC,cAAc,CAAC;6BACtC;yBACF,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdoc-attributes.d.ts","sourceRoot":"","sources":["../../../src/rules/token/markdoc-attributes.ts"],"names":[],"mappings":"AAqBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAuF7C,eAAO,MAAM,iBAAiB,EAAE,SAwN/B,CAAC"}
|
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
// Schema-aware attribute validation for tags `markdoc-unknown-tag` already
|
|
2
|
-
// accepts as known (that rule owns the tag NAME itself). Detection-only.
|
|
3
|
-
// Re-parses each tag's text via `parseMarkdocSpan` because the child tokens
|
|
4
|
-
// structure.ts synthesizes carry positions but no `valueKind`/`value`/
|
|
5
|
-
// `dynamic` data.
|
|
6
|
-
//
|
|
7
|
-
// Only `tag-open`/`tag-self-closing` kinds are checked: close tags carry no
|
|
8
|
-
// attributes in Markdoc's grammar, and annotation/variable/function/malformed
|
|
9
|
-
// spans have no tag name to look up a schema with. Annotations are a known v1
|
|
10
|
-
// gap -- real Markdoc does check their attributes against the node they attach
|
|
11
|
-
// to, but no per-annotation schema is modeled here. Unknown tags are skipped
|
|
12
|
-
// too: upstream reports `tag-undefined` and no attribute errors for them, so
|
|
13
|
-
// adding attribute reports on top of `markdoc-unknown-tag`'s would be noise.
|
|
14
|
-
import { parseMarkdocSpan, } from '../../parser/markdoc/span.js';
|
|
15
|
-
import { filterByTypes } from '../../parser/index.js';
|
|
16
|
-
/**
|
|
17
|
-
* Real Markdoc merges `{ ...globalAttributes, ...schema.attributes }` before
|
|
18
|
-
* validating, so `class`/`id` are never unknown -- but a tag that declares one
|
|
19
|
-
* itself wins that merge and has it value-checked like any other attribute
|
|
20
|
-
* (four realm tags declare their own `id`: `input`, `step`, `tabs`, `toggle`).
|
|
21
|
-
* The carve-out below therefore fires only when the tag's own schema has no
|
|
22
|
-
* entry for the name, which is also why `.x`/`#x` shortcuts are always
|
|
23
|
-
* schema-valid. The global case can't be value-checked at all: Markdoc's
|
|
24
|
-
* `Class`/`Id` validators are custom classes, out of reach for a
|
|
25
|
-
* statics-only schema -- see `MarkdocAttributeSchema`'s `dynamic` comment.
|
|
26
|
-
*/
|
|
27
|
-
const GLOBAL_ATTRIBUTE_NAMES = new Set(['class', 'id']);
|
|
28
|
-
function describeValueKind(kind) {
|
|
29
|
-
if (kind === 'null')
|
|
30
|
-
return 'null';
|
|
31
|
-
const article = 'aeiou'.includes(kind[0]) ? 'an' : 'a';
|
|
32
|
-
return `${article} ${kind}`;
|
|
33
|
-
}
|
|
34
|
-
function formatEnum(values) {
|
|
35
|
-
return values.map((value) => `"${value}"`).join(', ');
|
|
36
|
-
}
|
|
37
|
-
/**
|
|
38
|
-
* Type + enum ("matches") checks for one already-known, non-dynamic,
|
|
39
|
-
* non-opaque attribute value -- shared by named attributes and the positional
|
|
40
|
-
* primary, which real Markdoc validates identically. Upstream treats the two
|
|
41
|
-
* checks as independent (a wrong-type value that also fails `matches` reports
|
|
42
|
-
* both), so this pushes up to two reports rather than short-circuiting.
|
|
43
|
-
*/
|
|
44
|
-
function checkValue(attrName, valueKind, value, attrSchema, position, reports) {
|
|
45
|
-
if (valueKind !== attrSchema.type) {
|
|
46
|
-
reports.push({
|
|
47
|
-
line: position.startLine,
|
|
48
|
-
column: position.startColumn,
|
|
49
|
-
context: `"${attrName}" must be a ${attrSchema.type} value — got ${describeValueKind(valueKind)}`,
|
|
50
|
-
});
|
|
51
|
-
}
|
|
52
|
-
if (attrSchema.enum && !attrSchema.enum.includes(String(value))) {
|
|
53
|
-
reports.push({
|
|
54
|
-
line: position.startLine,
|
|
55
|
-
column: position.startColumn,
|
|
56
|
-
context: `"${attrName}" must be one of ${formatEnum(attrSchema.enum)} — got "${String(value)}"`,
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
/** Value kinds this rule cannot statically check: `variable`/`function` are
|
|
61
|
-
* opaque at parse time, and `bareword` is already `markdoc-syntax`'s report --
|
|
62
|
-
* a type/enum verdict on a value that isn't legal Markdoc would contradict
|
|
63
|
-
* that rule's "quote the value" advice. */
|
|
64
|
-
function isOpaqueOrSyntaxOwned(kind) {
|
|
65
|
-
return kind === 'variable' || kind === 'function' || kind === 'bareword';
|
|
66
|
-
}
|
|
67
|
-
export const markdocAttributes = {
|
|
68
|
-
name: 'markdoc-attributes',
|
|
69
|
-
tags: ['markdoc'],
|
|
70
|
-
fixable: false,
|
|
71
|
-
// Bare placeholder: every `onError` call supplies the complete sentence
|
|
72
|
-
// via `context`.
|
|
73
|
-
defaults: {
|
|
74
|
-
message: '%s',
|
|
75
|
-
},
|
|
76
|
-
check(ctx) {
|
|
77
|
-
if (!ctx.markdoc)
|
|
78
|
-
return; // flag off -- no markdocTag tokens exist at all
|
|
79
|
-
const { schema } = ctx.markdoc;
|
|
80
|
-
if (!schema)
|
|
81
|
-
return; // `schema: false` -- nothing to validate attributes against
|
|
82
|
-
// One tag can produce reports from four independent checks (primary,
|
|
83
|
-
// per-attribute, missing-required, duplicate) run in whatever order is
|
|
84
|
-
// convenient to compute, so reports are collected and sorted at the end
|
|
85
|
-
// to leave this rule in document order rather than check order.
|
|
86
|
-
const reports = [];
|
|
87
|
-
for (const token of filterByTypes(ctx.tree, ['markdocTag'])) {
|
|
88
|
-
if (token.markdocKind !== 'tag-open' && token.markdocKind !== 'tag-self-closing')
|
|
89
|
-
continue;
|
|
90
|
-
const nameChild = token.children.find((child) => child.type === 'markdocTagName');
|
|
91
|
-
const tagName = nameChild?.text;
|
|
92
|
-
if (!tagName)
|
|
93
|
-
continue; // defensive only: both kinds always carry a name child
|
|
94
|
-
const tagSchema = schema.tags[tagName];
|
|
95
|
-
if (!tagSchema)
|
|
96
|
-
continue; // unknown tag -- markdoc-unknown-tag's report, not this rule's
|
|
97
|
-
const attributes = tagSchema.attributes ?? {};
|
|
98
|
-
const parsed = parseMarkdocSpan(token.text);
|
|
99
|
-
// Defensive only: `token.markdocKind` came from this same parse.
|
|
100
|
-
if (parsed.kind !== 'tag-open' && parsed.kind !== 'tag-self-closing')
|
|
101
|
-
continue;
|
|
102
|
-
// ---- primary: Markdoc's positional value slot, validated against the
|
|
103
|
-
// schema attribute literally named `primary`. Checked before the
|
|
104
|
-
// named-attribute loop only because its span offset is always earlier;
|
|
105
|
-
// the final sort makes that ordering non-load-bearing.
|
|
106
|
-
let primaryPresent = false;
|
|
107
|
-
// Hoisted out of the branch below: the duplicate-attribute walk needs
|
|
108
|
-
// this position too.
|
|
109
|
-
const primaryToken = token.children.find((child) => child.type === 'markdocTagPrimary');
|
|
110
|
-
if (parsed.primary) {
|
|
111
|
-
primaryPresent = true;
|
|
112
|
-
const { valueKind, value } = parsed.primary;
|
|
113
|
-
if (!isOpaqueOrSyntaxOwned(valueKind)) {
|
|
114
|
-
const position = primaryToken ?? token;
|
|
115
|
-
const primarySchema = attributes.primary;
|
|
116
|
-
if (!primarySchema) {
|
|
117
|
-
// Upstream treats a primary value on a tag that declares no
|
|
118
|
-
// `primary` attribute like any other undeclared name, so this is
|
|
119
|
-
// the "unknown attribute" class -- `warn`, per AttributeReport.
|
|
120
|
-
reports.push({
|
|
121
|
-
line: position.startLine,
|
|
122
|
-
column: position.startColumn,
|
|
123
|
-
context: `"primary" is not a known attribute of "${tagName}" — check for a typo`,
|
|
124
|
-
severity: 'warn',
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
else if (!primarySchema.dynamic) {
|
|
128
|
-
checkValue('primary', valueKind, value, primarySchema, position, reports);
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
// ---- named attributes. Real Markdoc validates the MERGED
|
|
133
|
-
// last-write-wins attributes object, not the raw source list, so
|
|
134
|
-
// `{% t a=1 a=2 %}` with `a` undeclared reports `attribute-undefined`
|
|
135
|
-
// once, not twice. `lastByName` reproduces that collapse: the
|
|
136
|
-
// unknown/type/enum checks below fire once per NAME, on the last
|
|
137
|
-
// occurrence's value and position. The separate duplicate pass further
|
|
138
|
-
// down still walks every raw occurrence, since it needs the repetition
|
|
139
|
-
// this map erases.
|
|
140
|
-
const attributeTokens = token.children.filter((child) => child.type === 'markdocAttribute');
|
|
141
|
-
// `index` is carried alongside the pair so the value-position lookup in
|
|
142
|
-
// the loop is an O(1) array read rather than an `indexOf` scan per
|
|
143
|
-
// entry -- otherwise O(n²) for a long attribute list.
|
|
144
|
-
const lastByName = new Map();
|
|
145
|
-
parsed.attributes.forEach((attribute, index) => {
|
|
146
|
-
const attributeToken = attributeTokens[index];
|
|
147
|
-
const nameToken = attributeToken?.children.find((child) => child.type === 'markdocAttributeName') ??
|
|
148
|
-
attributeToken ??
|
|
149
|
-
token;
|
|
150
|
-
lastByName.set(attribute.name, { attribute, index, position: nameToken });
|
|
151
|
-
});
|
|
152
|
-
for (const [attrName, entry] of lastByName) {
|
|
153
|
-
const { attribute, index: attributeIndex, position: nameTokenPos } = entry;
|
|
154
|
-
const attrSchema = attributes[attrName];
|
|
155
|
-
if (!attrSchema) {
|
|
156
|
-
// `class`/`id` are never "unknown" when the tag itself declares no
|
|
157
|
-
// entry for the name; a tag that does declare its own takes the
|
|
158
|
-
// ordinary declared-attribute path (see `GLOBAL_ATTRIBUTE_NAMES`).
|
|
159
|
-
if (GLOBAL_ATTRIBUTE_NAMES.has(attrName))
|
|
160
|
-
continue;
|
|
161
|
-
// `warn` -- the "unknown attribute" class, per AttributeReport.
|
|
162
|
-
reports.push({
|
|
163
|
-
line: nameTokenPos.startLine,
|
|
164
|
-
column: nameTokenPos.startColumn,
|
|
165
|
-
context: `"${attrName}" is not a known attribute of "${tagName}" — check for a typo`,
|
|
166
|
-
severity: 'warn',
|
|
167
|
-
});
|
|
168
|
-
continue;
|
|
169
|
-
}
|
|
170
|
-
if (attrSchema.dynamic)
|
|
171
|
-
continue; // value checks skip dynamic attributes (see schema.ts)
|
|
172
|
-
if (isOpaqueOrSyntaxOwned(attribute.valueKind))
|
|
173
|
-
continue;
|
|
174
|
-
// Value checks report at the value's own position, not the name's --
|
|
175
|
-
// the same split `markdoc-syntax` uses for its bareword check.
|
|
176
|
-
const attributeToken = attributeTokens[attributeIndex];
|
|
177
|
-
const valueTokenPos = attributeToken?.children.find((child) => child.type === 'markdocAttributeValue') ??
|
|
178
|
-
attributeToken ??
|
|
179
|
-
token;
|
|
180
|
-
checkValue(attrName, attribute.valueKind, attribute.value, attrSchema, valueTokenPos, reports);
|
|
181
|
-
}
|
|
182
|
-
// ---- missing required. Unlike the type/enum checks above, this runs
|
|
183
|
-
// even for `dynamic` attributes: upstream enforces `required` purely on
|
|
184
|
-
// absence, independent of `type`/`matches`/a tag-level `validate()`.
|
|
185
|
-
// The realm schema has attributes that are both `required` and
|
|
186
|
-
// `dynamic` (`diagram.file`, `diagram.type`, `code-snippet.file`), so
|
|
187
|
-
// skipping those would silently diverge from upstream. (`partial.file`
|
|
188
|
-
// carries no `required` in the composed schema at all.)
|
|
189
|
-
//
|
|
190
|
-
// Presence folds three sources: named attributes, the positional
|
|
191
|
-
// primary (any value kind -- even a `bareword`, whose shape is
|
|
192
|
-
// `markdoc-syntax`'s report; it still occupies the slot, so `required`
|
|
193
|
-
// is satisfied and nothing double-reports), and class/id shortcuts.
|
|
194
|
-
const presentNames = new Set(lastByName.keys());
|
|
195
|
-
if (primaryPresent)
|
|
196
|
-
presentNames.add('primary');
|
|
197
|
-
for (const shortcut of parsed.shortcuts ?? [])
|
|
198
|
-
presentNames.add(shortcut.kind);
|
|
199
|
-
for (const [attrName, attrSchema] of Object.entries(attributes)) {
|
|
200
|
-
if (!attrSchema.required || presentNames.has(attrName))
|
|
201
|
-
continue;
|
|
202
|
-
reports.push({
|
|
203
|
-
line: token.startLine,
|
|
204
|
-
column: token.startColumn,
|
|
205
|
-
context: `"${tagName}" is missing its required "${attrName}" attribute`,
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
// ---- duplicate-attribute. One pass over the positional primary, every
|
|
209
|
-
// named attribute and every shortcut IN SOURCE ORDER, replicating real
|
|
210
|
-
// Markdoc's own parser, the only place it raises this error:
|
|
211
|
-
//
|
|
212
|
-
// - The positional primary, a named attribute and an `id` shortcut all
|
|
213
|
-
// go through one branch upstream, which checks whether the name is
|
|
214
|
-
// already set, reports if so, then marks it set either way. The
|
|
215
|
-
// primary always sits at the lowest offset, so it can only ever be
|
|
216
|
-
// the item something else collides WITH, never the collider.
|
|
217
|
-
// - A `class` shortcut takes a separate branch that never checks -- it
|
|
218
|
-
// only merges into the `class` map -- so class shortcuts never
|
|
219
|
-
// collide with each other.
|
|
220
|
-
// - Hence an order-dependent asymmetry: `{% t .a class="b" %}` reports
|
|
221
|
-
// a duplicate, while `{% t class="b" .a %}` reports nothing. Walking
|
|
222
|
-
// in true source order reproduces both verdicts; direction-agnostic
|
|
223
|
-
// set membership would not.
|
|
224
|
-
const shortcutTokens = token.children.filter((child) => child.type === 'markdocShortcut');
|
|
225
|
-
const duplicateItems = [
|
|
226
|
-
...(parsed.primary
|
|
227
|
-
? [
|
|
228
|
-
{
|
|
229
|
-
offset: parsed.primary.valueStart,
|
|
230
|
-
checked: true,
|
|
231
|
-
name: 'primary',
|
|
232
|
-
position: primaryToken ?? token,
|
|
233
|
-
},
|
|
234
|
-
]
|
|
235
|
-
: []),
|
|
236
|
-
...parsed.attributes.map((attribute, index) => ({
|
|
237
|
-
offset: attribute.nameStart,
|
|
238
|
-
checked: true,
|
|
239
|
-
name: attribute.name,
|
|
240
|
-
position: attributeTokens[index]?.children.find((child) => child.type === 'markdocAttributeName') ??
|
|
241
|
-
attributeTokens[index] ??
|
|
242
|
-
token,
|
|
243
|
-
})),
|
|
244
|
-
...(parsed.shortcuts ?? []).map((shortcut, index) => ({
|
|
245
|
-
offset: shortcut.start,
|
|
246
|
-
checked: shortcut.kind === 'id',
|
|
247
|
-
name: shortcut.kind, // the schema attribute it folds into, not its own text
|
|
248
|
-
position: shortcutTokens[index] ?? token,
|
|
249
|
-
})),
|
|
250
|
-
];
|
|
251
|
-
duplicateItems.sort((a, b) => a.offset - b.offset);
|
|
252
|
-
const setNames = new Set();
|
|
253
|
-
for (const item of duplicateItems) {
|
|
254
|
-
if (item.checked && setNames.has(item.name)) {
|
|
255
|
-
reports.push({
|
|
256
|
-
line: item.position.startLine,
|
|
257
|
-
column: item.position.startColumn,
|
|
258
|
-
context: `"${item.name}" is already set earlier on this tag`,
|
|
259
|
-
});
|
|
260
|
-
}
|
|
261
|
-
setNames.add(item.name);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
reports.sort((a, b) => a.line - b.line || a.column - b.column);
|
|
265
|
-
for (const report of reports)
|
|
266
|
-
ctx.onError(report);
|
|
267
|
-
},
|
|
268
|
-
};
|
|
269
|
-
//# sourceMappingURL=markdoc-attributes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdoc-attributes.js","sourceRoot":"","sources":["../../../src/rules/token/markdoc-attributes.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,yEAAyE;AACzE,4EAA4E;AAC5E,uEAAuE;AACvE,kBAAkB;AAClB,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,8EAA8E;AAC9E,+EAA+E;AAC/E,6EAA6E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C;gBACL,CAAC;gBACD,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC1B,CAAC;QACH,CAAC;QAED,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC;QAC/D,KAAK,MAAM,MAAM,IAAI,OAAO;YAAE,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IACpD,CAAC;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdoc-pairing.d.ts","sourceRoot":"","sources":["../../../src/rules/token/markdoc-pairing.ts"],"names":[],"mappings":"AAoBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAiB7C,eAAO,MAAM,cAAc,EAAE,SAsE5B,CAAC"}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The tag's own name, from its synthesized `markdocTagName` child. Only
|
|
3
|
-
* `tag-open`/`tag-close` tokens ever reach a pairing bucket and both always
|
|
4
|
-
* carry a name child, so the `''` fallback is defensive only.
|
|
5
|
-
*/
|
|
6
|
-
function tagName(token) {
|
|
7
|
-
return token.children.find((child) => child.type === 'markdocTagName')?.text ?? '';
|
|
8
|
-
}
|
|
9
|
-
export const markdocPairing = {
|
|
10
|
-
name: 'markdoc-pairing',
|
|
11
|
-
tags: ['markdoc'],
|
|
12
|
-
fixable: false,
|
|
13
|
-
defaults: {
|
|
14
|
-
message: '%s',
|
|
15
|
-
},
|
|
16
|
-
check(ctx) {
|
|
17
|
-
if (!ctx.markdoc)
|
|
18
|
-
return; // flag off -- no markdocTag tokens exist to pair at all
|
|
19
|
-
const { pairing, selfClosingTags } = ctx.markdoc;
|
|
20
|
-
// Each bucket below has its own order, so emitting inline would
|
|
21
|
-
// interleave lines (a line-90 unclosed before a line-12 orphan). Reports
|
|
22
|
-
// are collected and sorted into document order before they leave the rule.
|
|
23
|
-
const reports = [];
|
|
24
|
-
for (const open of pairing.unclosed) {
|
|
25
|
-
reports.push({
|
|
26
|
-
token: open,
|
|
27
|
-
context: `"${tagName(open)}" is opened here but never closed before the document ends`,
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
for (const close of pairing.orphaned) {
|
|
31
|
-
// The open may exist but be malformed (e.g. a multi-line tag inside a
|
|
32
|
-
// blockquote) rather than genuinely absent, so the message must not
|
|
33
|
-
// claim the open is missing.
|
|
34
|
-
reports.push({
|
|
35
|
-
token: close,
|
|
36
|
-
context: `"/${tagName(close)}" close tag found, but no well-formed matching open was found`,
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
for (const pair of pairing.crossed) {
|
|
40
|
-
reports.push({
|
|
41
|
-
token: pair.open,
|
|
42
|
-
context: `"${tagName(pair.open)}" and its close are interleaved (crossed) with another tag pair instead of properly nested — Markdoc requires tags to nest`,
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
for (const open of pairing.voidMissingSlash) {
|
|
46
|
-
const name = tagName(open);
|
|
47
|
-
reports.push({ token: open, context: `"${name}" is self-closing — write {% ${name} /%}` });
|
|
48
|
-
}
|
|
49
|
-
// Self-closing tag used with an explicit close, detected from `pairs`
|
|
50
|
-
// since no bucket covers it. Without a schema the set is empty, which
|
|
51
|
-
// makes this inert just as `voidMissingSlash` already is.
|
|
52
|
-
if (selfClosingTags.size > 0) {
|
|
53
|
-
for (const pair of pairing.pairs) {
|
|
54
|
-
const name = tagName(pair.open);
|
|
55
|
-
if (!selfClosingTags.has(name))
|
|
56
|
-
continue;
|
|
57
|
-
reports.push({
|
|
58
|
-
token: pair.open,
|
|
59
|
-
context: `"${name}" is self-closing and must not be used with a matching {% /${name} %} close — write {% ${name} /%} instead`,
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
reports.sort((a, b) => a.token.startLine - b.token.startLine || a.token.startColumn - b.token.startColumn);
|
|
64
|
-
for (const report of reports) {
|
|
65
|
-
ctx.onError({
|
|
66
|
-
line: report.token.startLine,
|
|
67
|
-
column: report.token.startColumn,
|
|
68
|
-
context: report.context,
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
},
|
|
72
|
-
};
|
|
73
|
-
//# sourceMappingURL=markdoc-pairing.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdoc-pairing.js","sourceRoot":"","sources":["../../../src/rules/token/markdoc-pairing.ts"],"names":[],"mappings":"AA4BA;;;;GAIG;AACH,SAAS,OAAO,CAAC,KAAY;IAC3B,OAAO,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,gBAAgB,CAAC,EAAE,IAAI,IAAI,EAAE,CAAC;AACrF,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAc;IACvC,IAAI,EAAE,iBAAiB;IACvB,IAAI,EAAE,CAAC,SAAS,CAAC;IACjB,OAAO,EAAE,KAAK;IACd,QAAQ,EAAE;QACR,OAAO,EAAE,IAAI;KACd;IACD,KAAK,CAAC,GAAG;QACP,IAAI,CAAC,GAAG,CAAC,OAAO;YAAE,OAAO,CAAC,wDAAwD;QAClF,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,GAAG,GAAG,CAAC,OAAO,CAAC;QAEjD,gEAAgE;QAChE,yEAAyE;QACzE,2EAA2E;QAC3E,MAAM,OAAO,GAAoB,EAAE,CAAC;QAEpC,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,QAAQ,EAAE,CAAC;YACpC,OAAO,CAAC,IAAI,CAAC;gBACX,KAAK,EAAE,IAAI;gBACX,OAAO,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC,4DAA4D;aACvF,CAAC,CAAC;QACL,CAAC;QAED,KAAK,MAAM,KAAK,IAAI,OAA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,CAAC,CAAC,KAAK,CAAC,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,SAAS,IAAI,CAAC,CAAC,KAAK,CAAC,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,WAAW,CAC7F,CAAC;QACF,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;YAC7B,GAAG,CAAC,OAAO,CAAC;gBACV,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,SAAS;gBAC5B,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,WAAW;gBAChC,OAAO,EAAE,MAAM,CAAC,OAAO;aACxB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdoc-syntax.d.ts","sourceRoot":"","sources":["../../../src/rules/token/markdoc-syntax.ts"],"names":[],"mappings":"AA8BA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,eAAO,MAAM,aAAa,EAAE,SAgG3B,CAAC"}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
// Grammar-level Markdoc syntax validation -- detection-only. Uses
|
|
2
|
-
// `markdocKind` as a cheap short-circuit, then re-parses each tag's own text
|
|
3
|
-
// via `parseMarkdocSpan` for the semantic detail the `Token` never retains:
|
|
4
|
-
// the parse `reason` and each attribute/primary's `valueKind`. Re-parsing
|
|
5
|
-
// keeps this rule from forcing a `reason`/`attributes` field onto the `Token`
|
|
6
|
-
// shape that it would be the only consumer of.
|
|
7
|
-
//
|
|
8
|
-
// Every check here is GRAMMAR-level, so it fires the same way on a custom tag
|
|
9
|
-
// and under `schema: false` as under the realm schema -- real Markdoc rejects
|
|
10
|
-
// these shapes regardless of any schema. That is why this rule never reads
|
|
11
|
-
// `ctx.markdoc.schema`, only the flag-is-on signal.
|
|
12
|
-
//
|
|
13
|
-
// Reports:
|
|
14
|
-
// - `malformed` spans, with the parser's `reason`, positioned at the offending
|
|
15
|
-
// character when `reasonOffset` gives one.
|
|
16
|
-
// - close tags carrying attributes: Markdoc's close-tag production is `'/'
|
|
17
|
-
// TagName` only, but recheck's span parser parses an attribute list anyway,
|
|
18
|
-
// so this rule is what surfaces it.
|
|
19
|
-
// - bareword values in an attribute OR the positional `primary` slot, both
|
|
20
|
-
// critical parse errors upstream. `primary` is checked as its own field
|
|
21
|
-
// because iterating `attributes` alone would miss it.
|
|
22
|
-
//
|
|
23
|
-
// Deliberately never reports: `{%- -%}` trim markers (stripped before parsing
|
|
24
|
-
// sees them), glued attributes (`a=1b=2`, parsed as two attributes),
|
|
25
|
-
// duplicate attributes (`markdoc-attributes` owns the class/id-fold-aware
|
|
26
|
-
// version), or annotation/variable/function kinds (out of scope; skipped
|
|
27
|
-
// explicitly below rather than relying on their attribute lists being empty).
|
|
28
|
-
import { filterByTypes } from '../../parser/index.js';
|
|
29
|
-
import { parseMarkdocSpan } from '../../parser/markdoc/span.js';
|
|
30
|
-
import { offsetToPosition } from '../../parser/markdoc/structure.js';
|
|
31
|
-
export const markdocSyntax = {
|
|
32
|
-
name: 'markdoc-syntax',
|
|
33
|
-
tags: ['markdoc'],
|
|
34
|
-
fixable: false,
|
|
35
|
-
defaults: {
|
|
36
|
-
message: 'Markdoc syntax error',
|
|
37
|
-
},
|
|
38
|
-
check(ctx) {
|
|
39
|
-
// Flag off: no `markdocTag` tokens exist in the tree at all, so this is a
|
|
40
|
-
// defensive no-op rather than something the loop below must handle.
|
|
41
|
-
if (!ctx.markdoc)
|
|
42
|
-
return;
|
|
43
|
-
for (const token of filterByTypes(ctx.tree, ['markdocTag'])) {
|
|
44
|
-
// Annotation/variable/function bodies are out of scope. Skipping up
|
|
45
|
-
// front is cheaper and clearer than relying on their attribute lists
|
|
46
|
-
// coming back empty.
|
|
47
|
-
if (token.markdocKind === 'annotation' ||
|
|
48
|
-
token.markdocKind === 'variable' ||
|
|
49
|
-
token.markdocKind === 'function') {
|
|
50
|
-
continue;
|
|
51
|
-
}
|
|
52
|
-
const parsed = parseMarkdocSpan(token.text);
|
|
53
|
-
if (parsed.kind === 'malformed') {
|
|
54
|
-
// `reasonOffset` is relative to the span text, so it is converted to
|
|
55
|
-
// a document position instead of quoted in the message -- a
|
|
56
|
-
// span-relative "at position 7" next to the report's own absolute
|
|
57
|
-
// column reads as a contradiction. When the scanner had no single
|
|
58
|
-
// offending position (empty body, missing delimiter), the tag's own
|
|
59
|
-
// start stands in.
|
|
60
|
-
const position = parsed.reasonOffset === undefined
|
|
61
|
-
? { line: token.startLine, column: token.startColumn }
|
|
62
|
-
: offsetToPosition(token, parsed.reasonOffset);
|
|
63
|
-
ctx.onError({
|
|
64
|
-
line: position.line,
|
|
65
|
-
column: position.column,
|
|
66
|
-
context: token.text,
|
|
67
|
-
detail: parsed.reason,
|
|
68
|
-
});
|
|
69
|
-
continue; // malformed spans carry no attributes/primary to check further
|
|
70
|
-
}
|
|
71
|
-
// Reported at the first attribute's own position when that synthesized
|
|
72
|
-
// child exists, falling back to the tag's start.
|
|
73
|
-
if (parsed.kind === 'tag-close' && parsed.attributes.length > 0) {
|
|
74
|
-
const firstAttribute = token.children.find((child) => child.type === 'markdocAttribute');
|
|
75
|
-
const position = firstAttribute ?? token;
|
|
76
|
-
ctx.onError({
|
|
77
|
-
line: position.startLine,
|
|
78
|
-
column: position.startColumn,
|
|
79
|
-
context: token.text,
|
|
80
|
-
detail: `close tag "{% /${parsed.name} %}" must not carry attributes — Markdoc's close-tag syntax accepts none`,
|
|
81
|
-
});
|
|
82
|
-
// Stop here: the fix just reported is to delete the whole attribute
|
|
83
|
-
// list, so also advising a reader to quote a bareword inside it would
|
|
84
|
-
// contradict that.
|
|
85
|
-
continue;
|
|
86
|
-
}
|
|
87
|
-
// Primary is checked before the attribute loop because it sits right
|
|
88
|
-
// after the tag name, so its offset is always the earlier one. This rule
|
|
89
|
-
// emits as it goes and never sorts, so check order is emission order.
|
|
90
|
-
if (parsed.primary?.valueKind === 'bareword' && parsed.name !== null) {
|
|
91
|
-
const primaryToken = token.children.find((child) => child.type === 'markdocTagPrimary');
|
|
92
|
-
const position = primaryToken ?? token;
|
|
93
|
-
ctx.onError({
|
|
94
|
-
line: position.startLine,
|
|
95
|
-
column: position.startColumn,
|
|
96
|
-
context: token.text,
|
|
97
|
-
detail: `quote the value: {% ${parsed.name} "${String(parsed.primary.value)}" %}`,
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
// structure.ts synthesizes attribute children in the same source order
|
|
101
|
-
// as `parsed.attributes`, so index-aligning the two arrays is safe and
|
|
102
|
-
// reuses the offset-to-position math structure.ts already did.
|
|
103
|
-
const attributeTokens = token.children.filter((child) => child.type === 'markdocAttribute');
|
|
104
|
-
parsed.attributes.forEach((attribute, index) => {
|
|
105
|
-
if (attribute.valueKind !== 'bareword')
|
|
106
|
-
return;
|
|
107
|
-
const valueToken = attributeTokens[index]?.children.find((child) => child.type === 'markdocAttributeValue');
|
|
108
|
-
const position = valueToken ?? token;
|
|
109
|
-
ctx.onError({
|
|
110
|
-
line: position.startLine,
|
|
111
|
-
column: position.startColumn,
|
|
112
|
-
context: token.text,
|
|
113
|
-
detail: `quote the value: ${attribute.name}="${String(attribute.value)}"`,
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
},
|
|
118
|
-
};
|
|
119
|
-
//# sourceMappingURL=markdoc-syntax.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdoc-syntax.js","sourceRoot":"","sources":["../../../src/rules/token/markdoc-syntax.ts"],"names":[],"mappings":"AAAA,kEAAkE;AAClE,6EAA6E;AAC7E,4EAA4E;AAC5E,0EAA0E;AAC1E,8EAA8E;AAC9E,+CAA+C;AAC/C,EAAE;AACF,8EAA8E;AAC9E,8EAA8E;AAC9E,2EAA2E;AAC3E,oDAAoD;AACpD,EAAE;AACF,WAAW;AACX,+EAA+E;AAC/E,6CAA6C;AAC7C,2EAA2E;AAC3E,8EAA8E;AAC9E,sCAAsC;AACtC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ules/token/markdoc-unknown-tag.ts"],"names":[],"mappings":"AAiBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAgB7C,eAAO,MAAM,iBAAiB,EAAE,SAsC/B,CAAC"}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
// Schema-aware "is this even a real tag" check; `markdoc-attributes` validates
|
|
2
|
-
// a known tag's attribute list. Detection-only, and only ever a warning: an
|
|
3
|
-
// unknown tag is often intentional -- a project's own tag, or one the schema
|
|
4
|
-
// generator couldn't statically resolve (see the carve-out below).
|
|
5
|
-
//
|
|
6
|
-
// `ctx.markdoc.schema` is `null` under `schema: false`, which makes this rule
|
|
7
|
-
// inert (parsing and pairing still run). A custom tag declared via
|
|
8
|
-
// `extend.tags` is merged into `schema.tags` by `resolveMarkdocConfig` before
|
|
9
|
-
// it reaches here, so it validates as known with no extra plumbing.
|
|
10
|
-
//
|
|
11
|
-
// Only `tag-open`/`tag-self-closing` kinds are checked: real Markdoc raises
|
|
12
|
-
// exactly one `tag-undefined` per unknown tag node, at the open, so checking
|
|
13
|
-
// the matching close would double-report the same name.
|
|
14
|
-
// `annotation`/`variable`/`function` kinds carry no tag name at all and never
|
|
15
|
-
// reach Markdoc's tag lookup either way, and `malformed` spans have no
|
|
16
|
-
// reliably parseable name and are `markdoc-syntax`'s report already.
|
|
17
|
-
import { filterByTypes } from '../../parser/index.js';
|
|
18
|
-
/**
|
|
19
|
-
* Realm registers `schemaDefinition` inline in its own markdoc options, not in
|
|
20
|
-
* the tag module `scripts/generate-markdoc-schema.mjs` reads, so it can never
|
|
21
|
-
* appear in `MARKDOC_REALM_SCHEMA` even though every Realm build has it.
|
|
22
|
-
* Without this carve-out the rule would warn on an always-valid tag name.
|
|
23
|
-
*/
|
|
24
|
-
const KNOWN_UNKNOWN_TAGS = new Set(['schemaDefinition']);
|
|
25
|
-
export const markdocUnknownTag = {
|
|
26
|
-
name: 'markdoc-unknown-tag',
|
|
27
|
-
tags: ['markdoc'],
|
|
28
|
-
fixable: false,
|
|
29
|
-
// Bare placeholder: every `onError` call supplies the complete sentence via
|
|
30
|
-
// `context`, so tests can assert whole messages with `toBe`.
|
|
31
|
-
defaults: {
|
|
32
|
-
message: '%s',
|
|
33
|
-
},
|
|
34
|
-
check(ctx) {
|
|
35
|
-
if (!ctx.markdoc)
|
|
36
|
-
return; // flag off -- no markdocTag tokens exist at all
|
|
37
|
-
const { schema } = ctx.markdoc;
|
|
38
|
-
if (!schema)
|
|
39
|
-
return; // `schema: false` -- nothing to check tag names against
|
|
40
|
-
// Collected then sorted rather than reported inline: `tree.flat` happens
|
|
41
|
-
// to yield `markdocTag` tokens in document order today, but that is not a
|
|
42
|
-
// guarantee this rule should lean on silently.
|
|
43
|
-
const reports = [];
|
|
44
|
-
for (const token of filterByTypes(ctx.tree, ['markdocTag'])) {
|
|
45
|
-
if (token.markdocKind !== 'tag-open' && token.markdocKind !== 'tag-self-closing')
|
|
46
|
-
continue;
|
|
47
|
-
const nameChild = token.children.find((child) => child.type === 'markdocTagName');
|
|
48
|
-
const name = nameChild?.text;
|
|
49
|
-
if (!name)
|
|
50
|
-
continue; // defensive only: both kinds always carry a name child
|
|
51
|
-
if (schema.tags[name] || KNOWN_UNKNOWN_TAGS.has(name))
|
|
52
|
-
continue;
|
|
53
|
-
reports.push({
|
|
54
|
-
line: token.startLine,
|
|
55
|
-
column: token.startColumn,
|
|
56
|
-
context: `"${name}" is not a known Markdoc tag — check for a typo, or declare it via "extend.tags" if intentional`,
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
reports.sort((a, b) => a.line - b.line || a.column - b.column);
|
|
60
|
-
for (const report of reports)
|
|
61
|
-
ctx.onError(report);
|
|
62
|
-
},
|
|
63
|
-
};
|
|
64
|
-
//# sourceMappingURL=markdoc-unknown-tag.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"markdoc-unknown-tag.js","sourceRoot":"","sources":["../../../src/rules/token/markdoc-unknown-tag.ts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