chaffjs 0.18.0 → 0.20.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 +127 -53
- package/bin/chaff.js +17 -2
- package/dist/acronym-expansions.d.ts +26 -0
- package/dist/acronym-expansions.d.ts.map +1 -0
- package/dist/acronym-expansions.js +88 -0
- package/dist/acronym-expansions.js.map +1 -0
- package/dist/announced-count.d.ts.map +1 -1
- package/dist/announced-count.js +44 -10
- package/dist/announced-count.js.map +1 -1
- package/dist/announced-list.d.ts +30 -0
- package/dist/announced-list.d.ts.map +1 -0
- package/dist/announced-list.js +95 -0
- package/dist/announced-list.js.map +1 -0
- package/dist/api.d.ts +168 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +10 -0
- package/dist/api.js.map +1 -0
- package/dist/baseline.d.ts +11 -2
- package/dist/baseline.d.ts.map +1 -1
- package/dist/baseline.js +13 -4
- package/dist/baseline.js.map +1 -1
- package/dist/check-source.d.ts +32 -0
- package/dist/check-source.d.ts.map +1 -0
- package/dist/check-source.js +50 -0
- package/dist/check-source.js.map +1 -0
- package/dist/checks.js +3 -3
- package/dist/checks.js.map +1 -1
- package/dist/cli-args.d.ts +4 -0
- package/dist/cli-args.d.ts.map +1 -1
- package/dist/cli-args.js +6 -1
- package/dist/cli-args.js.map +1 -1
- package/dist/cli-text.d.ts +3 -3
- package/dist/cli-text.d.ts.map +1 -1
- package/dist/cli-text.js +27 -18
- package/dist/cli-text.js.map +1 -1
- package/dist/cli.d.ts +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +86 -93
- package/dist/cli.js.map +1 -1
- package/dist/closing-paragraph.d.ts +7 -0
- package/dist/closing-paragraph.d.ts.map +1 -0
- package/dist/closing-paragraph.js +22 -0
- package/dist/closing-paragraph.js.map +1 -0
- package/dist/commands/compare.d.ts +11 -1
- package/dist/commands/compare.d.ts.map +1 -1
- package/dist/commands/compare.js +12 -18
- package/dist/commands/compare.js.map +1 -1
- package/dist/commands/document-commands.d.ts +9 -0
- package/dist/commands/document-commands.d.ts.map +1 -0
- package/dist/commands/document-commands.js +17 -0
- package/dist/commands/document-commands.js.map +1 -0
- package/dist/commands/eval.d.ts.map +1 -1
- package/dist/commands/eval.js +5 -4
- package/dist/commands/eval.js.map +1 -1
- package/dist/commands/facts.d.ts +8 -0
- package/dist/commands/facts.d.ts.map +1 -0
- package/dist/commands/facts.js +30 -0
- package/dist/commands/facts.js.map +1 -0
- package/dist/commands/feedback.d.ts +10 -0
- package/dist/commands/feedback.d.ts.map +1 -1
- package/dist/commands/feedback.js +25 -1
- package/dist/commands/feedback.js.map +1 -1
- package/dist/commands/fix-plan.d.ts +13 -0
- package/dist/commands/fix-plan.d.ts.map +1 -0
- package/dist/commands/fix-plan.js +46 -0
- package/dist/commands/fix-plan.js.map +1 -0
- package/dist/commands/grade-baseline.d.ts +15 -0
- package/dist/commands/grade-baseline.d.ts.map +1 -0
- package/dist/commands/grade-baseline.js +38 -0
- package/dist/commands/grade-baseline.js.map +1 -0
- package/dist/commands/grade.d.ts +19 -0
- package/dist/commands/grade.d.ts.map +1 -0
- package/dist/commands/grade.js +160 -0
- package/dist/commands/grade.js.map +1 -0
- package/dist/commands/outline.d.ts +8 -0
- package/dist/commands/outline.d.ts.map +1 -0
- package/dist/commands/outline.js +44 -0
- package/dist/commands/outline.js.map +1 -0
- package/dist/commands/read-document.d.ts +17 -0
- package/dist/commands/read-document.d.ts.map +1 -0
- package/dist/commands/read-document.js +22 -0
- package/dist/commands/read-document.js.map +1 -0
- package/dist/commands/suppressions.d.ts +7 -0
- package/dist/commands/suppressions.d.ts.map +1 -0
- package/dist/commands/suppressions.js +9 -0
- package/dist/commands/suppressions.js.map +1 -0
- package/dist/commands/test.js +3 -3
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/tree.d.ts +2 -0
- package/dist/commands/tree.d.ts.map +1 -1
- package/dist/commands/tree.js +19 -12
- package/dist/commands/tree.js.map +1 -1
- package/dist/compare/clock-time.d.ts.map +1 -1
- package/dist/compare/clock-time.js +5 -2
- package/dist/compare/clock-time.js.map +1 -1
- package/dist/compare/distinct.d.ts +9 -0
- package/dist/compare/distinct.d.ts.map +1 -0
- package/dist/compare/distinct.js +18 -0
- package/dist/compare/distinct.js.map +1 -0
- package/dist/compare/extract.d.ts.map +1 -1
- package/dist/compare/extract.js +7 -5
- package/dist/compare/extract.js.map +1 -1
- package/dist/compare/fact-key.d.ts +17 -0
- package/dist/compare/fact-key.d.ts.map +1 -0
- package/dist/compare/fact-key.js +25 -0
- package/dist/compare/fact-key.js.map +1 -0
- package/dist/compare/fact-text.d.ts +5 -0
- package/dist/compare/fact-text.d.ts.map +1 -1
- package/dist/compare/fact-text.js +16 -2
- package/dist/compare/fact-text.js.map +1 -1
- package/dist/compare/facts-render.d.ts +17 -0
- package/dist/compare/facts-render.d.ts.map +1 -0
- package/dist/compare/facts-render.js +43 -0
- package/dist/compare/facts-render.js.map +1 -0
- package/dist/compare/facts-text.d.ts +15 -0
- package/dist/compare/facts-text.d.ts.map +1 -0
- package/dist/compare/facts-text.js +27 -0
- package/dist/compare/facts-text.js.map +1 -0
- package/dist/compare/match.d.ts +1 -0
- package/dist/compare/match.d.ts.map +1 -1
- package/dist/compare/match.js +1 -1
- package/dist/compare/match.js.map +1 -1
- package/dist/compare/outcome.d.ts +4 -1
- package/dist/compare/outcome.d.ts.map +1 -1
- package/dist/compare/outcome.js +10 -4
- package/dist/compare/outcome.js.map +1 -1
- package/dist/compare/proper-nouns.d.ts +5 -3
- package/dist/compare/proper-nouns.d.ts.map +1 -1
- package/dist/compare/proper-nouns.js +10 -8
- package/dist/compare/proper-nouns.js.map +1 -1
- package/dist/compare/render.d.ts +4 -0
- package/dist/compare/render.d.ts.map +1 -1
- package/dist/compare/render.js +2 -2
- package/dist/compare/render.js.map +1 -1
- package/dist/compare/text-atoms.d.ts +5 -2
- package/dist/compare/text-atoms.d.ts.map +1 -1
- package/dist/compare/text-atoms.js +7 -5
- package/dist/compare/text-atoms.js.map +1 -1
- package/dist/compare/text.d.ts.map +1 -1
- package/dist/compare/text.js +2 -2
- package/dist/compare/text.js.map +1 -1
- package/dist/config/load.d.ts +12 -0
- package/dist/config/load.d.ts.map +1 -1
- package/dist/config/load.js +5 -3
- package/dist/config/load.js.map +1 -1
- package/dist/config/option-problems.d.ts +3 -2
- package/dist/config/option-problems.d.ts.map +1 -1
- package/dist/config/option-problems.js +4 -3
- package/dist/config/option-problems.js.map +1 -1
- package/dist/config/style.d.ts +5 -0
- package/dist/config/style.d.ts.map +1 -1
- package/dist/config/style.js +13 -1
- package/dist/config/style.js.map +1 -1
- package/dist/config/yaml-file.d.ts +22 -0
- package/dist/config/yaml-file.d.ts.map +1 -0
- package/dist/config/yaml-file.js +59 -0
- package/dist/config/yaml-file.js.map +1 -0
- package/dist/correction-edit.d.ts +20 -0
- package/dist/correction-edit.d.ts.map +1 -0
- package/dist/correction-edit.js +34 -0
- package/dist/correction-edit.js.map +1 -0
- package/dist/cross-run.d.ts +15 -0
- package/dist/cross-run.d.ts.map +1 -0
- package/dist/cross-run.js +73 -0
- package/dist/cross-run.js.map +1 -0
- package/dist/cross-variants.d.ts +26 -0
- package/dist/cross-variants.d.ts.map +1 -0
- package/dist/cross-variants.js +40 -0
- package/dist/cross-variants.js.map +1 -0
- package/dist/cross-votes.d.ts +17 -0
- package/dist/cross-votes.d.ts.map +1 -0
- package/dist/cross-votes.js +24 -0
- package/dist/cross-votes.js.map +1 -0
- package/dist/custom/load.d.ts +6 -3
- package/dist/custom/load.d.ts.map +1 -1
- package/dist/custom/load.js +10 -2
- package/dist/custom/load.js.map +1 -1
- package/dist/custom/module-path.d.ts +11 -0
- package/dist/custom/module-path.d.ts.map +1 -0
- package/dist/custom/module-path.js +15 -0
- package/dist/custom/module-path.js.map +1 -0
- package/dist/custom/parse.d.ts +17 -3
- package/dist/custom/parse.d.ts.map +1 -1
- package/dist/custom/parse.js +57 -14
- package/dist/custom/parse.js.map +1 -1
- package/dist/custom/problems.d.ts +4 -1
- package/dist/custom/problems.d.ts.map +1 -1
- package/dist/custom/problems.js +56 -39
- package/dist/custom/problems.js.map +1 -1
- package/dist/date-format.d.ts +33 -0
- package/dist/date-format.d.ts.map +1 -0
- package/dist/date-format.js +87 -0
- package/dist/date-format.js.map +1 -0
- package/dist/derived/date-arithmetic.d.ts +22 -0
- package/dist/derived/date-arithmetic.d.ts.map +1 -0
- package/dist/derived/date-arithmetic.js +48 -0
- package/dist/derived/date-arithmetic.js.map +1 -0
- package/dist/derived/durations.d.ts +25 -0
- package/dist/derived/durations.d.ts.map +1 -0
- package/dist/derived/durations.js +38 -0
- package/dist/derived/durations.js.map +1 -0
- package/dist/derived/elapsed.d.ts +41 -0
- package/dist/derived/elapsed.d.ts.map +1 -0
- package/dist/derived/elapsed.js +66 -0
- package/dist/derived/elapsed.js.map +1 -0
- package/dist/derived/relative-dates.d.ts +35 -0
- package/dist/derived/relative-dates.d.ts.map +1 -0
- package/dist/derived/relative-dates.js +65 -0
- package/dist/derived/relative-dates.js.map +1 -0
- package/dist/derived/sentence-buckets.d.ts +4 -0
- package/dist/derived/sentence-buckets.d.ts.map +1 -0
- package/dist/derived/sentence-buckets.js +34 -0
- package/dist/derived/sentence-buckets.js.map +1 -0
- package/dist/detect-language.js +1 -1
- package/dist/detect.d.ts.map +1 -1
- package/dist/detect.js +9 -3
- package/dist/detect.js.map +1 -1
- package/dist/detectors/absolute-exception.d.ts +4 -0
- package/dist/detectors/absolute-exception.d.ts.map +1 -0
- package/dist/detectors/absolute-exception.js +86 -0
- package/dist/detectors/absolute-exception.js.map +1 -0
- package/dist/detectors/abstract-length.d.ts +24 -0
- package/dist/detectors/abstract-length.d.ts.map +1 -0
- package/dist/detectors/abstract-length.js +108 -0
- package/dist/detectors/abstract-length.js.map +1 -0
- package/dist/detectors/ai-phrasing.d.ts +15 -3
- package/dist/detectors/ai-phrasing.d.ts.map +1 -1
- package/dist/detectors/ai-phrasing.js +15 -15
- package/dist/detectors/ai-phrasing.js.map +1 -1
- package/dist/detectors/ai-structure.d.ts +7 -0
- package/dist/detectors/ai-structure.d.ts.map +1 -0
- package/dist/detectors/ai-structure.js +26 -0
- package/dist/detectors/ai-structure.js.map +1 -0
- package/dist/detectors/blank-structure.d.ts +13 -0
- package/dist/detectors/blank-structure.d.ts.map +1 -0
- package/dist/detectors/blank-structure.js +124 -0
- package/dist/detectors/blank-structure.js.map +1 -0
- package/dist/detectors/bold-label.d.ts +10 -0
- package/dist/detectors/bold-label.d.ts.map +1 -0
- package/dist/detectors/bold-label.js +44 -0
- package/dist/detectors/bold-label.js.map +1 -0
- package/dist/detectors/chat-citation.d.ts +18 -0
- package/dist/detectors/chat-citation.d.ts.map +1 -0
- package/dist/detectors/chat-citation.js +41 -0
- package/dist/detectors/chat-citation.js.map +1 -0
- package/dist/detectors/citation-entry.d.ts +32 -0
- package/dist/detectors/citation-entry.d.ts.map +1 -0
- package/dist/detectors/citation-entry.js +62 -0
- package/dist/detectors/citation-entry.js.map +1 -0
- package/dist/detectors/citation-marks.d.ts +43 -0
- package/dist/detectors/citation-marks.d.ts.map +1 -0
- package/dist/detectors/citation-marks.js +151 -0
- package/dist/detectors/citation-marks.js.map +1 -0
- package/dist/detectors/citation-style.d.ts +16 -0
- package/dist/detectors/citation-style.d.ts.map +1 -0
- package/dist/detectors/citation-style.js +39 -0
- package/dist/detectors/citation-style.js.map +1 -0
- package/dist/detectors/cross-link.d.ts +15 -0
- package/dist/detectors/cross-link.d.ts.map +1 -0
- package/dist/detectors/cross-link.js +74 -0
- package/dist/detectors/cross-link.js.map +1 -0
- package/dist/detectors/cross-registry/cross-doc-broken-link.d.ts +3 -0
- package/dist/detectors/cross-registry/cross-doc-broken-link.d.ts.map +1 -0
- package/dist/detectors/cross-registry/cross-doc-broken-link.js +3 -0
- package/dist/detectors/cross-registry/cross-doc-broken-link.js.map +1 -0
- package/dist/detectors/cross-registry/cross-doc-term-variant.d.ts +3 -0
- package/dist/detectors/cross-registry/cross-doc-term-variant.d.ts.map +1 -0
- package/dist/detectors/cross-registry/cross-doc-term-variant.js +3 -0
- package/dist/detectors/cross-registry/cross-doc-term-variant.js.map +1 -0
- package/dist/detectors/cross-variant.d.ts +4 -0
- package/dist/detectors/cross-variant.d.ts.map +1 -0
- package/dist/detectors/cross-variant.js +62 -0
- package/dist/detectors/cross-variant.js.map +1 -0
- package/dist/detectors/dangling-figure.d.ts +5 -2
- package/dist/detectors/dangling-figure.d.ts.map +1 -1
- package/dist/detectors/dangling-figure.js +5 -3
- package/dist/detectors/dangling-figure.js.map +1 -1
- package/dist/detectors/date-format.d.ts +3 -0
- package/dist/detectors/date-format.d.ts.map +1 -0
- package/dist/detectors/date-format.js +26 -0
- package/dist/detectors/date-format.js.map +1 -0
- package/dist/detectors/date-year.d.ts +23 -0
- package/dist/detectors/date-year.d.ts.map +1 -0
- package/dist/detectors/date-year.js +71 -0
- package/dist/detectors/date-year.js.map +1 -0
- package/dist/detectors/definition-use.d.ts +8 -0
- package/dist/detectors/definition-use.d.ts.map +1 -0
- package/dist/detectors/definition-use.js +32 -0
- package/dist/detectors/definition-use.js.map +1 -0
- package/dist/detectors/derived-numbers.d.ts +6 -0
- package/dist/detectors/derived-numbers.d.ts.map +1 -0
- package/dist/detectors/derived-numbers.js +155 -0
- package/dist/detectors/derived-numbers.js.map +1 -0
- package/dist/detectors/document-shape.d.ts +18 -0
- package/dist/detectors/document-shape.d.ts.map +1 -0
- package/dist/detectors/document-shape.js +94 -0
- package/dist/detectors/document-shape.js.map +1 -0
- package/dist/detectors/doubled-punctuation.d.ts.map +1 -1
- package/dist/detectors/doubled-punctuation.js +4 -2
- package/dist/detectors/doubled-punctuation.js.map +1 -1
- package/dist/detectors/duplicate-heading.d.ts +14 -0
- package/dist/detectors/duplicate-heading.d.ts.map +1 -0
- package/dist/detectors/duplicate-heading.js +39 -0
- package/dist/detectors/duplicate-heading.js.map +1 -0
- package/dist/detectors/emoji-heading.d.ts +7 -0
- package/dist/detectors/emoji-heading.d.ts.map +1 -0
- package/dist/detectors/emoji-heading.js +14 -0
- package/dist/detectors/emoji-heading.js.map +1 -0
- package/dist/detectors/empty-section.d.ts +8 -0
- package/dist/detectors/empty-section.d.ts.map +1 -0
- package/dist/detectors/empty-section.js +16 -0
- package/dist/detectors/empty-section.js.map +1 -0
- package/dist/detectors/fact-consistency.d.ts +8 -0
- package/dist/detectors/fact-consistency.d.ts.map +1 -0
- package/dist/detectors/fact-consistency.js +44 -0
- package/dist/detectors/fact-consistency.js.map +1 -0
- package/dist/detectors/figure-order.d.ts +28 -0
- package/dist/detectors/figure-order.d.ts.map +1 -0
- package/dist/detectors/figure-order.js +65 -0
- package/dist/detectors/figure-order.js.map +1 -0
- package/dist/detectors/fullwidth-alnum.d.ts +24 -0
- package/dist/detectors/fullwidth-alnum.d.ts.map +1 -0
- package/dist/detectors/fullwidth-alnum.js +88 -0
- package/dist/detectors/fullwidth-alnum.js.map +1 -0
- package/dist/detectors/hankaku-kana.d.ts +9 -0
- package/dist/detectors/hankaku-kana.d.ts.map +1 -0
- package/dist/detectors/hankaku-kana.js +27 -0
- package/dist/detectors/hankaku-kana.js.map +1 -0
- package/dist/detectors/heading-code-words.js +2 -2
- package/dist/detectors/heading-code-words.js.map +1 -1
- package/dist/detectors/heading-numbering.d.ts +7 -0
- package/dist/detectors/heading-numbering.d.ts.map +1 -0
- package/dist/detectors/heading-numbering.js +34 -0
- package/dist/detectors/heading-numbering.js.map +1 -0
- package/dist/detectors/index.d.ts +3 -1
- package/dist/detectors/index.d.ts.map +1 -1
- package/dist/detectors/index.js +9 -104
- package/dist/detectors/index.js.map +1 -1
- package/dist/detectors/invisible-character.d.ts +20 -0
- package/dist/detectors/invisible-character.d.ts.map +1 -0
- package/dist/detectors/invisible-character.js +143 -0
- package/dist/detectors/invisible-character.js.map +1 -0
- package/dist/detectors/katakana-density.d.ts +11 -0
- package/dist/detectors/katakana-density.d.ts.map +1 -0
- package/dist/detectors/katakana-density.js +47 -0
- package/dist/detectors/katakana-density.js.map +1 -0
- package/dist/detectors/known-correction.d.ts +7 -0
- package/dist/detectors/known-correction.d.ts.map +1 -0
- package/dist/detectors/known-correction.js +63 -0
- package/dist/detectors/known-correction.js.map +1 -0
- package/dist/detectors/kutoten-consistency.js +2 -2
- package/dist/detectors/kutoten-consistency.js.map +1 -1
- package/dist/detectors/lexicon-match.d.ts +10 -1
- package/dist/detectors/lexicon-match.d.ts.map +1 -1
- package/dist/detectors/lexicon-match.js +26 -1
- package/dist/detectors/lexicon-match.js.map +1 -1
- package/dist/detectors/lexicon.d.ts +9 -1
- package/dist/detectors/lexicon.d.ts.map +1 -1
- package/dist/detectors/lexicon.js +34 -13
- package/dist/detectors/lexicon.js.map +1 -1
- package/dist/detectors/list-parallel.d.ts +12 -0
- package/dist/detectors/list-parallel.d.ts.map +1 -0
- package/dist/detectors/list-parallel.js +135 -0
- package/dist/detectors/list-parallel.js.map +1 -0
- package/dist/detectors/list-sentence.d.ts +3 -1
- package/dist/detectors/list-sentence.d.ts.map +1 -1
- package/dist/detectors/list-sentence.js +26 -1
- package/dist/detectors/list-sentence.js.map +1 -1
- package/dist/detectors/long-vowel.d.ts +17 -1
- package/dist/detectors/long-vowel.d.ts.map +1 -1
- package/dist/detectors/long-vowel.js +20 -6
- package/dist/detectors/long-vowel.js.map +1 -1
- package/dist/detectors/markup-finding.d.ts +3 -1
- package/dist/detectors/markup-finding.d.ts.map +1 -1
- package/dist/detectors/markup-finding.js +10 -0
- package/dist/detectors/markup-finding.js.map +1 -1
- package/dist/detectors/misuse-match.d.ts +7 -0
- package/dist/detectors/misuse-match.d.ts.map +1 -0
- package/dist/detectors/misuse-match.js +23 -0
- package/dist/detectors/misuse-match.js.map +1 -0
- package/dist/detectors/modal-conflict.d.ts +6 -0
- package/dist/detectors/modal-conflict.d.ts.map +1 -0
- package/dist/detectors/modal-conflict.js +22 -0
- package/dist/detectors/modal-conflict.js.map +1 -0
- package/dist/detectors/name-variant.d.ts +4 -0
- package/dist/detectors/name-variant.d.ts.map +1 -0
- package/dist/detectors/name-variant.js +13 -0
- package/dist/detectors/name-variant.js.map +1 -0
- package/dist/detectors/next-word.d.ts +22 -0
- package/dist/detectors/next-word.d.ts.map +1 -0
- package/dist/detectors/next-word.js +125 -0
- package/dist/detectors/next-word.js.map +1 -0
- package/dist/detectors/nominalization.d.ts +11 -0
- package/dist/detectors/nominalization.d.ts.map +1 -0
- package/dist/detectors/nominalization.js +56 -0
- package/dist/detectors/nominalization.js.map +1 -0
- package/dist/detectors/number-style.d.ts +31 -0
- package/dist/detectors/number-style.d.ts.map +1 -0
- package/dist/detectors/number-style.js +182 -0
- package/dist/detectors/number-style.js.map +1 -0
- package/dist/detectors/number-unit.d.ts +35 -0
- package/dist/detectors/number-unit.d.ts.map +1 -0
- package/dist/detectors/number-unit.js +121 -0
- package/dist/detectors/number-unit.js.map +1 -0
- package/dist/detectors/orthographic-variant.d.ts +8 -0
- package/dist/detectors/orthographic-variant.d.ts.map +1 -0
- package/dist/detectors/orthographic-variant.js +130 -0
- package/dist/detectors/orthographic-variant.js.map +1 -0
- package/dist/detectors/orthography.d.ts.map +1 -1
- package/dist/detectors/orthography.js +59 -28
- package/dist/detectors/orthography.js.map +1 -1
- package/dist/detectors/outside-announced-list.d.ts +4 -0
- package/dist/detectors/outside-announced-list.d.ts.map +1 -0
- package/dist/detectors/outside-announced-list.js +24 -0
- package/dist/detectors/outside-announced-list.js.map +1 -0
- package/dist/detectors/oxford-comma.d.ts.map +1 -1
- package/dist/detectors/oxford-comma.js +1 -0
- package/dist/detectors/oxford-comma.js.map +1 -1
- package/dist/detectors/paragraph-restatement.d.ts +11 -0
- package/dist/detectors/paragraph-restatement.d.ts.map +1 -0
- package/dist/detectors/paragraph-restatement.js +61 -0
- package/dist/detectors/paragraph-restatement.js.map +1 -0
- package/dist/detectors/paragraph-run.d.ts +7 -0
- package/dist/detectors/paragraph-run.d.ts.map +1 -0
- package/dist/detectors/paragraph-run.js +25 -0
- package/dist/detectors/paragraph-run.js.map +1 -0
- package/dist/detectors/person-consistency.d.ts +7 -0
- package/dist/detectors/person-consistency.d.ts.map +1 -0
- package/dist/detectors/person-consistency.js +25 -0
- package/dist/detectors/person-consistency.js.map +1 -0
- package/dist/detectors/phrase-match.d.ts +4 -1
- package/dist/detectors/phrase-match.d.ts.map +1 -1
- package/dist/detectors/phrase-match.js +26 -7
- package/dist/detectors/phrase-match.js.map +1 -1
- package/dist/detectors/placeholder-text.d.ts +1 -1
- package/dist/detectors/placeholder-text.d.ts.map +1 -1
- package/dist/detectors/placeholder-text.js +54 -4
- package/dist/detectors/placeholder-text.js.map +1 -1
- package/dist/detectors/ra-nuki.d.ts +9 -0
- package/dist/detectors/ra-nuki.d.ts.map +1 -0
- package/dist/detectors/ra-nuki.js +30 -0
- package/dist/detectors/ra-nuki.js.map +1 -0
- package/dist/detectors/reference-text.d.ts +6 -0
- package/dist/detectors/reference-text.d.ts.map +1 -0
- package/dist/detectors/reference-text.js +38 -0
- package/dist/detectors/reference-text.js.map +1 -0
- package/dist/detectors/registry/absolute-exception.d.ts +3 -0
- package/dist/detectors/registry/absolute-exception.d.ts.map +1 -0
- package/dist/detectors/registry/absolute-exception.js +3 -0
- package/dist/detectors/registry/absolute-exception.js.map +1 -0
- package/dist/detectors/registry/abstract-length.d.ts +3 -0
- package/dist/detectors/registry/abstract-length.d.ts.map +1 -0
- package/dist/detectors/registry/abstract-length.js +3 -0
- package/dist/detectors/registry/abstract-length.js.map +1 -0
- package/dist/detectors/registry/acronym-expansion-conflict.d.ts +3 -0
- package/dist/detectors/registry/acronym-expansion-conflict.d.ts.map +1 -0
- package/dist/detectors/registry/acronym-expansion-conflict.js +3 -0
- package/dist/detectors/registry/acronym-expansion-conflict.js.map +1 -0
- package/dist/detectors/registry/adverb-density.d.ts +3 -0
- package/dist/detectors/registry/adverb-density.d.ts.map +1 -0
- package/dist/detectors/registry/adverb-density.js +3 -0
- package/dist/detectors/registry/adverb-density.js.map +1 -0
- package/dist/detectors/registry/agentless-passive.d.ts +3 -0
- package/dist/detectors/registry/agentless-passive.d.ts.map +1 -0
- package/dist/detectors/registry/agentless-passive.js +3 -0
- package/dist/detectors/registry/agentless-passive.js.map +1 -0
- package/dist/detectors/registry/agreement-slip.d.ts +3 -0
- package/dist/detectors/registry/agreement-slip.d.ts.map +1 -0
- package/dist/detectors/registry/agreement-slip.js +3 -0
- package/dist/detectors/registry/agreement-slip.js.map +1 -0
- package/dist/detectors/registry/ai-structure.d.ts +3 -0
- package/dist/detectors/registry/ai-structure.d.ts.map +1 -0
- package/dist/detectors/registry/ai-structure.js +3 -0
- package/dist/detectors/registry/ai-structure.js.map +1 -0
- package/dist/detectors/registry/ai-tell.d.ts +3 -0
- package/dist/detectors/registry/ai-tell.d.ts.map +1 -0
- package/dist/detectors/registry/ai-tell.js +3 -0
- package/dist/detectors/registry/ai-tell.js.map +1 -0
- package/dist/detectors/registry/announced-count.d.ts +3 -0
- package/dist/detectors/registry/announced-count.d.ts.map +1 -0
- package/dist/detectors/registry/announced-count.js +3 -0
- package/dist/detectors/registry/announced-count.js.map +1 -0
- package/dist/detectors/registry/article-sound.d.ts +3 -0
- package/dist/detectors/registry/article-sound.d.ts.map +1 -0
- package/dist/detectors/registry/article-sound.js +3 -0
- package/dist/detectors/registry/article-sound.js.map +1 -0
- package/dist/detectors/registry/assistant-residue.d.ts +3 -0
- package/dist/detectors/registry/assistant-residue.d.ts.map +1 -0
- package/dist/detectors/registry/assistant-residue.js +3 -0
- package/dist/detectors/registry/assistant-residue.js.map +1 -0
- package/dist/detectors/registry/bold-label-list.d.ts +3 -0
- package/dist/detectors/registry/bold-label-list.d.ts.map +1 -0
- package/dist/detectors/registry/bold-label-list.js +3 -0
- package/dist/detectors/registry/bold-label-list.js.map +1 -0
- package/dist/detectors/registry/bracket-nesting.d.ts +3 -0
- package/dist/detectors/registry/bracket-nesting.d.ts.map +1 -0
- package/dist/detectors/registry/bracket-nesting.js +3 -0
- package/dist/detectors/registry/bracket-nesting.js.map +1 -0
- package/dist/detectors/registry/broken-link.d.ts +3 -0
- package/dist/detectors/registry/broken-link.d.ts.map +1 -0
- package/dist/detectors/registry/broken-link.js +3 -0
- package/dist/detectors/registry/broken-link.js.map +1 -0
- package/dist/detectors/registry/chat-citation-residue.d.ts +3 -0
- package/dist/detectors/registry/chat-citation-residue.d.ts.map +1 -0
- package/dist/detectors/registry/chat-citation-residue.js +3 -0
- package/dist/detectors/registry/chat-citation-residue.js.map +1 -0
- package/dist/detectors/registry/citation-entry.d.ts +3 -0
- package/dist/detectors/registry/citation-entry.d.ts.map +1 -0
- package/dist/detectors/registry/citation-entry.js +3 -0
- package/dist/detectors/registry/citation-entry.js.map +1 -0
- package/dist/detectors/registry/citation-style.d.ts +3 -0
- package/dist/detectors/registry/citation-style.d.ts.map +1 -0
- package/dist/detectors/registry/citation-style.js +3 -0
- package/dist/detectors/registry/citation-style.js.map +1 -0
- package/dist/detectors/registry/clause-chain.d.ts +3 -0
- package/dist/detectors/registry/clause-chain.d.ts.map +1 -0
- package/dist/detectors/registry/clause-chain.js +3 -0
- package/dist/detectors/registry/clause-chain.js.map +1 -0
- package/dist/detectors/registry/colon-lead-in.d.ts +3 -0
- package/dist/detectors/registry/colon-lead-in.d.ts.map +1 -0
- package/dist/detectors/registry/colon-lead-in.js +3 -0
- package/dist/detectors/registry/colon-lead-in.js.map +1 -0
- package/dist/detectors/registry/concrete-evidence.d.ts +3 -0
- package/dist/detectors/registry/concrete-evidence.d.ts.map +1 -0
- package/dist/detectors/registry/concrete-evidence.js +3 -0
- package/dist/detectors/registry/concrete-evidence.js.map +1 -0
- package/dist/detectors/registry/conjunction-run.d.ts +3 -0
- package/dist/detectors/registry/conjunction-run.d.ts.map +1 -0
- package/dist/detectors/registry/conjunction-run.js +3 -0
- package/dist/detectors/registry/conjunction-run.js.map +1 -0
- package/dist/detectors/registry/contraction-mix.d.ts +3 -0
- package/dist/detectors/registry/contraction-mix.d.ts.map +1 -0
- package/dist/detectors/registry/contraction-mix.js +3 -0
- package/dist/detectors/registry/contraction-mix.js.map +1 -0
- package/dist/detectors/registry/contrast-framing.d.ts +3 -0
- package/dist/detectors/registry/contrast-framing.d.ts.map +1 -0
- package/dist/detectors/registry/contrast-framing.js +3 -0
- package/dist/detectors/registry/contrast-framing.js.map +1 -0
- package/dist/detectors/registry/count-per-section.d.ts +3 -0
- package/dist/detectors/registry/count-per-section.d.ts.map +1 -0
- package/dist/detectors/registry/count-per-section.js +3 -0
- package/dist/detectors/registry/count-per-section.js.map +1 -0
- package/dist/detectors/registry/cushion-density.d.ts +3 -0
- package/dist/detectors/registry/cushion-density.d.ts.map +1 -0
- package/dist/detectors/registry/cushion-density.js +3 -0
- package/dist/detectors/registry/cushion-density.js.map +1 -0
- package/dist/detectors/registry/custom-pattern.d.ts +3 -0
- package/dist/detectors/registry/custom-pattern.d.ts.map +1 -0
- package/dist/detectors/registry/custom-pattern.js +3 -0
- package/dist/detectors/registry/custom-pattern.js.map +1 -0
- package/dist/detectors/registry/custom-tokens.d.ts +3 -0
- package/dist/detectors/registry/custom-tokens.d.ts.map +1 -0
- package/dist/detectors/registry/custom-tokens.js +3 -0
- package/dist/detectors/registry/custom-tokens.js.map +1 -0
- package/dist/detectors/registry/custom-words.d.ts +3 -0
- package/dist/detectors/registry/custom-words.d.ts.map +1 -0
- package/dist/detectors/registry/custom-words.js +3 -0
- package/dist/detectors/registry/custom-words.js.map +1 -0
- package/dist/detectors/registry/dangling-figure.d.ts +3 -0
- package/dist/detectors/registry/dangling-figure.d.ts.map +1 -0
- package/dist/detectors/registry/dangling-figure.js +3 -0
- package/dist/detectors/registry/dangling-figure.js.map +1 -0
- package/dist/detectors/registry/dangling-reference.d.ts +3 -0
- package/dist/detectors/registry/dangling-reference.d.ts.map +1 -0
- package/dist/detectors/registry/dangling-reference.js +3 -0
- package/dist/detectors/registry/dangling-reference.js.map +1 -0
- package/dist/detectors/registry/dash-density.d.ts +3 -0
- package/dist/detectors/registry/dash-density.d.ts.map +1 -0
- package/dist/detectors/registry/dash-density.js +3 -0
- package/dist/detectors/registry/dash-density.js.map +1 -0
- package/dist/detectors/registry/date-format.d.ts +3 -0
- package/dist/detectors/registry/date-format.d.ts.map +1 -0
- package/dist/detectors/registry/date-format.js +3 -0
- package/dist/detectors/registry/date-format.js.map +1 -0
- package/dist/detectors/registry/date-order.d.ts +3 -0
- package/dist/detectors/registry/date-order.d.ts.map +1 -0
- package/dist/detectors/registry/date-order.js +3 -0
- package/dist/detectors/registry/date-order.js.map +1 -0
- package/dist/detectors/registry/date-range-reversed.d.ts +3 -0
- package/dist/detectors/registry/date-range-reversed.d.ts.map +1 -0
- package/dist/detectors/registry/date-range-reversed.js +3 -0
- package/dist/detectors/registry/date-range-reversed.js.map +1 -0
- package/dist/detectors/registry/date-weekday-mismatch.d.ts +3 -0
- package/dist/detectors/registry/date-weekday-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/date-weekday-mismatch.js +3 -0
- package/dist/detectors/registry/date-weekday-mismatch.js.map +1 -0
- package/dist/detectors/registry/date-without-year.d.ts +3 -0
- package/dist/detectors/registry/date-without-year.d.ts.map +1 -0
- package/dist/detectors/registry/date-without-year.js +3 -0
- package/dist/detectors/registry/date-without-year.js.map +1 -0
- package/dist/detectors/registry/doubled-particle.d.ts +3 -0
- package/dist/detectors/registry/doubled-particle.d.ts.map +1 -0
- package/dist/detectors/registry/doubled-particle.js +3 -0
- package/dist/detectors/registry/doubled-particle.js.map +1 -0
- package/dist/detectors/registry/doubled-punctuation.d.ts +3 -0
- package/dist/detectors/registry/doubled-punctuation.d.ts.map +1 -0
- package/dist/detectors/registry/doubled-punctuation.js +3 -0
- package/dist/detectors/registry/doubled-punctuation.js.map +1 -0
- package/dist/detectors/registry/doubled-word.d.ts +3 -0
- package/dist/detectors/registry/doubled-word.d.ts.map +1 -0
- package/dist/detectors/registry/doubled-word.js +3 -0
- package/dist/detectors/registry/doubled-word.js.map +1 -0
- package/dist/detectors/registry/duplicate-definition.d.ts +3 -0
- package/dist/detectors/registry/duplicate-definition.d.ts.map +1 -0
- package/dist/detectors/registry/duplicate-definition.js +3 -0
- package/dist/detectors/registry/duplicate-definition.js.map +1 -0
- package/dist/detectors/registry/duplicate-heading.d.ts +3 -0
- package/dist/detectors/registry/duplicate-heading.d.ts.map +1 -0
- package/dist/detectors/registry/duplicate-heading.js +3 -0
- package/dist/detectors/registry/duplicate-heading.js.map +1 -0
- package/dist/detectors/registry/duration-mismatch.d.ts +3 -0
- package/dist/detectors/registry/duration-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/duration-mismatch.js +3 -0
- package/dist/detectors/registry/duration-mismatch.js.map +1 -0
- package/dist/detectors/registry/elapsed-years-mismatch.d.ts +3 -0
- package/dist/detectors/registry/elapsed-years-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/elapsed-years-mismatch.js +3 -0
- package/dist/detectors/registry/elapsed-years-mismatch.js.map +1 -0
- package/dist/detectors/registry/emoji-density.d.ts +3 -0
- package/dist/detectors/registry/emoji-density.d.ts.map +1 -0
- package/dist/detectors/registry/emoji-density.js +3 -0
- package/dist/detectors/registry/emoji-density.js.map +1 -0
- package/dist/detectors/registry/emoji-heading.d.ts +3 -0
- package/dist/detectors/registry/emoji-heading.d.ts.map +1 -0
- package/dist/detectors/registry/emoji-heading.js +3 -0
- package/dist/detectors/registry/emoji-heading.js.map +1 -0
- package/dist/detectors/registry/empty-list-item.d.ts +3 -0
- package/dist/detectors/registry/empty-list-item.d.ts.map +1 -0
- package/dist/detectors/registry/empty-list-item.js +3 -0
- package/dist/detectors/registry/empty-list-item.js.map +1 -0
- package/dist/detectors/registry/empty-section.d.ts +3 -0
- package/dist/detectors/registry/empty-section.d.ts.map +1 -0
- package/dist/detectors/registry/empty-section.js +3 -0
- package/dist/detectors/registry/empty-section.js.map +1 -0
- package/dist/detectors/registry/empty-table-cell.d.ts +3 -0
- package/dist/detectors/registry/empty-table-cell.d.ts.map +1 -0
- package/dist/detectors/registry/empty-table-cell.js +3 -0
- package/dist/detectors/registry/empty-table-cell.js.map +1 -0
- package/dist/detectors/registry/expletive.d.ts +3 -0
- package/dist/detectors/registry/expletive.d.ts.map +1 -0
- package/dist/detectors/registry/expletive.js +3 -0
- package/dist/detectors/registry/expletive.js.map +1 -0
- package/dist/detectors/registry/fact-conflict.d.ts +3 -0
- package/dist/detectors/registry/fact-conflict.d.ts.map +1 -0
- package/dist/detectors/registry/fact-conflict.js +3 -0
- package/dist/detectors/registry/fact-conflict.js.map +1 -0
- package/dist/detectors/registry/figure-order.d.ts +3 -0
- package/dist/detectors/registry/figure-order.d.ts.map +1 -0
- package/dist/detectors/registry/figure-order.js +3 -0
- package/dist/detectors/registry/figure-order.js.map +1 -0
- package/dist/detectors/registry/fullwidth-alnum.d.ts +3 -0
- package/dist/detectors/registry/fullwidth-alnum.d.ts.map +1 -0
- package/dist/detectors/registry/fullwidth-alnum.js +3 -0
- package/dist/detectors/registry/fullwidth-alnum.js.map +1 -0
- package/dist/detectors/registry/hankaku-kana.d.ts +3 -0
- package/dist/detectors/registry/hankaku-kana.d.ts.map +1 -0
- package/dist/detectors/registry/hankaku-kana.js +3 -0
- package/dist/detectors/registry/hankaku-kana.js.map +1 -0
- package/dist/detectors/registry/heading-echo.d.ts +3 -0
- package/dist/detectors/registry/heading-echo.d.ts.map +1 -0
- package/dist/detectors/registry/heading-echo.js +3 -0
- package/dist/detectors/registry/heading-echo.js.map +1 -0
- package/dist/detectors/registry/heading-level-skip.d.ts +3 -0
- package/dist/detectors/registry/heading-level-skip.d.ts.map +1 -0
- package/dist/detectors/registry/heading-level-skip.js +3 -0
- package/dist/detectors/registry/heading-level-skip.js.map +1 -0
- package/dist/detectors/registry/heading-numbering.d.ts +3 -0
- package/dist/detectors/registry/heading-numbering.d.ts.map +1 -0
- package/dist/detectors/registry/heading-numbering.js +3 -0
- package/dist/detectors/registry/heading-numbering.js.map +1 -0
- package/dist/detectors/registry/hedging.d.ts +3 -0
- package/dist/detectors/registry/hedging.d.ts.map +1 -0
- package/dist/detectors/registry/hedging.js +3 -0
- package/dist/detectors/registry/hedging.js.map +1 -0
- package/dist/detectors/registry/image-alt-text.d.ts +3 -0
- package/dist/detectors/registry/image-alt-text.d.ts.map +1 -0
- package/dist/detectors/registry/image-alt-text.js +3 -0
- package/dist/detectors/registry/image-alt-text.js.map +1 -0
- package/dist/detectors/registry/intensified-adjective.d.ts +3 -0
- package/dist/detectors/registry/intensified-adjective.d.ts.map +1 -0
- package/dist/detectors/registry/intensified-adjective.js +3 -0
- package/dist/detectors/registry/intensified-adjective.js.map +1 -0
- package/dist/detectors/registry/internal-jargon.d.ts +3 -0
- package/dist/detectors/registry/internal-jargon.d.ts.map +1 -0
- package/dist/detectors/registry/internal-jargon.js +3 -0
- package/dist/detectors/registry/internal-jargon.js.map +1 -0
- package/dist/detectors/registry/invisible-character.d.ts +3 -0
- package/dist/detectors/registry/invisible-character.d.ts.map +1 -0
- package/dist/detectors/registry/invisible-character.js +3 -0
- package/dist/detectors/registry/invisible-character.js.map +1 -0
- package/dist/detectors/registry/kanji-run.d.ts +3 -0
- package/dist/detectors/registry/kanji-run.d.ts.map +1 -0
- package/dist/detectors/registry/kanji-run.js +3 -0
- package/dist/detectors/registry/kanji-run.js.map +1 -0
- package/dist/detectors/registry/katakana-density.d.ts +3 -0
- package/dist/detectors/registry/katakana-density.d.ts.map +1 -0
- package/dist/detectors/registry/katakana-density.js +3 -0
- package/dist/detectors/registry/katakana-density.js.map +1 -0
- package/dist/detectors/registry/katakana-long-vowel.d.ts +3 -0
- package/dist/detectors/registry/katakana-long-vowel.d.ts.map +1 -0
- package/dist/detectors/registry/katakana-long-vowel.js +3 -0
- package/dist/detectors/registry/katakana-long-vowel.js.map +1 -0
- package/dist/detectors/registry/known-correction.d.ts +3 -0
- package/dist/detectors/registry/known-correction.d.ts.map +1 -0
- package/dist/detectors/registry/known-correction.js +3 -0
- package/dist/detectors/registry/known-correction.js.map +1 -0
- package/dist/detectors/registry/kutoten-consistency.d.ts +3 -0
- package/dist/detectors/registry/kutoten-consistency.d.ts.map +1 -0
- package/dist/detectors/registry/kutoten-consistency.js +3 -0
- package/dist/detectors/registry/kutoten-consistency.js.map +1 -0
- package/dist/detectors/registry/latin-spacing.d.ts +3 -0
- package/dist/detectors/registry/latin-spacing.d.ts.map +1 -0
- package/dist/detectors/registry/latin-spacing.js +3 -0
- package/dist/detectors/registry/latin-spacing.js.map +1 -0
- package/dist/detectors/registry/list-item-form-mix.d.ts +3 -0
- package/dist/detectors/registry/list-item-form-mix.d.ts.map +1 -0
- package/dist/detectors/registry/list-item-form-mix.js +3 -0
- package/dist/detectors/registry/list-item-form-mix.js.map +1 -0
- package/dist/detectors/registry/middle-dot.d.ts +3 -0
- package/dist/detectors/registry/middle-dot.d.ts.map +1 -0
- package/dist/detectors/registry/middle-dot.js +3 -0
- package/dist/detectors/registry/middle-dot.js.map +1 -0
- package/dist/detectors/registry/misuse-match.d.ts +3 -0
- package/dist/detectors/registry/misuse-match.d.ts.map +1 -0
- package/dist/detectors/registry/misuse-match.js +3 -0
- package/dist/detectors/registry/misuse-match.js.map +1 -0
- package/dist/detectors/registry/modal-conflict.d.ts +3 -0
- package/dist/detectors/registry/modal-conflict.d.ts.map +1 -0
- package/dist/detectors/registry/modal-conflict.js +3 -0
- package/dist/detectors/registry/modal-conflict.js.map +1 -0
- package/dist/detectors/registry/name-variant.d.ts +3 -0
- package/dist/detectors/registry/name-variant.d.ts.map +1 -0
- package/dist/detectors/registry/name-variant.js +3 -0
- package/dist/detectors/registry/name-variant.js.map +1 -0
- package/dist/detectors/registry/ngram-repetition.d.ts +3 -0
- package/dist/detectors/registry/ngram-repetition.d.ts.map +1 -0
- package/dist/detectors/registry/ngram-repetition.js +3 -0
- package/dist/detectors/registry/ngram-repetition.js.map +1 -0
- package/dist/detectors/registry/no-lead.d.ts +3 -0
- package/dist/detectors/registry/no-lead.d.ts.map +1 -0
- package/dist/detectors/registry/no-lead.js +3 -0
- package/dist/detectors/registry/no-lead.js.map +1 -0
- package/dist/detectors/registry/nominalization.d.ts +3 -0
- package/dist/detectors/registry/nominalization.d.ts.map +1 -0
- package/dist/detectors/registry/nominalization.js +3 -0
- package/dist/detectors/registry/nominalization.js.map +1 -0
- package/dist/detectors/registry/noun-ending.d.ts +3 -0
- package/dist/detectors/registry/noun-ending.d.ts.map +1 -0
- package/dist/detectors/registry/noun-ending.js +3 -0
- package/dist/detectors/registry/noun-ending.js.map +1 -0
- package/dist/detectors/registry/number-style-consistency.d.ts +3 -0
- package/dist/detectors/registry/number-style-consistency.d.ts.map +1 -0
- package/dist/detectors/registry/number-style-consistency.js +3 -0
- package/dist/detectors/registry/number-style-consistency.js.map +1 -0
- package/dist/detectors/registry/number-without-unit.d.ts +3 -0
- package/dist/detectors/registry/number-without-unit.d.ts.map +1 -0
- package/dist/detectors/registry/number-without-unit.js +3 -0
- package/dist/detectors/registry/number-without-unit.js.map +1 -0
- package/dist/detectors/registry/numbering-gap.d.ts +3 -0
- package/dist/detectors/registry/numbering-gap.d.ts.map +1 -0
- package/dist/detectors/registry/numbering-gap.js +3 -0
- package/dist/detectors/registry/numbering-gap.js.map +1 -0
- package/dist/detectors/registry/one-sentence-paragraph-run.d.ts +3 -0
- package/dist/detectors/registry/one-sentence-paragraph-run.d.ts.map +1 -0
- package/dist/detectors/registry/one-sentence-paragraph-run.js +3 -0
- package/dist/detectors/registry/one-sentence-paragraph-run.js.map +1 -0
- package/dist/detectors/registry/opener-pile.d.ts +3 -0
- package/dist/detectors/registry/opener-pile.d.ts.map +1 -0
- package/dist/detectors/registry/opener-pile.js +3 -0
- package/dist/detectors/registry/opener-pile.js.map +1 -0
- package/dist/detectors/registry/opener-run.d.ts +3 -0
- package/dist/detectors/registry/opener-run.d.ts.map +1 -0
- package/dist/detectors/registry/opener-run.js +3 -0
- package/dist/detectors/registry/opener-run.js.map +1 -0
- package/dist/detectors/registry/orthographic-variant.d.ts +3 -0
- package/dist/detectors/registry/orthographic-variant.d.ts.map +1 -0
- package/dist/detectors/registry/orthographic-variant.js +3 -0
- package/dist/detectors/registry/orthographic-variant.js.map +1 -0
- package/dist/detectors/registry/outside-announced-list.d.ts +3 -0
- package/dist/detectors/registry/outside-announced-list.d.ts.map +1 -0
- package/dist/detectors/registry/outside-announced-list.js +3 -0
- package/dist/detectors/registry/outside-announced-list.js.map +1 -0
- package/dist/detectors/registry/oxford-comma.d.ts +3 -0
- package/dist/detectors/registry/oxford-comma.d.ts.map +1 -0
- package/dist/detectors/registry/oxford-comma.js +3 -0
- package/dist/detectors/registry/oxford-comma.js.map +1 -0
- package/dist/detectors/registry/paragraph-length.d.ts +3 -0
- package/dist/detectors/registry/paragraph-length.d.ts.map +1 -0
- package/dist/detectors/registry/paragraph-length.js +3 -0
- package/dist/detectors/registry/paragraph-length.js.map +1 -0
- package/dist/detectors/registry/paragraph-restatement.d.ts +3 -0
- package/dist/detectors/registry/paragraph-restatement.d.ts.map +1 -0
- package/dist/detectors/registry/paragraph-restatement.js +3 -0
- package/dist/detectors/registry/paragraph-restatement.js.map +1 -0
- package/dist/detectors/registry/paragraph-variance.d.ts +3 -0
- package/dist/detectors/registry/paragraph-variance.d.ts.map +1 -0
- package/dist/detectors/registry/paragraph-variance.js +3 -0
- package/dist/detectors/registry/paragraph-variance.js.map +1 -0
- package/dist/detectors/registry/percent-sum-mismatch.d.ts +3 -0
- package/dist/detectors/registry/percent-sum-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/percent-sum-mismatch.js +3 -0
- package/dist/detectors/registry/percent-sum-mismatch.js.map +1 -0
- package/dist/detectors/registry/person-mix.d.ts +3 -0
- package/dist/detectors/registry/person-mix.d.ts.map +1 -0
- package/dist/detectors/registry/person-mix.js +3 -0
- package/dist/detectors/registry/person-mix.js.map +1 -0
- package/dist/detectors/registry/phrase-count.d.ts +3 -0
- package/dist/detectors/registry/phrase-count.d.ts.map +1 -0
- package/dist/detectors/registry/phrase-count.js +3 -0
- package/dist/detectors/registry/phrase-count.js.map +1 -0
- package/dist/detectors/registry/phrase-density.d.ts +3 -0
- package/dist/detectors/registry/phrase-density.d.ts.map +1 -0
- package/dist/detectors/registry/phrase-density.js +3 -0
- package/dist/detectors/registry/phrase-density.js.map +1 -0
- package/dist/detectors/registry/phrase-match.d.ts +3 -0
- package/dist/detectors/registry/phrase-match.d.ts.map +1 -0
- package/dist/detectors/registry/phrase-match.js +3 -0
- package/dist/detectors/registry/phrase-match.js.map +1 -0
- package/dist/detectors/registry/preamble-length.d.ts +3 -0
- package/dist/detectors/registry/preamble-length.d.ts.map +1 -0
- package/dist/detectors/registry/preamble-length.js +3 -0
- package/dist/detectors/registry/preamble-length.js.map +1 -0
- package/dist/detectors/registry/preferred-term.d.ts +3 -0
- package/dist/detectors/registry/preferred-term.d.ts.map +1 -0
- package/dist/detectors/registry/preferred-term.js +3 -0
- package/dist/detectors/registry/preferred-term.js.map +1 -0
- package/dist/detectors/registry/proper-noun-density.d.ts +3 -0
- package/dist/detectors/registry/proper-noun-density.d.ts.map +1 -0
- package/dist/detectors/registry/proper-noun-density.js +3 -0
- package/dist/detectors/registry/proper-noun-density.js.map +1 -0
- package/dist/detectors/registry/ra-nuki.d.ts +3 -0
- package/dist/detectors/registry/ra-nuki.d.ts.map +1 -0
- package/dist/detectors/registry/ra-nuki.js +3 -0
- package/dist/detectors/registry/ra-nuki.js.map +1 -0
- package/dist/detectors/registry/reference-title-mismatch.d.ts +3 -0
- package/dist/detectors/registry/reference-title-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/reference-title-mismatch.js +3 -0
- package/dist/detectors/registry/reference-title-mismatch.js.map +1 -0
- package/dist/detectors/registry/reference-topic-missing.d.ts +3 -0
- package/dist/detectors/registry/reference-topic-missing.d.ts.map +1 -0
- package/dist/detectors/registry/reference-topic-missing.js +3 -0
- package/dist/detectors/registry/reference-topic-missing.js.map +1 -0
- package/dist/detectors/registry/relative-date-mismatch.d.ts +3 -0
- package/dist/detectors/registry/relative-date-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/relative-date-mismatch.js +3 -0
- package/dist/detectors/registry/relative-date-mismatch.js.map +1 -0
- package/dist/detectors/registry/repeated-conjunction.d.ts +3 -0
- package/dist/detectors/registry/repeated-conjunction.d.ts.map +1 -0
- package/dist/detectors/registry/repeated-conjunction.js +3 -0
- package/dist/detectors/registry/repeated-conjunction.js.map +1 -0
- package/dist/detectors/registry/repeated-head.d.ts +3 -0
- package/dist/detectors/registry/repeated-head.d.ts.map +1 -0
- package/dist/detectors/registry/repeated-head.js +3 -0
- package/dist/detectors/registry/repeated-head.js.map +1 -0
- package/dist/detectors/registry/required-sections.d.ts +3 -0
- package/dist/detectors/registry/required-sections.d.ts.map +1 -0
- package/dist/detectors/registry/required-sections.js +3 -0
- package/dist/detectors/registry/required-sections.js.map +1 -0
- package/dist/detectors/registry/requirement-modal.d.ts +3 -0
- package/dist/detectors/registry/requirement-modal.d.ts.map +1 -0
- package/dist/detectors/registry/requirement-modal.js +3 -0
- package/dist/detectors/registry/requirement-modal.js.map +1 -0
- package/dist/detectors/registry/requirement-smell.d.ts +3 -0
- package/dist/detectors/registry/requirement-smell.d.ts.map +1 -0
- package/dist/detectors/registry/requirement-smell.js +3 -0
- package/dist/detectors/registry/requirement-smell.js.map +1 -0
- package/dist/detectors/registry/rule-of-three.d.ts +3 -0
- package/dist/detectors/registry/rule-of-three.d.ts.map +1 -0
- package/dist/detectors/registry/rule-of-three.js +3 -0
- package/dist/detectors/registry/rule-of-three.js.map +1 -0
- package/dist/detectors/registry/section-uniformity.d.ts +3 -0
- package/dist/detectors/registry/section-uniformity.d.ts.map +1 -0
- package/dist/detectors/registry/section-uniformity.js +3 -0
- package/dist/detectors/registry/section-uniformity.js.map +1 -0
- package/dist/detectors/registry/sentence-comma-count.d.ts +3 -0
- package/dist/detectors/registry/sentence-comma-count.d.ts.map +1 -0
- package/dist/detectors/registry/sentence-comma-count.js +3 -0
- package/dist/detectors/registry/sentence-comma-count.js.map +1 -0
- package/dist/detectors/registry/sentence-conjunctive-count.d.ts +3 -0
- package/dist/detectors/registry/sentence-conjunctive-count.d.ts.map +1 -0
- package/dist/detectors/registry/sentence-conjunctive-count.js +3 -0
- package/dist/detectors/registry/sentence-conjunctive-count.js.map +1 -0
- package/dist/detectors/registry/sentence-ending.d.ts +3 -0
- package/dist/detectors/registry/sentence-ending.d.ts.map +1 -0
- package/dist/detectors/registry/sentence-ending.js +3 -0
- package/dist/detectors/registry/sentence-ending.js.map +1 -0
- package/dist/detectors/registry/sentence-length.d.ts +3 -0
- package/dist/detectors/registry/sentence-length.d.ts.map +1 -0
- package/dist/detectors/registry/sentence-length.js +3 -0
- package/dist/detectors/registry/sentence-length.js.map +1 -0
- package/dist/detectors/registry/sentence-rhythm.d.ts +3 -0
- package/dist/detectors/registry/sentence-rhythm.d.ts.map +1 -0
- package/dist/detectors/registry/sentence-rhythm.js +3 -0
- package/dist/detectors/registry/sentence-rhythm.js.map +1 -0
- package/dist/detectors/registry/sentence-word-count.d.ts +3 -0
- package/dist/detectors/registry/sentence-word-count.d.ts.map +1 -0
- package/dist/detectors/registry/sentence-word-count.js +3 -0
- package/dist/detectors/registry/sentence-word-count.js.map +1 -0
- package/dist/detectors/registry/space-before-punctuation.d.ts +3 -0
- package/dist/detectors/registry/space-before-punctuation.d.ts.map +1 -0
- package/dist/detectors/registry/space-before-punctuation.js +3 -0
- package/dist/detectors/registry/space-before-punctuation.js.map +1 -0
- package/dist/detectors/registry/spelling-variety.d.ts +3 -0
- package/dist/detectors/registry/spelling-variety.d.ts.map +1 -0
- package/dist/detectors/registry/spelling-variety.js +3 -0
- package/dist/detectors/registry/spelling-variety.js.map +1 -0
- package/dist/detectors/registry/stock-transition.d.ts +3 -0
- package/dist/detectors/registry/stock-transition.d.ts.map +1 -0
- package/dist/detectors/registry/stock-transition.js +3 -0
- package/dist/detectors/registry/stock-transition.js.map +1 -0
- package/dist/detectors/registry/stray-space.d.ts +3 -0
- package/dist/detectors/registry/stray-space.d.ts.map +1 -0
- package/dist/detectors/registry/stray-space.js +3 -0
- package/dist/detectors/registry/stray-space.js.map +1 -0
- package/dist/detectors/registry/summary-fact-mismatch.d.ts +3 -0
- package/dist/detectors/registry/summary-fact-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/summary-fact-mismatch.js +3 -0
- package/dist/detectors/registry/summary-fact-mismatch.js.map +1 -0
- package/dist/detectors/registry/table-header-variant.d.ts +3 -0
- package/dist/detectors/registry/table-header-variant.d.ts.map +1 -0
- package/dist/detectors/registry/table-header-variant.js +3 -0
- package/dist/detectors/registry/table-header-variant.js.map +1 -0
- package/dist/detectors/registry/title-case-mix.d.ts +3 -0
- package/dist/detectors/registry/title-case-mix.d.ts.map +1 -0
- package/dist/detectors/registry/title-case-mix.js +3 -0
- package/dist/detectors/registry/title-case-mix.js.map +1 -0
- package/dist/detectors/registry/title-length.d.ts +3 -0
- package/dist/detectors/registry/title-length.d.ts.map +1 -0
- package/dist/detectors/registry/title-length.js +3 -0
- package/dist/detectors/registry/title-length.js.map +1 -0
- package/dist/detectors/registry/topic-predicate-distance.d.ts +3 -0
- package/dist/detectors/registry/topic-predicate-distance.d.ts.map +1 -0
- package/dist/detectors/registry/topic-predicate-distance.js +3 -0
- package/dist/detectors/registry/topic-predicate-distance.js.map +1 -0
- package/dist/detectors/registry/total-mismatch.d.ts +3 -0
- package/dist/detectors/registry/total-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/total-mismatch.js +3 -0
- package/dist/detectors/registry/total-mismatch.js.map +1 -0
- package/dist/detectors/registry/unbalanced-bracket.d.ts +3 -0
- package/dist/detectors/registry/unbalanced-bracket.d.ts.map +1 -0
- package/dist/detectors/registry/unbalanced-bracket.js +3 -0
- package/dist/detectors/registry/unbalanced-bracket.js.map +1 -0
- package/dist/detectors/registry/undefined-acronym.d.ts +3 -0
- package/dist/detectors/registry/undefined-acronym.d.ts.map +1 -0
- package/dist/detectors/registry/undefined-acronym.js +3 -0
- package/dist/detectors/registry/undefined-acronym.js.map +1 -0
- package/dist/detectors/registry/unfilled-placeholder.d.ts +3 -0
- package/dist/detectors/registry/unfilled-placeholder.d.ts.map +1 -0
- package/dist/detectors/registry/unfilled-placeholder.js +3 -0
- package/dist/detectors/registry/unfilled-placeholder.js.map +1 -0
- package/dist/detectors/registry/unit-mismatch.d.ts +3 -0
- package/dist/detectors/registry/unit-mismatch.d.ts.map +1 -0
- package/dist/detectors/registry/unit-mismatch.js +3 -0
- package/dist/detectors/registry/unit-mismatch.js.map +1 -0
- package/dist/detectors/registry/unknown-word.d.ts +3 -0
- package/dist/detectors/registry/unknown-word.d.ts.map +1 -0
- package/dist/detectors/registry/unknown-word.js +3 -0
- package/dist/detectors/registry/unknown-word.js.map +1 -0
- package/dist/detectors/registry/unqualified-superlative.d.ts +3 -0
- package/dist/detectors/registry/unqualified-superlative.d.ts.map +1 -0
- package/dist/detectors/registry/unqualified-superlative.js +3 -0
- package/dist/detectors/registry/unqualified-superlative.js.map +1 -0
- package/dist/detectors/registry/unused-definition.d.ts +3 -0
- package/dist/detectors/registry/unused-definition.d.ts.map +1 -0
- package/dist/detectors/registry/unused-definition.js +3 -0
- package/dist/detectors/registry/unused-definition.js.map +1 -0
- package/dist/detectors/registry/url-run-on.d.ts +3 -0
- package/dist/detectors/registry/url-run-on.d.ts.map +1 -0
- package/dist/detectors/registry/url-run-on.js +3 -0
- package/dist/detectors/registry/url-run-on.js.map +1 -0
- package/dist/detectors/registry/use-before-definition.d.ts +3 -0
- package/dist/detectors/registry/use-before-definition.d.ts.map +1 -0
- package/dist/detectors/registry/use-before-definition.js +3 -0
- package/dist/detectors/registry/use-before-definition.js.map +1 -0
- package/dist/detectors/registry/vague-density.d.ts +3 -0
- package/dist/detectors/registry/vague-density.d.ts.map +1 -0
- package/dist/detectors/registry/vague-density.js +3 -0
- package/dist/detectors/registry/vague-density.js.map +1 -0
- package/dist/detectors/registry/vague-figure-pointer.d.ts +3 -0
- package/dist/detectors/registry/vague-figure-pointer.d.ts.map +1 -0
- package/dist/detectors/registry/vague-figure-pointer.js +3 -0
- package/dist/detectors/registry/vague-figure-pointer.js.map +1 -0
- package/dist/detectors/registry/vague-link-text.d.ts +3 -0
- package/dist/detectors/registry/vague-link-text.d.ts.map +1 -0
- package/dist/detectors/registry/vague-link-text.js +3 -0
- package/dist/detectors/registry/vague-link-text.js.map +1 -0
- package/dist/detectors/registry-files.d.ts +11 -0
- package/dist/detectors/registry-files.d.ts.map +1 -0
- package/dist/detectors/registry-files.js +9 -0
- package/dist/detectors/registry-files.js.map +1 -0
- package/dist/detectors/registry-load.d.ts +6 -0
- package/dist/detectors/registry-load.d.ts.map +1 -0
- package/dist/detectors/registry-load.js +19 -0
- package/dist/detectors/registry-load.js.map +1 -0
- package/dist/detectors/relative-dates.d.ts +4 -0
- package/dist/detectors/relative-dates.d.ts.map +1 -0
- package/dist/detectors/relative-dates.js +100 -0
- package/dist/detectors/relative-dates.js.map +1 -0
- package/dist/detectors/requirement-modal.d.ts +5 -0
- package/dist/detectors/requirement-modal.d.ts.map +1 -0
- package/dist/detectors/requirement-modal.js +54 -0
- package/dist/detectors/requirement-modal.js.map +1 -0
- package/dist/detectors/requirement-smell.d.ts +4 -0
- package/dist/detectors/requirement-smell.d.ts.map +1 -0
- package/dist/detectors/requirement-smell.js +41 -0
- package/dist/detectors/requirement-smell.js.map +1 -0
- package/dist/detectors/sentence-counts.d.ts +19 -0
- package/dist/detectors/sentence-counts.d.ts.map +1 -0
- package/dist/detectors/sentence-counts.js +83 -0
- package/dist/detectors/sentence-counts.js.map +1 -0
- package/dist/detectors/sentence-load.d.ts +8 -0
- package/dist/detectors/sentence-load.d.ts.map +1 -0
- package/dist/detectors/sentence-load.js +35 -0
- package/dist/detectors/sentence-load.js.map +1 -0
- package/dist/detectors/space-before-punctuation.d.ts +8 -0
- package/dist/detectors/space-before-punctuation.d.ts.map +1 -0
- package/dist/detectors/space-before-punctuation.js +24 -0
- package/dist/detectors/space-before-punctuation.js.map +1 -0
- package/dist/detectors/spelling-variety.d.ts +24 -0
- package/dist/detectors/spelling-variety.d.ts.map +1 -0
- package/dist/detectors/spelling-variety.js +59 -0
- package/dist/detectors/spelling-variety.js.map +1 -0
- package/dist/detectors/structure-tree.d.ts.map +1 -1
- package/dist/detectors/structure-tree.js +3 -1
- package/dist/detectors/structure-tree.js.map +1 -1
- package/dist/detectors/structure.d.ts.map +1 -1
- package/dist/detectors/structure.js +16 -2
- package/dist/detectors/structure.js.map +1 -1
- package/dist/detectors/superlative-comparison.d.ts +20 -0
- package/dist/detectors/superlative-comparison.d.ts.map +1 -0
- package/dist/detectors/superlative-comparison.js +32 -0
- package/dist/detectors/superlative-comparison.js.map +1 -0
- package/dist/detectors/table-header.d.ts +28 -0
- package/dist/detectors/table-header.d.ts.map +1 -0
- package/dist/detectors/table-header.js +148 -0
- package/dist/detectors/table-header.js.map +1 -0
- package/dist/detectors/team.d.ts +3 -1
- package/dist/detectors/team.d.ts.map +1 -1
- package/dist/detectors/team.js +10 -3
- package/dist/detectors/team.js.map +1 -1
- package/dist/detectors/unit-consistency.d.ts +4 -0
- package/dist/detectors/unit-consistency.d.ts.map +1 -0
- package/dist/detectors/unit-consistency.js +53 -0
- package/dist/detectors/unit-consistency.js.map +1 -0
- package/dist/detectors/unknown-word.d.ts +7 -0
- package/dist/detectors/unknown-word.d.ts.map +1 -0
- package/dist/detectors/unknown-word.js +40 -0
- package/dist/detectors/unknown-word.js.map +1 -0
- package/dist/detectors/url-run-on.d.ts.map +1 -1
- package/dist/detectors/url-run-on.js +6 -1
- package/dist/detectors/url-run-on.js.map +1 -1
- package/dist/detectors/vague-figure-pointer.d.ts +10 -0
- package/dist/detectors/vague-figure-pointer.d.ts.map +1 -0
- package/dist/detectors/vague-figure-pointer.js +46 -0
- package/dist/detectors/vague-figure-pointer.js.map +1 -0
- package/dist/detectors/vague-link-text.d.ts +4 -0
- package/dist/detectors/vague-link-text.d.ts.map +1 -0
- package/dist/detectors/vague-link-text.js +11 -0
- package/dist/detectors/vague-link-text.js.map +1 -0
- package/dist/detectors/word-list.d.ts +2 -0
- package/dist/detectors/word-list.d.ts.map +1 -1
- package/dist/detectors/word-list.js +4 -1
- package/dist/detectors/word-list.js.map +1 -1
- package/dist/document-reading.d.ts +15 -0
- package/dist/document-reading.d.ts.map +1 -0
- package/dist/document-reading.js +23 -0
- package/dist/document-reading.js.map +1 -0
- package/dist/document.d.ts +9 -3
- package/dist/document.d.ts.map +1 -1
- package/dist/document.js +61 -36
- package/dist/document.js.map +1 -1
- package/dist/experimental-alone.d.ts +13 -0
- package/dist/experimental-alone.d.ts.map +1 -0
- package/dist/experimental-alone.js +11 -0
- package/dist/experimental-alone.js.map +1 -0
- package/dist/extension/document-view.d.ts +7 -0
- package/dist/extension/document-view.d.ts.map +1 -0
- package/dist/extension/document-view.js +91 -0
- package/dist/extension/document-view.js.map +1 -0
- package/dist/extension/failure-text.d.ts +5 -0
- package/dist/extension/failure-text.d.ts.map +1 -0
- package/dist/extension/failure-text.js +33 -0
- package/dist/extension/failure-text.js.map +1 -0
- package/dist/extension/import-default.d.ts +7 -0
- package/dist/extension/import-default.d.ts.map +1 -0
- package/dist/extension/import-default.js +21 -0
- package/dist/extension/import-default.js.map +1 -0
- package/dist/extension/load.d.ts +28 -0
- package/dist/extension/load.d.ts.map +1 -0
- package/dist/extension/load.js +51 -0
- package/dist/extension/load.js.map +1 -0
- package/dist/extension/module-detector.d.ts +21 -0
- package/dist/extension/module-detector.d.ts.map +1 -0
- package/dist/extension/module-detector.js +49 -0
- package/dist/extension/module-detector.js.map +1 -0
- package/dist/extension/plugin-load.d.ts +9 -0
- package/dist/extension/plugin-load.d.ts.map +1 -0
- package/dist/extension/plugin-load.js +68 -0
- package/dist/extension/plugin-load.js.map +1 -0
- package/dist/extension/plugin-name.d.ts +8 -0
- package/dist/extension/plugin-name.d.ts.map +1 -0
- package/dist/extension/plugin-name.js +22 -0
- package/dist/extension/plugin-name.js.map +1 -0
- package/dist/extension/plugin-parse.d.ts +41 -0
- package/dist/extension/plugin-parse.d.ts.map +1 -0
- package/dist/extension/plugin-parse.js +156 -0
- package/dist/extension/plugin-parse.js.map +1 -0
- package/dist/extension/problem-text.d.ts +5 -0
- package/dist/extension/problem-text.d.ts.map +1 -0
- package/dist/extension/problem-text.js +74 -0
- package/dist/extension/problem-text.js.map +1 -0
- package/dist/extension/real-path.d.ts +3 -0
- package/dist/extension/real-path.d.ts.map +1 -0
- package/dist/extension/real-path.js +8 -0
- package/dist/extension/real-path.js.map +1 -0
- package/dist/extension/returned-findings.d.ts +17 -0
- package/dist/extension/returned-findings.d.ts.map +1 -0
- package/dist/extension/returned-findings.js +48 -0
- package/dist/extension/returned-findings.js.map +1 -0
- package/dist/extension/rule-export.d.ts +13 -0
- package/dist/extension/rule-export.d.ts.map +1 -0
- package/dist/extension/rule-export.js +16 -0
- package/dist/extension/rule-export.js.map +1 -0
- package/dist/facts/fact-conflicts.d.ts +15 -0
- package/dist/facts/fact-conflicts.d.ts.map +1 -0
- package/dist/facts/fact-conflicts.js +50 -0
- package/dist/facts/fact-conflicts.js.map +1 -0
- package/dist/facts/fact-scope.d.ts +17 -0
- package/dist/facts/fact-scope.d.ts.map +1 -0
- package/dist/facts/fact-scope.js +112 -0
- package/dist/facts/fact-scope.js.map +1 -0
- package/dist/facts/fact-values.d.ts +18 -0
- package/dist/facts/fact-values.d.ts.map +1 -0
- package/dist/facts/fact-values.js +98 -0
- package/dist/facts/fact-values.js.map +1 -0
- package/dist/facts/labelled-facts.d.ts +31 -0
- package/dist/facts/labelled-facts.d.ts.map +1 -0
- package/dist/facts/labelled-facts.js +94 -0
- package/dist/facts/labelled-facts.js.map +1 -0
- package/dist/facts/measures.d.ts +20 -0
- package/dist/facts/measures.d.ts.map +1 -0
- package/dist/facts/measures.js +40 -0
- package/dist/facts/measures.js.map +1 -0
- package/dist/facts/table-facts.d.ts +5 -0
- package/dist/facts/table-facts.d.ts.map +1 -0
- package/dist/facts/table-facts.js +55 -0
- package/dist/facts/table-facts.js.map +1 -0
- package/dist/facts/trim-marks.d.ts +7 -0
- package/dist/facts/trim-marks.d.ts.map +1 -0
- package/dist/facts/trim-marks.js +18 -0
- package/dist/facts/trim-marks.js.map +1 -0
- package/dist/facts/unit-conflicts.d.ts +14 -0
- package/dist/facts/unit-conflicts.d.ts.map +1 -0
- package/dist/facts/unit-conflicts.js +36 -0
- package/dist/facts/unit-conflicts.js.map +1 -0
- package/dist/feedback/draft.d.ts +2 -0
- package/dist/feedback/draft.d.ts.map +1 -1
- package/dist/feedback/draft.js +3 -0
- package/dist/feedback/draft.js.map +1 -1
- package/dist/figure-references.d.ts +26 -2
- package/dist/figure-references.d.ts.map +1 -1
- package/dist/figure-references.js +64 -13
- package/dist/figure-references.js.map +1 -1
- package/dist/files.d.ts +3 -1
- package/dist/files.d.ts.map +1 -1
- package/dist/files.js +10 -7
- package/dist/files.js.map +1 -1
- package/dist/finding-order.d.ts +9 -0
- package/dist/finding-order.d.ts.map +1 -0
- package/dist/finding-order.js +3 -0
- package/dist/finding-order.js.map +1 -0
- package/dist/fix-plan/mode.d.ts +26 -0
- package/dist/fix-plan/mode.d.ts.map +1 -0
- package/dist/fix-plan/mode.js +20 -0
- package/dist/fix-plan/mode.js.map +1 -0
- package/dist/fix-plan/plan.d.ts +89 -0
- package/dist/fix-plan/plan.d.ts.map +1 -0
- package/dist/fix-plan/plan.js +111 -0
- package/dist/fix-plan/plan.js.map +1 -0
- package/dist/fix-plan/render.d.ts +6 -0
- package/dist/fix-plan/render.d.ts.map +1 -0
- package/dist/fix-plan/render.js +118 -0
- package/dist/fix-plan/render.js.map +1 -0
- package/dist/fix-plan/structure-target-text.d.ts +15 -0
- package/dist/fix-plan/structure-target-text.d.ts.map +1 -0
- package/dist/fix-plan/structure-target-text.js +57 -0
- package/dist/fix-plan/structure-target-text.js.map +1 -0
- package/dist/fix-plan/structure-targets.d.ts +24 -0
- package/dist/fix-plan/structure-targets.d.ts.map +1 -0
- package/dist/fix-plan/structure-targets.js +27 -0
- package/dist/fix-plan/structure-targets.js.map +1 -0
- package/dist/fix-plan/text.d.ts +35 -0
- package/dist/fix-plan/text.d.ts.map +1 -0
- package/dist/fix-plan/text.js +97 -0
- package/dist/fix-plan/text.js.map +1 -0
- package/dist/grade/baseline-text.d.ts +27 -0
- package/dist/grade/baseline-text.d.ts.map +1 -0
- package/dist/grade/baseline-text.js +49 -0
- package/dist/grade/baseline-text.js.map +1 -0
- package/dist/grade/baseline.d.ts +51 -0
- package/dist/grade/baseline.d.ts.map +1 -0
- package/dist/grade/baseline.js +84 -0
- package/dist/grade/baseline.js.map +1 -0
- package/dist/grade/checks.d.ts +28 -0
- package/dist/grade/checks.d.ts.map +1 -0
- package/dist/grade/checks.js +50 -0
- package/dist/grade/checks.js.map +1 -0
- package/dist/grade/context-support.d.ts +23 -0
- package/dist/grade/context-support.d.ts.map +1 -0
- package/dist/grade/context-support.js +33 -0
- package/dist/grade/context-support.js.map +1 -0
- package/dist/grade/contexts.d.ts +16 -0
- package/dist/grade/contexts.d.ts.map +1 -0
- package/dist/grade/contexts.js +34 -0
- package/dist/grade/contexts.js.map +1 -0
- package/dist/grade/grade-item.d.ts +12 -0
- package/dist/grade/grade-item.d.ts.map +1 -0
- package/dist/grade/grade-item.js +103 -0
- package/dist/grade/grade-item.js.map +1 -0
- package/dist/grade/item.d.ts +54 -0
- package/dist/grade/item.d.ts.map +1 -0
- package/dist/grade/item.js +155 -0
- package/dist/grade/item.js.map +1 -0
- package/dist/grade/order.d.ts +7 -0
- package/dist/grade/order.d.ts.map +1 -0
- package/dist/grade/order.js +7 -0
- package/dist/grade/order.js.map +1 -0
- package/dist/grade/pairing.d.ts +13 -0
- package/dist/grade/pairing.d.ts.map +1 -0
- package/dist/grade/pairing.js +14 -0
- package/dist/grade/pairing.js.map +1 -0
- package/dist/grade/rates.d.ts +14 -0
- package/dist/grade/rates.d.ts.map +1 -0
- package/dist/grade/rates.js +26 -0
- package/dist/grade/rates.js.map +1 -0
- package/dist/grade/render-baseline.d.ts +7 -0
- package/dist/grade/render-baseline.d.ts.map +1 -0
- package/dist/grade/render-baseline.js +44 -0
- package/dist/grade/render-baseline.js.map +1 -0
- package/dist/grade/render-markdown.d.ts +15 -0
- package/dist/grade/render-markdown.d.ts.map +1 -0
- package/dist/grade/render-markdown.js +41 -0
- package/dist/grade/render-markdown.js.map +1 -0
- package/dist/grade/render-variants.d.ts +12 -0
- package/dist/grade/render-variants.d.ts.map +1 -0
- package/dist/grade/render-variants.js +80 -0
- package/dist/grade/render-variants.js.map +1 -0
- package/dist/grade/render.d.ts +14 -0
- package/dist/grade/render.d.ts.map +1 -0
- package/dist/grade/render.js +52 -0
- package/dist/grade/render.js.map +1 -0
- package/dist/grade/result-name.d.ts +7 -0
- package/dist/grade/result-name.d.ts.map +1 -0
- package/dist/grade/result-name.js +6 -0
- package/dist/grade/result-name.js.map +1 -0
- package/dist/grade/result.d.ts +101 -0
- package/dist/grade/result.d.ts.map +1 -0
- package/dist/grade/result.js +2 -0
- package/dist/grade/result.js.map +1 -0
- package/dist/grade/results-read.d.ts +10 -0
- package/dist/grade/results-read.d.ts.map +1 -0
- package/dist/grade/results-read.js +82 -0
- package/dist/grade/results-read.js.map +1 -0
- package/dist/grade/rubric-verdict.d.ts +19 -0
- package/dist/grade/rubric-verdict.d.ts.map +1 -0
- package/dist/grade/rubric-verdict.js +65 -0
- package/dist/grade/rubric-verdict.js.map +1 -0
- package/dist/grade/rubric.d.ts +52 -0
- package/dist/grade/rubric.d.ts.map +1 -0
- package/dist/grade/rubric.js +149 -0
- package/dist/grade/rubric.js.map +1 -0
- package/dist/grade/scorer.d.ts +13 -0
- package/dist/grade/scorer.d.ts.map +1 -0
- package/dist/grade/scorer.js +15 -0
- package/dist/grade/scorer.js.map +1 -0
- package/dist/grade/setup.d.ts +9 -0
- package/dist/grade/setup.d.ts.map +1 -0
- package/dist/grade/setup.js +31 -0
- package/dist/grade/setup.js.map +1 -0
- package/dist/grade/stamp.d.ts +23 -0
- package/dist/grade/stamp.d.ts.map +1 -0
- package/dist/grade/stamp.js +36 -0
- package/dist/grade/stamp.js.map +1 -0
- package/dist/grade/summary.d.ts +43 -0
- package/dist/grade/summary.d.ts.map +1 -0
- package/dist/grade/summary.js +72 -0
- package/dist/grade/summary.js.map +1 -0
- package/dist/grade/text.d.ts +32 -0
- package/dist/grade/text.d.ts.map +1 -0
- package/dist/grade/text.js +117 -0
- package/dist/grade/text.js.map +1 -0
- package/dist/grade/variants-input.d.ts +12 -0
- package/dist/grade/variants-input.d.ts.map +1 -0
- package/dist/grade/variants-input.js +42 -0
- package/dist/grade/variants-input.js.map +1 -0
- package/dist/grade/variants-text.d.ts +31 -0
- package/dist/grade/variants-text.d.ts.map +1 -0
- package/dist/grade/variants-text.js +57 -0
- package/dist/grade/variants-text.js.map +1 -0
- package/dist/grade/variants.d.ts +63 -0
- package/dist/grade/variants.d.ts.map +1 -0
- package/dist/grade/variants.js +66 -0
- package/dist/grade/variants.js.map +1 -0
- package/dist/grade/verdict.d.ts +18 -0
- package/dist/grade/verdict.d.ts.map +1 -0
- package/dist/grade/verdict.js +17 -0
- package/dist/grade/verdict.js.map +1 -0
- package/dist/grade-api.d.ts +53 -0
- package/dist/grade-api.d.ts.map +1 -0
- package/dist/grade-api.js +140 -0
- package/dist/grade-api.js.map +1 -0
- package/dist/heading-numbering.d.ts +32 -0
- package/dist/heading-numbering.d.ts.map +1 -0
- package/dist/heading-numbering.js +72 -0
- package/dist/heading-numbering.js.map +1 -0
- package/dist/kana-spelling.d.ts +14 -0
- package/dist/kana-spelling.d.ts.map +1 -0
- package/dist/kana-spelling.js +43 -0
- package/dist/kana-spelling.js.map +1 -0
- package/dist/language-sample.d.ts +2 -0
- package/dist/language-sample.d.ts.map +1 -0
- package/dist/language-sample.js +41 -0
- package/dist/language-sample.js.map +1 -0
- package/dist/link-line.d.ts +8 -0
- package/dist/link-line.d.ts.map +1 -0
- package/dist/link-line.js +12 -0
- package/dist/link-line.js.map +1 -0
- package/dist/link-text.d.ts +12 -0
- package/dist/link-text.d.ts.map +1 -0
- package/dist/link-text.js +45 -0
- package/dist/link-text.js.map +1 -0
- package/dist/long-vowel.d.ts +9 -6
- package/dist/long-vowel.d.ts.map +1 -1
- package/dist/long-vowel.js +15 -8
- package/dist/long-vowel.js.map +1 -1
- package/dist/markup.d.ts.map +1 -1
- package/dist/markup.js +4 -2
- package/dist/markup.js.map +1 -1
- package/dist/name-variants.d.ts +25 -0
- package/dist/name-variants.d.ts.map +1 -0
- package/dist/name-variants.js +181 -0
- package/dist/name-variants.js.map +1 -0
- package/dist/node-version.d.ts +7 -0
- package/dist/node-version.d.ts.map +1 -0
- package/dist/node-version.js +19 -0
- package/dist/node-version.js.map +1 -0
- package/dist/not-run.d.ts +14 -0
- package/dist/not-run.d.ts.map +1 -0
- package/dist/not-run.js +12 -0
- package/dist/not-run.js.map +1 -0
- package/dist/orthography.d.ts +8 -1
- package/dist/orthography.d.ts.map +1 -1
- package/dist/orthography.js +33 -12
- package/dist/orthography.js.map +1 -1
- package/dist/outline/render.d.ts +20 -0
- package/dist/outline/render.d.ts.map +1 -0
- package/dist/outline/render.js +66 -0
- package/dist/outline/render.js.map +1 -0
- package/dist/outline/shape.d.ts +26 -0
- package/dist/outline/shape.d.ts.map +1 -0
- package/dist/outline/shape.js +37 -0
- package/dist/outline/shape.js.map +1 -0
- package/dist/outline/structure-render.d.ts +15 -0
- package/dist/outline/structure-render.d.ts.map +1 -0
- package/dist/outline/structure-render.js +80 -0
- package/dist/outline/structure-render.js.map +1 -0
- package/dist/outline/structure-text.d.ts +30 -0
- package/dist/outline/structure-text.d.ts.map +1 -0
- package/dist/outline/structure-text.js +87 -0
- package/dist/outline/structure-text.js.map +1 -0
- package/dist/outline/text.d.ts +24 -0
- package/dist/outline/text.d.ts.map +1 -0
- package/dist/outline/text.js +33 -0
- package/dist/outline/text.js.map +1 -0
- package/dist/paragraph-runs.d.ts +7 -0
- package/dist/paragraph-runs.d.ts.map +1 -0
- package/dist/paragraph-runs.js +27 -0
- package/dist/paragraph-runs.js.map +1 -0
- package/dist/person-forms.d.ts +30 -0
- package/dist/person-forms.d.ts.map +1 -0
- package/dist/person-forms.js +96 -0
- package/dist/person-forms.js.map +1 -0
- package/dist/plugin.d.ts +38 -2
- package/dist/plugin.d.ts.map +1 -1
- package/dist/reasons.d.ts +3 -0
- package/dist/reasons.d.ts.map +1 -1
- package/dist/reasons.js +4 -0
- package/dist/reasons.js.map +1 -1
- package/dist/render/compact.d.ts +3 -1
- package/dist/render/compact.d.ts.map +1 -1
- package/dist/render/compact.js +8 -2
- package/dist/render/compact.js.map +1 -1
- package/dist/render/explain.d.ts +5 -1
- package/dist/render/explain.d.ts.map +1 -1
- package/dist/render/explain.js +35 -16
- package/dist/render/explain.js.map +1 -1
- package/dist/render/friendly.d.ts.map +1 -1
- package/dist/render/friendly.js +13 -1
- package/dist/render/friendly.js.map +1 -1
- package/dist/render/rules-json.d.ts.map +1 -1
- package/dist/render/rules-json.js +21 -13
- package/dist/render/rules-json.js.map +1 -1
- package/dist/render/rules-table.d.ts +2 -0
- package/dist/render/rules-table.d.ts.map +1 -1
- package/dist/render/rules-table.js +1 -1
- package/dist/render/rules-table.js.map +1 -1
- package/dist/render/sarif.d.ts +7 -1
- package/dist/render/sarif.d.ts.map +1 -1
- package/dist/render/sarif.js +20 -1
- package/dist/render/sarif.js.map +1 -1
- package/dist/render/suppressions.d.ts +3 -0
- package/dist/render/suppressions.d.ts.map +1 -1
- package/dist/render/suppressions.js +20 -1
- package/dist/render/suppressions.js.map +1 -1
- package/dist/resolve-genre.d.ts +1 -2
- package/dist/resolve-genre.d.ts.map +1 -1
- package/dist/rule-guide.d.ts +21 -0
- package/dist/rule-guide.d.ts.map +1 -1
- package/dist/rule-guide.js +15 -0
- package/dist/rule-guide.js.map +1 -1
- package/dist/run-semantic.d.ts.map +1 -1
- package/dist/run-semantic.js +2 -1
- package/dist/run-semantic.js.map +1 -1
- package/dist/run.d.ts +8 -1
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +64 -24
- package/dist/run.js.map +1 -1
- package/dist/sentence-load.d.ts +19 -0
- package/dist/sentence-load.d.ts.map +1 -0
- package/dist/sentence-load.js +70 -0
- package/dist/sentence-load.js.map +1 -0
- package/dist/setting-problems.d.ts.map +1 -1
- package/dist/setting-problems.js +3 -1
- package/dist/setting-problems.js.map +1 -1
- package/dist/spacing-minority.d.ts +16 -0
- package/dist/spacing-minority.d.ts.map +1 -0
- package/dist/spacing-minority.js +23 -0
- package/dist/spacing-minority.js.map +1 -0
- package/dist/spelling-variants.d.ts +17 -0
- package/dist/spelling-variants.d.ts.map +1 -0
- package/dist/spelling-variants.js +32 -0
- package/dist/spelling-variants.js.map +1 -0
- package/dist/spelling.d.ts +32 -0
- package/dist/spelling.d.ts.map +1 -0
- package/dist/spelling.js +54 -0
- package/dist/spelling.js.map +1 -0
- package/dist/stet-block.d.ts +5 -0
- package/dist/stet-block.d.ts.map +1 -0
- package/dist/stet-block.js +59 -0
- package/dist/stet-block.js.map +1 -0
- package/dist/stet.d.ts +4 -0
- package/dist/stet.d.ts.map +1 -1
- package/dist/stet.js +31 -11
- package/dist/stet.js.map +1 -1
- package/dist/structure/absolute-exception.d.ts +35 -0
- package/dist/structure/absolute-exception.d.ts.map +1 -0
- package/dist/structure/absolute-exception.js +70 -0
- package/dist/structure/absolute-exception.js.map +1 -0
- package/dist/structure/date-range.d.ts +10 -0
- package/dist/structure/date-range.d.ts.map +1 -1
- package/dist/structure/date-range.js +33 -1
- package/dist/structure/date-range.js.map +1 -1
- package/dist/structure/definition-use.d.ts +32 -0
- package/dist/structure/definition-use.d.ts.map +1 -0
- package/dist/structure/definition-use.js +102 -0
- package/dist/structure/definition-use.js.map +1 -0
- package/dist/structure/issues.d.ts +5 -0
- package/dist/structure/issues.d.ts.map +1 -1
- package/dist/structure/issues.js +22 -0
- package/dist/structure/issues.js.map +1 -1
- package/dist/structure/lazy-tree.d.ts +8 -0
- package/dist/structure/lazy-tree.d.ts.map +1 -0
- package/dist/structure/lazy-tree.js +14 -0
- package/dist/structure/lazy-tree.js.map +1 -0
- package/dist/structure/modal-conflict.d.ts +29 -0
- package/dist/structure/modal-conflict.d.ts.map +1 -0
- package/dist/structure/modal-conflict.js +74 -0
- package/dist/structure/modal-conflict.js.map +1 -0
- package/dist/structure/numbered-clauses.d.ts +4 -0
- package/dist/structure/numbered-clauses.d.ts.map +1 -0
- package/dist/structure/numbered-clauses.js +9 -0
- package/dist/structure/numbered-clauses.js.map +1 -0
- package/dist/structure/reference-text.d.ts +29 -0
- package/dist/structure/reference-text.d.ts.map +1 -0
- package/dist/structure/reference-text.js +79 -0
- package/dist/structure/reference-text.js.map +1 -0
- package/dist/structure/universal.d.ts.map +1 -1
- package/dist/structure/universal.js +8 -2
- package/dist/structure/universal.js.map +1 -1
- package/dist/structure-shape/baseline-load.d.ts +4 -0
- package/dist/structure-shape/baseline-load.d.ts.map +1 -0
- package/dist/structure-shape/baseline-load.js +17 -0
- package/dist/structure-shape/baseline-load.js.map +1 -0
- package/dist/structure-shape/baseline.d.ts +19 -0
- package/dist/structure-shape/baseline.d.ts.map +1 -0
- package/dist/structure-shape/baseline.js +44 -0
- package/dist/structure-shape/baseline.js.map +1 -0
- package/dist/structure-shape/features.d.ts +25 -0
- package/dist/structure-shape/features.d.ts.map +1 -0
- package/dist/structure-shape/features.js +149 -0
- package/dist/structure-shape/features.js.map +1 -0
- package/dist/structure-shape/heading-words.d.ts +14 -0
- package/dist/structure-shape/heading-words.d.ts.map +1 -0
- package/dist/structure-shape/heading-words.js +54 -0
- package/dist/structure-shape/heading-words.js.map +1 -0
- package/dist/structure-shape/of-document.d.ts +5 -0
- package/dist/structure-shape/of-document.d.ts.map +1 -0
- package/dist/structure-shape/of-document.js +6 -0
- package/dist/structure-shape/of-document.js.map +1 -0
- package/dist/structure-shape/restatement.d.ts +11 -0
- package/dist/structure-shape/restatement.d.ts.map +1 -0
- package/dist/structure-shape/restatement.js +32 -0
- package/dist/structure-shape/restatement.js.map +1 -0
- package/dist/structure-shape/score.d.ts +30 -0
- package/dist/structure-shape/score.d.ts.map +1 -0
- package/dist/structure-shape/score.js +37 -0
- package/dist/structure-shape/score.js.map +1 -0
- package/dist/style-parse.d.ts +6 -0
- package/dist/style-parse.d.ts.map +1 -1
- package/dist/style-parse.js +32 -4
- package/dist/style-parse.js.map +1 -1
- package/dist/subheading-line.d.ts +19 -2
- package/dist/subheading-line.d.ts.map +1 -1
- package/dist/subheading-line.js +39 -11
- package/dist/subheading-line.js.map +1 -1
- package/dist/tag-coverage.d.ts +8 -0
- package/dist/tag-coverage.d.ts.map +1 -0
- package/dist/tag-coverage.js +7 -0
- package/dist/tag-coverage.js.map +1 -0
- package/dist/yaml-values.d.ts +13 -0
- package/dist/yaml-values.d.ts.map +1 -0
- package/dist/yaml-values.js +58 -0
- package/dist/yaml-values.js.map +1 -0
- package/genres.yaml +145 -1
- package/package.json +12 -3
- package/rules/absolute-exception.yaml +83 -0
- package/rules/abstract-length.yaml +130 -0
- package/rules/acronym-expansion-conflict.yaml +82 -0
- package/rules/adverb-overuse.yaml +2 -2
- package/rules/adversative-ga-repeat.yaml +58 -0
- package/rules/agentless-passive.yaml +28 -0
- package/rules/ai-generated-composite.yaml +2 -1
- package/rules/ai-structure.yaml +202 -0
- package/rules/ai-tell.yaml +35 -1
- package/rules/announced-count-mismatch.yaml +2 -2
- package/rules/announcing-opener.yaml +32 -1
- package/rules/article-sound.yaml +58 -0
- package/rules/assistant-residue.yaml +30 -0
- package/rules/bold-density.yaml +28 -0
- package/rules/bold-label-list.yaml +81 -0
- package/rules/bracket-nesting.yaml +74 -0
- package/rules/chat-citation-residue.yaml +77 -0
- package/rules/citation-reference-mismatch.yaml +110 -0
- package/rules/citation-style-mix.yaml +109 -0
- package/rules/clause-chain.yaml +59 -0
- package/rules/closing-cliche.yaml +27 -2
- package/rules/colon-lead-in.yaml +29 -5
- package/rules/contrast-framing.yaml +34 -3
- package/rules/cross-doc-broken-link.yaml +83 -0
- package/rules/cross-doc-term-variant.yaml +73 -0
- package/rules/cushion-phrase-density.yaml +32 -5
- package/rules/dangling-reference.yaml +1 -0
- package/rules/date-format-consistency.yaml +85 -0
- package/rules/date-order.yaml +1 -0
- package/rules/date-range-reversed.yaml +2 -2
- package/rules/date-without-year.yaml +70 -0
- package/rules/demonstrative-opener-run.yaml +59 -0
- package/rules/double-negative.yaml +51 -0
- package/rules/doubled-nado.yaml +57 -0
- package/rules/doubled-punctuation.yaml +2 -2
- package/rules/doubled-word.yaml +2 -2
- package/rules/duplicate-heading.yaml +78 -0
- package/rules/duration-mismatch.yaml +73 -0
- package/rules/elapsed-years-mismatch.yaml +79 -0
- package/rules/emoji-density.yaml +5 -4
- package/rules/emoji-heading.yaml +128 -0
- package/rules/empty-intensifier.yaml +25 -0
- package/rules/empty-list-item.yaml +85 -0
- package/rules/empty-section.yaml +74 -0
- package/rules/empty-table-cell.yaml +89 -0
- package/rules/excessive-hedging.yaml +32 -4
- package/rules/fact-conflict.yaml +110 -0
- package/rules/figure-reference-order.yaml +109 -0
- package/rules/fullwidth-alnum-consistency.yaml +53 -0
- package/rules/hankaku-kana.yaml +41 -0
- package/rules/heading-numbering-mix.yaml +140 -0
- package/rules/homophone-slip.yaml +58 -0
- package/rules/idiom-misuse.yaml +60 -0
- package/rules/image-alt-text.yaml +1 -1
- package/rules/invisible-character.yaml +63 -0
- package/rules/katakana-density.yaml +93 -0
- package/rules/katakana-long-vowel.yaml +10 -9
- package/rules/known-misspelling.yaml +76 -0
- package/rules/latin-spacing.yaml +12 -5
- package/rules/list-item-form-mix.yaml +134 -0
- package/rules/max-kanji-continuous.yaml +1 -0
- package/rules/max-paragraph-length.yaml +1 -0
- package/rules/max-sentence-length.yaml +26 -0
- package/rules/max-ten.yaml +59 -0
- package/rules/misconversion.yaml +61 -0
- package/rules/modal-conflict.yaml +106 -0
- package/rules/name-variant.yaml +88 -0
- package/rules/no-doubled-joshi.yaml +1 -0
- package/rules/no-em-dash.yaml +26 -2
- package/rules/no-lead.yaml +95 -0
- package/rules/no-mixed-desumasu.yaml +1 -0
- package/rules/nominalization.yaml +89 -0
- package/rules/number-style-consistency.yaml +105 -0
- package/rules/number-without-unit.yaml +96 -0
- package/rules/one-sentence-paragraph-run.yaml +95 -0
- package/rules/orthographic-variant.yaml +87 -0
- package/rules/outside-announced-list.yaml +80 -0
- package/rules/padded-intro.yaml +25 -0
- package/rules/paragraph-length-variance.yaml +26 -2
- package/rules/paragraph-restatement.yaml +96 -0
- package/rules/person-consistency.yaml +59 -0
- package/rules/preferred-term.yaml +1 -0
- package/rules/proper-noun-density.yaml +14 -5
- package/rules/ra-nuki.yaml +43 -0
- package/rules/redundant-expression.yaml +76 -0
- package/rules/reference-title-mismatch.yaml +101 -0
- package/rules/reference-topic-missing.yaml +101 -0
- package/rules/relative-date-mismatch.yaml +71 -0
- package/rules/requirement-modal.yaml +94 -0
- package/rules/requirement-smell.yaml +70 -0
- package/rules/rule-of-three.yaml +49 -3
- package/rules/section-length-uniformity.yaml +27 -3
- package/rules/sentence-initial-so.yaml +58 -0
- package/rules/sentence-rhythm.yaml +27 -1
- package/rules/space-before-punctuation.yaml +41 -0
- package/rules/spelling-consistency.yaml +47 -0
- package/rules/stock-transition.yaml +34 -3
- package/rules/summary-fact-mismatch.yaml +122 -0
- package/rules/table-header-variant.yaml +112 -0
- package/rules/taigen-dome-in-prose.yaml +14 -0
- package/rules/teki-overuse.yaml +59 -0
- package/rules/title-length.yaml +120 -0
- package/rules/topic-predicate-distance.yaml +59 -0
- package/rules/total-mismatch.yaml +1 -0
- package/rules/translationese-density.yaml +62 -0
- package/rules/undefined-acronym.yaml +1 -0
- package/rules/unfilled-placeholder.yaml +8 -11
- package/rules/unit-mismatch.yaml +110 -0
- package/rules/unknown-word.yaml +62 -0
- package/rules/unqualified-superlative.yaml +5 -4
- package/rules/unused-definition.yaml +75 -0
- package/rules/use-before-definition.yaml +77 -0
- package/rules/vague-figure-reference.yaml +66 -0
- package/rules/vague-link-text.yaml +77 -0
- package/rules/vague-word-density.yaml +89 -0
- package/rules/very-adjective.yaml +61 -0
- package/rules/weasel-word.yaml +60 -0
- package/rules/wordy-phrase.yaml +61 -0
- package/skills/chaff/SKILL.md +116 -8
- package/src/acronym-expansions.ts +106 -0
- package/src/announced-count.ts +53 -11
- package/src/announced-list.ts +120 -0
- package/src/api.ts +154 -0
- package/src/baseline.ts +17 -4
- package/src/check-source.ts +75 -0
- package/src/checks.ts +3 -3
- package/src/cli-args.ts +7 -1
- package/src/cli-text.ts +32 -17
- package/src/cli.ts +105 -98
- package/src/closing-paragraph.ts +24 -0
- package/src/commands/compare.ts +15 -18
- package/src/commands/document-commands.ts +19 -0
- package/src/commands/eval.ts +5 -4
- package/src/commands/facts.ts +33 -0
- package/src/commands/feedback.ts +33 -1
- package/src/commands/fix-plan.ts +55 -0
- package/src/commands/grade-baseline.ts +44 -0
- package/src/commands/grade.ts +191 -0
- package/src/commands/outline.ts +50 -0
- package/src/commands/read-document.ts +33 -0
- package/src/commands/suppressions.ts +20 -0
- package/src/commands/test.ts +3 -3
- package/src/commands/tree.ts +19 -12
- package/src/compare/clock-time.ts +5 -2
- package/src/compare/distinct.ts +20 -0
- package/src/compare/extract.ts +7 -5
- package/src/compare/fact-key.ts +31 -0
- package/src/compare/fact-text.ts +21 -2
- package/src/compare/facts-render.ts +63 -0
- package/src/compare/facts-text.ts +41 -0
- package/src/compare/match.ts +1 -1
- package/src/compare/outcome.ts +14 -4
- package/src/compare/proper-nouns.ts +14 -10
- package/src/compare/render.ts +2 -2
- package/src/compare/text-atoms.ts +7 -6
- package/src/compare/text.ts +3 -2
- package/src/config/load.ts +17 -3
- package/src/config/option-problems.ts +6 -4
- package/src/config/style.ts +14 -1
- package/src/config/yaml-file.ts +65 -0
- package/src/correction-edit.ts +43 -0
- package/src/cross-run.ts +107 -0
- package/src/cross-variants.ts +55 -0
- package/src/cross-votes.ts +29 -0
- package/src/custom/load.ts +11 -3
- package/src/custom/module-path.ts +23 -0
- package/src/custom/parse.ts +67 -18
- package/src/custom/problems.ts +63 -41
- package/src/date-format.ts +123 -0
- package/src/derived/date-arithmetic.ts +63 -0
- package/src/derived/durations.ts +52 -0
- package/src/derived/elapsed.ts +125 -0
- package/src/derived/relative-dates.ts +96 -0
- package/src/derived/sentence-buckets.ts +29 -0
- package/src/detect-language.ts +1 -1
- package/src/detect.ts +10 -3
- package/src/detectors/absolute-exception.ts +102 -0
- package/src/detectors/abstract-length.ts +126 -0
- package/src/detectors/ai-phrasing.ts +18 -16
- package/src/detectors/ai-structure.ts +26 -0
- package/src/detectors/blank-structure.ts +147 -0
- package/src/detectors/bold-label.ts +55 -0
- package/src/detectors/chat-citation.ts +50 -0
- package/src/detectors/citation-entry.ts +94 -0
- package/src/detectors/citation-marks.ts +205 -0
- package/src/detectors/citation-style.ts +46 -0
- package/src/detectors/cross-link.ts +82 -0
- package/src/detectors/cross-registry/cross-doc-broken-link.ts +4 -0
- package/src/detectors/cross-registry/cross-doc-term-variant.ts +4 -0
- package/src/detectors/cross-variant.ts +77 -0
- package/src/detectors/dangling-figure.ts +8 -4
- package/src/detectors/date-format.ts +29 -0
- package/src/detectors/date-year.ts +91 -0
- package/src/detectors/definition-use.ts +41 -0
- package/src/detectors/derived-numbers.ts +191 -0
- package/src/detectors/document-shape.ts +107 -0
- package/src/detectors/doubled-punctuation.ts +5 -2
- package/src/detectors/duplicate-heading.ts +47 -0
- package/src/detectors/emoji-heading.ts +17 -0
- package/src/detectors/empty-section.ts +21 -0
- package/src/detectors/fact-consistency.ts +54 -0
- package/src/detectors/figure-order.ts +81 -0
- package/src/detectors/fullwidth-alnum.ts +118 -0
- package/src/detectors/hankaku-kana.ts +38 -0
- package/src/detectors/heading-code-words.ts +2 -2
- package/src/detectors/heading-numbering.ts +38 -0
- package/src/detectors/index.ts +18 -114
- package/src/detectors/invisible-character.ts +190 -0
- package/src/detectors/katakana-density.ts +62 -0
- package/src/detectors/known-correction.ts +89 -0
- package/src/detectors/kutoten-consistency.ts +2 -2
- package/src/detectors/lexicon-match.ts +33 -1
- package/src/detectors/lexicon.ts +43 -13
- package/src/detectors/list-parallel.ts +155 -0
- package/src/detectors/list-sentence.ts +45 -4
- package/src/detectors/long-vowel.ts +22 -6
- package/src/detectors/markup-finding.ts +16 -1
- package/src/detectors/misuse-match.ts +28 -0
- package/src/detectors/modal-conflict.ts +26 -0
- package/src/detectors/name-variant.ts +15 -0
- package/src/detectors/next-word.ts +156 -0
- package/src/detectors/nominalization.ts +73 -0
- package/src/detectors/number-style.ts +230 -0
- package/src/detectors/number-unit.ts +146 -0
- package/src/detectors/orthographic-variant.ts +152 -0
- package/src/detectors/orthography.ts +77 -27
- package/src/detectors/outside-announced-list.ts +25 -0
- package/src/detectors/oxford-comma.ts +1 -0
- package/src/detectors/paragraph-restatement.ts +68 -0
- package/src/detectors/paragraph-run.ts +27 -0
- package/src/detectors/person-consistency.ts +29 -0
- package/src/detectors/phrase-match.ts +27 -7
- package/src/detectors/placeholder-text.ts +62 -5
- package/src/detectors/ra-nuki.ts +38 -0
- package/src/detectors/reference-text.ts +44 -0
- package/src/detectors/registry/absolute-exception.ts +4 -0
- package/src/detectors/registry/abstract-length.ts +4 -0
- package/src/detectors/registry/acronym-expansion-conflict.ts +4 -0
- package/src/detectors/registry/adverb-density.ts +4 -0
- package/src/detectors/registry/agentless-passive.ts +4 -0
- package/src/detectors/registry/agreement-slip.ts +4 -0
- package/src/detectors/registry/ai-structure.ts +4 -0
- package/src/detectors/registry/ai-tell.ts +4 -0
- package/src/detectors/registry/announced-count.ts +4 -0
- package/src/detectors/registry/article-sound.ts +4 -0
- package/src/detectors/registry/assistant-residue.ts +4 -0
- package/src/detectors/registry/bold-label-list.ts +4 -0
- package/src/detectors/registry/bracket-nesting.ts +4 -0
- package/src/detectors/registry/broken-link.ts +4 -0
- package/src/detectors/registry/chat-citation-residue.ts +4 -0
- package/src/detectors/registry/citation-entry.ts +4 -0
- package/src/detectors/registry/citation-style.ts +4 -0
- package/src/detectors/registry/clause-chain.ts +4 -0
- package/src/detectors/registry/colon-lead-in.ts +4 -0
- package/src/detectors/registry/concrete-evidence.ts +4 -0
- package/src/detectors/registry/conjunction-run.ts +4 -0
- package/src/detectors/registry/contraction-mix.ts +4 -0
- package/src/detectors/registry/contrast-framing.ts +4 -0
- package/src/detectors/registry/count-per-section.ts +4 -0
- package/src/detectors/registry/cushion-density.ts +4 -0
- package/src/detectors/registry/custom-pattern.ts +4 -0
- package/src/detectors/registry/custom-tokens.ts +4 -0
- package/src/detectors/registry/custom-words.ts +4 -0
- package/src/detectors/registry/dangling-figure.ts +4 -0
- package/src/detectors/registry/dangling-reference.ts +4 -0
- package/src/detectors/registry/dash-density.ts +4 -0
- package/src/detectors/registry/date-format.ts +4 -0
- package/src/detectors/registry/date-order.ts +4 -0
- package/src/detectors/registry/date-range-reversed.ts +4 -0
- package/src/detectors/registry/date-weekday-mismatch.ts +4 -0
- package/src/detectors/registry/date-without-year.ts +4 -0
- package/src/detectors/registry/doubled-particle.ts +4 -0
- package/src/detectors/registry/doubled-punctuation.ts +4 -0
- package/src/detectors/registry/doubled-word.ts +4 -0
- package/src/detectors/registry/duplicate-definition.ts +4 -0
- package/src/detectors/registry/duplicate-heading.ts +4 -0
- package/src/detectors/registry/duration-mismatch.ts +4 -0
- package/src/detectors/registry/elapsed-years-mismatch.ts +4 -0
- package/src/detectors/registry/emoji-density.ts +4 -0
- package/src/detectors/registry/emoji-heading.ts +4 -0
- package/src/detectors/registry/empty-list-item.ts +4 -0
- package/src/detectors/registry/empty-section.ts +4 -0
- package/src/detectors/registry/empty-table-cell.ts +4 -0
- package/src/detectors/registry/expletive.ts +4 -0
- package/src/detectors/registry/fact-conflict.ts +4 -0
- package/src/detectors/registry/figure-order.ts +4 -0
- package/src/detectors/registry/fullwidth-alnum.ts +4 -0
- package/src/detectors/registry/hankaku-kana.ts +4 -0
- package/src/detectors/registry/heading-echo.ts +4 -0
- package/src/detectors/registry/heading-level-skip.ts +4 -0
- package/src/detectors/registry/heading-numbering.ts +4 -0
- package/src/detectors/registry/hedging.ts +4 -0
- package/src/detectors/registry/image-alt-text.ts +4 -0
- package/src/detectors/registry/intensified-adjective.ts +4 -0
- package/src/detectors/registry/internal-jargon.ts +4 -0
- package/src/detectors/registry/invisible-character.ts +4 -0
- package/src/detectors/registry/kanji-run.ts +4 -0
- package/src/detectors/registry/katakana-density.ts +4 -0
- package/src/detectors/registry/katakana-long-vowel.ts +4 -0
- package/src/detectors/registry/known-correction.ts +4 -0
- package/src/detectors/registry/kutoten-consistency.ts +4 -0
- package/src/detectors/registry/latin-spacing.ts +4 -0
- package/src/detectors/registry/list-item-form-mix.ts +4 -0
- package/src/detectors/registry/middle-dot.ts +4 -0
- package/src/detectors/registry/misuse-match.ts +4 -0
- package/src/detectors/registry/modal-conflict.ts +4 -0
- package/src/detectors/registry/name-variant.ts +4 -0
- package/src/detectors/registry/ngram-repetition.ts +4 -0
- package/src/detectors/registry/no-lead.ts +4 -0
- package/src/detectors/registry/nominalization.ts +4 -0
- package/src/detectors/registry/noun-ending.ts +4 -0
- package/src/detectors/registry/number-style-consistency.ts +4 -0
- package/src/detectors/registry/number-without-unit.ts +4 -0
- package/src/detectors/registry/numbering-gap.ts +4 -0
- package/src/detectors/registry/one-sentence-paragraph-run.ts +4 -0
- package/src/detectors/registry/opener-pile.ts +4 -0
- package/src/detectors/registry/opener-run.ts +4 -0
- package/src/detectors/registry/orthographic-variant.ts +4 -0
- package/src/detectors/registry/outside-announced-list.ts +4 -0
- package/src/detectors/registry/oxford-comma.ts +4 -0
- package/src/detectors/registry/paragraph-length.ts +4 -0
- package/src/detectors/registry/paragraph-restatement.ts +4 -0
- package/src/detectors/registry/paragraph-variance.ts +4 -0
- package/src/detectors/registry/percent-sum-mismatch.ts +4 -0
- package/src/detectors/registry/person-mix.ts +4 -0
- package/src/detectors/registry/phrase-count.ts +4 -0
- package/src/detectors/registry/phrase-density.ts +4 -0
- package/src/detectors/registry/phrase-match.ts +4 -0
- package/src/detectors/registry/preamble-length.ts +4 -0
- package/src/detectors/registry/preferred-term.ts +4 -0
- package/src/detectors/registry/proper-noun-density.ts +4 -0
- package/src/detectors/registry/ra-nuki.ts +4 -0
- package/src/detectors/registry/reference-title-mismatch.ts +4 -0
- package/src/detectors/registry/reference-topic-missing.ts +4 -0
- package/src/detectors/registry/relative-date-mismatch.ts +4 -0
- package/src/detectors/registry/repeated-conjunction.ts +4 -0
- package/src/detectors/registry/repeated-head.ts +4 -0
- package/src/detectors/registry/required-sections.ts +4 -0
- package/src/detectors/registry/requirement-modal.ts +4 -0
- package/src/detectors/registry/requirement-smell.ts +4 -0
- package/src/detectors/registry/rule-of-three.ts +4 -0
- package/src/detectors/registry/section-uniformity.ts +4 -0
- package/src/detectors/registry/sentence-comma-count.ts +4 -0
- package/src/detectors/registry/sentence-conjunctive-count.ts +4 -0
- package/src/detectors/registry/sentence-ending.ts +4 -0
- package/src/detectors/registry/sentence-length.ts +4 -0
- package/src/detectors/registry/sentence-rhythm.ts +4 -0
- package/src/detectors/registry/sentence-word-count.ts +4 -0
- package/src/detectors/registry/space-before-punctuation.ts +4 -0
- package/src/detectors/registry/spelling-variety.ts +4 -0
- package/src/detectors/registry/stock-transition.ts +4 -0
- package/src/detectors/registry/stray-space.ts +4 -0
- package/src/detectors/registry/summary-fact-mismatch.ts +4 -0
- package/src/detectors/registry/table-header-variant.ts +4 -0
- package/src/detectors/registry/title-case-mix.ts +4 -0
- package/src/detectors/registry/title-length.ts +4 -0
- package/src/detectors/registry/topic-predicate-distance.ts +4 -0
- package/src/detectors/registry/total-mismatch.ts +4 -0
- package/src/detectors/registry/unbalanced-bracket.ts +4 -0
- package/src/detectors/registry/undefined-acronym.ts +4 -0
- package/src/detectors/registry/unfilled-placeholder.ts +4 -0
- package/src/detectors/registry/unit-mismatch.ts +4 -0
- package/src/detectors/registry/unknown-word.ts +4 -0
- package/src/detectors/registry/unqualified-superlative.ts +4 -0
- package/src/detectors/registry/unused-definition.ts +4 -0
- package/src/detectors/registry/url-run-on.ts +4 -0
- package/src/detectors/registry/use-before-definition.ts +4 -0
- package/src/detectors/registry/vague-density.ts +4 -0
- package/src/detectors/registry/vague-figure-pointer.ts +4 -0
- package/src/detectors/registry/vague-link-text.ts +4 -0
- package/src/detectors/registry-files.ts +12 -0
- package/src/detectors/registry-load.ts +23 -0
- package/src/detectors/relative-dates.ts +113 -0
- package/src/detectors/requirement-modal.ts +67 -0
- package/src/detectors/requirement-smell.ts +52 -0
- package/src/detectors/sentence-counts.ts +112 -0
- package/src/detectors/sentence-load.ts +45 -0
- package/src/detectors/space-before-punctuation.ts +32 -0
- package/src/detectors/spelling-variety.ts +81 -0
- package/src/detectors/structure-tree.ts +3 -1
- package/src/detectors/structure.ts +17 -3
- package/src/detectors/superlative-comparison.ts +47 -0
- package/src/detectors/table-header.ts +174 -0
- package/src/detectors/team.ts +12 -4
- package/src/detectors/unit-consistency.ts +55 -0
- package/src/detectors/unknown-word.ts +43 -0
- package/src/detectors/url-run-on.ts +7 -1
- package/src/detectors/vague-figure-pointer.ts +58 -0
- package/src/detectors/vague-link-text.ts +12 -0
- package/src/detectors/word-list.ts +6 -1
- package/src/document-reading.ts +25 -0
- package/src/document.ts +94 -45
- package/src/experimental-alone.ts +21 -0
- package/src/extension/document-view.ts +109 -0
- package/src/extension/failure-text.ts +46 -0
- package/src/extension/import-default.ts +13 -0
- package/src/extension/load.ts +97 -0
- package/src/extension/module-detector.ts +61 -0
- package/src/extension/plugin-load.ts +82 -0
- package/src/extension/plugin-name.ts +26 -0
- package/src/extension/plugin-parse.ts +229 -0
- package/src/extension/problem-text.ts +103 -0
- package/src/extension/real-path.ts +10 -0
- package/src/extension/returned-findings.ts +62 -0
- package/src/extension/rule-export.ts +23 -0
- package/src/facts/fact-conflicts.ts +64 -0
- package/src/facts/fact-scope.ts +141 -0
- package/src/facts/fact-values.ts +110 -0
- package/src/facts/labelled-facts.ts +131 -0
- package/src/facts/measures.ts +54 -0
- package/src/facts/table-facts.ts +71 -0
- package/src/facts/trim-marks.ts +18 -0
- package/src/facts/unit-conflicts.ts +45 -0
- package/src/feedback/draft.ts +6 -0
- package/src/figure-references.ts +93 -13
- package/src/files.ts +16 -10
- package/src/finding-order.ts +3 -0
- package/src/fix-plan/mode.ts +40 -0
- package/src/fix-plan/plan.ts +202 -0
- package/src/fix-plan/render.ts +146 -0
- package/src/fix-plan/structure-target-text.ts +90 -0
- package/src/fix-plan/structure-targets.ts +46 -0
- package/src/fix-plan/text.ts +136 -0
- package/src/grade/baseline-text.ts +80 -0
- package/src/grade/baseline.ts +140 -0
- package/src/grade/checks.ts +73 -0
- package/src/grade/context-support.ts +60 -0
- package/src/grade/contexts.ts +53 -0
- package/src/grade/grade-item.ts +133 -0
- package/src/grade/item.ts +208 -0
- package/src/grade/order.ts +10 -0
- package/src/grade/pairing.ts +22 -0
- package/src/grade/rates.ts +39 -0
- package/src/grade/render-baseline.ts +74 -0
- package/src/grade/render-markdown.ts +62 -0
- package/src/grade/render-variants.ts +115 -0
- package/src/grade/render.ts +84 -0
- package/src/grade/result-name.ts +9 -0
- package/src/grade/result.ts +82 -0
- package/src/grade/results-read.ts +111 -0
- package/src/grade/rubric-verdict.ts +86 -0
- package/src/grade/rubric.ts +192 -0
- package/src/grade/scorer.ts +33 -0
- package/src/grade/setup.ts +43 -0
- package/src/grade/stamp.ts +60 -0
- package/src/grade/summary.ts +112 -0
- package/src/grade/text.ts +164 -0
- package/src/grade/variants-input.ts +54 -0
- package/src/grade/variants-text.ts +88 -0
- package/src/grade/variants.ts +118 -0
- package/src/grade/verdict.ts +27 -0
- package/src/grade-api.ts +184 -0
- package/src/heading-numbering.ts +106 -0
- package/src/kana-spelling.ts +49 -0
- package/src/language-sample.ts +48 -0
- package/src/link-line.ts +13 -0
- package/src/link-text.ts +46 -0
- package/src/long-vowel.ts +18 -8
- package/src/markup.ts +4 -2
- package/src/name-variants.ts +217 -0
- package/src/node-version.ts +22 -0
- package/src/not-run.ts +16 -0
- package/src/orthography.ts +40 -11
- package/src/outline/render.ts +92 -0
- package/src/outline/shape.ts +72 -0
- package/src/outline/structure-render.ts +101 -0
- package/src/outline/structure-text.ts +124 -0
- package/src/outline/text.ts +55 -0
- package/src/paragraph-runs.ts +30 -0
- package/src/person-forms.ts +119 -0
- package/src/plugin.ts +34 -4
- package/src/reasons.ts +7 -0
- package/src/render/compact.ts +13 -3
- package/src/render/explain.ts +54 -21
- package/src/render/friendly.ts +17 -1
- package/src/render/rules-json.ts +23 -13
- package/src/render/rules-table.ts +1 -1
- package/src/render/sarif.ts +31 -1
- package/src/render/suppressions.ts +30 -2
- package/src/resolve-genre.ts +1 -1
- package/src/rule-guide.ts +41 -0
- package/src/run-semantic.ts +2 -1
- package/src/run.ts +108 -63
- package/src/sentence-load.ts +77 -0
- package/src/setting-problems.ts +3 -1
- package/src/spacing-minority.ts +27 -0
- package/src/spelling-variants.ts +42 -0
- package/src/spelling.ts +81 -0
- package/src/stet-block.ts +60 -0
- package/src/stet.ts +41 -15
- package/src/structure/absolute-exception.ts +104 -0
- package/src/structure/date-range.ts +49 -1
- package/src/structure/definition-use.ts +130 -0
- package/src/structure/issues.ts +22 -0
- package/src/structure/lazy-tree.ts +15 -0
- package/src/structure/modal-conflict.ts +86 -0
- package/src/structure/numbered-clauses.ts +11 -0
- package/src/structure/reference-text.ts +114 -0
- package/src/structure/universal.ts +10 -2
- package/src/structure-shape/baseline-load.ts +18 -0
- package/src/structure-shape/baseline.ts +62 -0
- package/src/structure-shape/features.ts +189 -0
- package/src/structure-shape/heading-words.ts +71 -0
- package/src/structure-shape/of-document.ts +7 -0
- package/src/structure-shape/restatement.ts +41 -0
- package/src/structure-shape/score.ts +65 -0
- package/src/style-parse.ts +38 -3
- package/src/subheading-line.ts +51 -13
- package/src/tag-coverage.ts +13 -0
- package/src/yaml-values.ts +61 -0
- package/structure-baseline.yaml +289 -0
- package/styles/ieice.yaml +5 -4
- package/styles/jis-z8301-2011.yaml +5 -2
- package/styles/jis-z8301-2019.yaml +31 -0
- package/styles/koyobun.yaml +35 -0
- package/dist/legal-address.d.ts +0 -2
- package/dist/legal-address.d.ts.map +0 -1
- package/dist/legal-address.js +0 -16
- package/dist/legal-address.js.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { pathToFileURL } from "node:url";
|
|
2
|
+
|
|
3
|
+
const firstLine = (error: unknown): string => (error instanceof Error ? error.message : String(error)).split("\n")[0] ?? "";
|
|
4
|
+
|
|
5
|
+
/** A module's default export, or the first line of why it could not be imported (a syntax error, a missing import). Running it runs its code. */
|
|
6
|
+
export const importDefault = async (file: string): Promise<{ readonly exported: unknown } | { readonly message: string }> => {
|
|
7
|
+
try {
|
|
8
|
+
const namespace: unknown = await import(pathToFileURL(file).href);
|
|
9
|
+
return { exported: typeof namespace === "object" && namespace !== null && "default" in namespace ? namespace.default : undefined };
|
|
10
|
+
} catch (error) {
|
|
11
|
+
return { message: firstLine(error) };
|
|
12
|
+
}
|
|
13
|
+
};
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { existsSync } from "node:fs";
|
|
2
|
+
import type { Config } from "../config/load.ts";
|
|
3
|
+
import type { Detector, Lexicon, RuleDefinition } from "../plugin.ts";
|
|
4
|
+
import type { StyleDefinition } from "../style-parse.ts";
|
|
5
|
+
import { customRulesOf } from "../custom/load.ts";
|
|
6
|
+
import { withStyle } from "../config/style.ts";
|
|
7
|
+
import { moduleDetector } from "./module-detector.ts";
|
|
8
|
+
import { detectorExport, type ExportProblem } from "./rule-export.ts";
|
|
9
|
+
import { importDefault } from "./import-default.ts";
|
|
10
|
+
import { loadPlugins } from "./plugin-load.ts";
|
|
11
|
+
import type { ParsedPlugin, PluginProblem } from "./plugin-parse.ts";
|
|
12
|
+
import { staysInside } from "./real-path.ts";
|
|
13
|
+
|
|
14
|
+
// The code chaff.yaml names, loaded once before anything runs: each type: module rule's file, and each plugin under
|
|
15
|
+
// plugins:. Loading runs that code, which is why only chaff.yaml can name it. What cannot be loaded stops the run
|
|
16
|
+
// (settingProblems), like a rule in custom_rules that cannot be read: a rule that silently does not run looks like a clean document.
|
|
17
|
+
|
|
18
|
+
/** A rule whose file could not be loaded. file is the path as chaff.yaml writes it; detail: why, or what ExportProblem says. */
|
|
19
|
+
export type LoadProblem = {
|
|
20
|
+
readonly kind: "missing-file" | "outside" | "import-failed" | ExportProblem["kind"];
|
|
21
|
+
readonly rule: string;
|
|
22
|
+
readonly file: string;
|
|
23
|
+
readonly detail: string;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** What was loaded, and what could not be. */
|
|
27
|
+
export type Extensions = {
|
|
28
|
+
/** The detector of each type: module rule and each plugin rule written in code, by the rule's id. */
|
|
29
|
+
readonly detectors: Readonly<Record<string, Detector>>;
|
|
30
|
+
/** The plugins' rules, with their ids under each plugin's name. */
|
|
31
|
+
readonly rules: readonly RuleDefinition[];
|
|
32
|
+
/** The plugins' word lists by language, then by name. */
|
|
33
|
+
readonly lexicons: Readonly<Record<string, Readonly<Record<string, Lexicon>>>>;
|
|
34
|
+
/** The plugins' house styles. */
|
|
35
|
+
readonly styles: readonly StyleDefinition[];
|
|
36
|
+
readonly problems: readonly LoadProblem[];
|
|
37
|
+
readonly pluginProblems: readonly PluginProblem[];
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
type Loaded = { readonly detector: Detector } | { readonly problem: LoadProblem };
|
|
41
|
+
|
|
42
|
+
/** A type: module rule: its id, its file, and the path as chaff.yaml writes it, which every message names. */
|
|
43
|
+
type ModuleRule = { readonly id: string; readonly file: string; readonly written: string };
|
|
44
|
+
|
|
45
|
+
const loadRule = async ({ id, file, written }: ModuleRule, baseDir: string): Promise<Loaded> => {
|
|
46
|
+
const at = { rule: id, file: written };
|
|
47
|
+
if (!existsSync(file)) return { problem: { ...at, kind: "missing-file", detail: "" } };
|
|
48
|
+
if (!staysInside(written, file, baseDir)) return { problem: { ...at, kind: "outside", detail: "" } };
|
|
49
|
+
const imported = await importDefault(file);
|
|
50
|
+
if ("message" in imported) return { problem: { ...at, kind: "import-failed", detail: imported.message } };
|
|
51
|
+
const read = detectorExport(imported.exported);
|
|
52
|
+
return "problem" in read ? { problem: { ...at, ...read.problem } } : { detector: moduleDetector(read.detect, written) };
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
const moduleRulesOf = (rules: readonly RuleDefinition[]): ModuleRule[] =>
|
|
56
|
+
rules.flatMap((rule) => (rule.custom?.type === "module" ? [{ id: rule.id, file: rule.custom.file, written: rule.custom.module }] : []));
|
|
57
|
+
|
|
58
|
+
/** Every type: module rule in chaff.yaml, loaded one by one in the order written, so the same chaff.yaml loads the same way. */
|
|
59
|
+
const loadModuleRules = async (config: Config): Promise<readonly { readonly id: string; readonly loaded: Loaded }[]> =>
|
|
60
|
+
moduleRulesOf(customRulesOf(config).rules).reduce<Promise<{ id: string; loaded: Loaded }[]>>(
|
|
61
|
+
async (done, rule) => [...(await done), { id: rule.id, loaded: await loadRule(rule, config.baseDir) }],
|
|
62
|
+
Promise.resolve([]),
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
/** A plugin's code rules, each run as one of chaff's; a failure names the plugin as chaff.yaml writes it. */
|
|
66
|
+
const pluginDetectors = (plugin: ParsedPlugin): [string, Detector][] =>
|
|
67
|
+
Object.entries(plugin.detectors).map(([id, detect]) => [id, moduleDetector(detect, plugin.written)]);
|
|
68
|
+
|
|
69
|
+
const lexiconsByLanguage = (plugins: readonly ParsedPlugin[]): Record<string, Record<string, Lexicon>> => {
|
|
70
|
+
const languages = [...new Set(plugins.flatMap((plugin) => Object.keys(plugin.lexicons)))];
|
|
71
|
+
return Object.fromEntries(
|
|
72
|
+
languages.map((language) => [language, plugins.reduce<Record<string, Lexicon>>((merged, plugin) => ({ ...merged, ...plugin.lexicons[language] }), {})]),
|
|
73
|
+
);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/** Everything chaff.yaml names in code, loaded. */
|
|
77
|
+
const loadExtensions = async (config: Config): Promise<Extensions> => {
|
|
78
|
+
const modules = await loadModuleRules(config);
|
|
79
|
+
const { plugins, problems: pluginProblems } = await loadPlugins(config);
|
|
80
|
+
return {
|
|
81
|
+
detectors: Object.fromEntries([
|
|
82
|
+
...modules.flatMap((entry): [string, Detector][] => ("detector" in entry.loaded ? [[entry.id, entry.loaded.detector]] : [])),
|
|
83
|
+
...plugins.flatMap(pluginDetectors),
|
|
84
|
+
]),
|
|
85
|
+
rules: plugins.flatMap((plugin) => plugin.rules),
|
|
86
|
+
lexicons: lexiconsByLanguage(plugins),
|
|
87
|
+
styles: plugins.flatMap((plugin) => plugin.styles),
|
|
88
|
+
problems: modules.flatMap((entry) => ("problem" in entry.loaded ? [entry.loaded.problem] : [])),
|
|
89
|
+
pluginProblems,
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
/** chaff.yaml with the code it names loaded, and the style it names applied when a plugin ships it. */
|
|
94
|
+
export const withExtensions = async (config: Config): Promise<Config> => {
|
|
95
|
+
const extensions = await loadExtensions(config);
|
|
96
|
+
return withStyle({ ...config, extensions }, extensions.styles);
|
|
97
|
+
};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type * as Api from "../api.ts";
|
|
2
|
+
import type { Detector, Finding, ProseDocument } from "../plugin.ts";
|
|
3
|
+
import { frozenLexiconOf, ruleDocumentOf } from "./document-view.ts";
|
|
4
|
+
import { returnedFindings, type ShapeProblem } from "./returned-findings.ts";
|
|
5
|
+
|
|
6
|
+
// A detector a team or a plugin wrote, run as one of chaff's. It reads the document through the plugin API, and what it
|
|
7
|
+
// returns is checked before chaff uses it. A throw or a wrong return is that rule's failure only: run.ts lists the rule
|
|
8
|
+
// as not run with the reason, and every other rule still runs.
|
|
9
|
+
|
|
10
|
+
/** A detector from a plugin. It is JavaScript nobody has type-checked against this chaff, so what it returns is unknown. */
|
|
11
|
+
export type UntrustedDetector = (doc: Api.RuleDocument, options: Api.DetectorOptions) => unknown;
|
|
12
|
+
|
|
13
|
+
export type RuleFailure = { readonly kind: "threw"; readonly message: string } | { readonly kind: "returned"; readonly problem: ShapeProblem };
|
|
14
|
+
|
|
15
|
+
/** A plugin's rule that failed on a document. origin is where the detector came from: its file, or its package. */
|
|
16
|
+
export class PluginRuleFailure extends Error {
|
|
17
|
+
readonly failure: RuleFailure;
|
|
18
|
+
readonly origin: string;
|
|
19
|
+
constructor(failure: RuleFailure, origin: string) {
|
|
20
|
+
super(`${origin}: ${failure.kind === "threw" ? failure.message : failure.problem.kind}`);
|
|
21
|
+
this.name = "PluginRuleFailure";
|
|
22
|
+
this.failure = failure;
|
|
23
|
+
this.origin = origin;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** The first line of what was thrown. What a plugin throws is its own object, so printing it may throw too. */
|
|
28
|
+
const messageOf = (error: unknown): string => {
|
|
29
|
+
try {
|
|
30
|
+
const text = error instanceof Error ? error.message : String(error);
|
|
31
|
+
return text.split("\n")[0] ?? text;
|
|
32
|
+
} catch {
|
|
33
|
+
return "an error that cannot be printed";
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* What the detector returned, as findings, or how it failed. Reading the return can run the plugin's code too (a getter,
|
|
39
|
+
* a Proxy), so it is checked inside the try. A Promise is a wrong return; its rejection must not end the run later.
|
|
40
|
+
*/
|
|
41
|
+
const findingsOf = (detect: UntrustedDetector, doc: ProseDocument, options: Api.DetectorOptions): { findings: Finding[] } | { failure: RuleFailure } => {
|
|
42
|
+
const view = ruleDocumentOf(doc);
|
|
43
|
+
try {
|
|
44
|
+
const returned: unknown = detect(view, options);
|
|
45
|
+
if (returned instanceof Promise) returned.catch(() => undefined);
|
|
46
|
+
const result = returnedFindings(returned, doc.source, doc.sentences);
|
|
47
|
+
return "problem" in result ? { failure: { kind: "returned", problem: result.problem } } : { findings: [...result.findings] };
|
|
48
|
+
} catch (error) {
|
|
49
|
+
return { failure: { kind: "threw", message: messageOf(error) } };
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** detect as one of chaff's detectors. Throws PluginRuleFailure when it throws or returns anything but findings. */
|
|
54
|
+
export const moduleDetector =
|
|
55
|
+
(detect: UntrustedDetector, origin: string): Detector =>
|
|
56
|
+
(doc, options): Finding[] => {
|
|
57
|
+
const lexicon = options.lexicon === undefined ? undefined : frozenLexiconOf(options.lexicon);
|
|
58
|
+
const outcome = findingsOf(detect, doc, Object.freeze({ lexicon }));
|
|
59
|
+
if ("failure" in outcome) throw new PluginRuleFailure(outcome.failure, origin);
|
|
60
|
+
return outcome.findings;
|
|
61
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { CONFIG_FILE, type Config } from "../config/load.ts";
|
|
4
|
+
import { modulePathOf } from "../custom/module-path.ts";
|
|
5
|
+
import { loadGenres } from "../genre-load.ts";
|
|
6
|
+
import { importDefault } from "./import-default.ts";
|
|
7
|
+
import { staysInside } from "./real-path.ts";
|
|
8
|
+
import { isPluginPath, pluginNameOfPackage } from "./plugin-name.ts";
|
|
9
|
+
import { parsePlugin, type ParsedPlugin, type PluginOrigin, type PluginProblem } from "./plugin-parse.ts";
|
|
10
|
+
|
|
11
|
+
// The plugins chaff.yaml lists under plugins:, found and loaded. A package is found from the folder chaff.yaml is in,
|
|
12
|
+
// as Node finds it (node_modules); a path is the project's own plugin and, like a module rule, may not leave that
|
|
13
|
+
// folder unless written as an absolute path. What cannot be found or read stops the run.
|
|
14
|
+
|
|
15
|
+
export type LoadedPlugins = { readonly plugins: readonly ParsedPlugin[]; readonly problems: readonly PluginProblem[] };
|
|
16
|
+
|
|
17
|
+
type Located = { readonly origin: PluginOrigin } | { readonly problem: PluginProblem };
|
|
18
|
+
|
|
19
|
+
const problemOf = (kind: Exclude<PluginProblem["kind"], "rule">, plugin: string, detail = ""): { problem: PluginProblem } => ({
|
|
20
|
+
problem: { kind, plugin, detail },
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
/** The file Node would load for specifier from the folder chaff.yaml is in, or undefined when there is none. */
|
|
24
|
+
const resolveFrom = (baseDir: string, specifier: string): string | undefined => {
|
|
25
|
+
try {
|
|
26
|
+
return createRequire(join(baseDir, CONFIG_FILE)).resolve(specifier);
|
|
27
|
+
} catch {
|
|
28
|
+
return undefined;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const locate = (written: string, baseDir: string): Located => {
|
|
33
|
+
if (isPluginPath(written)) {
|
|
34
|
+
const path = modulePathOf(written, baseDir);
|
|
35
|
+
if ("refusal" in path) return problemOf("outside", written);
|
|
36
|
+
const file = resolveFrom(baseDir, path.file);
|
|
37
|
+
if (file === undefined) return problemOf("not-found", written);
|
|
38
|
+
return staysInside(written, file, baseDir) ? { origin: { written, file, expectedName: undefined } } : problemOf("outside", written);
|
|
39
|
+
}
|
|
40
|
+
const expectedName = pluginNameOfPackage(written);
|
|
41
|
+
if (expectedName === undefined) return problemOf("bad-specifier", written);
|
|
42
|
+
const file = resolveFrom(baseDir, written);
|
|
43
|
+
return file === undefined ? problemOf("not-found", written) : { origin: { written, file, expectedName } };
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const loadPlugin = async (written: string, baseDir: string, useFor: readonly string[]): Promise<LoadedPlugins> => {
|
|
47
|
+
const located = locate(written, baseDir);
|
|
48
|
+
if ("problem" in located) return { plugins: [], problems: [located.problem] };
|
|
49
|
+
const imported = await importDefault(located.origin.file);
|
|
50
|
+
if ("message" in imported) return { plugins: [], problems: [problemOf("import-failed", written, imported.message).problem] };
|
|
51
|
+
const read = parsePlugin(imported.exported, located.origin, useFor);
|
|
52
|
+
return { plugins: read.plugin === undefined ? [] : [read.plugin], problems: read.problems };
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/** A second plugin with a name already taken is refused: its rules' ids would be the first one's. */
|
|
56
|
+
const withoutDuplicates = (loaded: readonly { written: string; result: LoadedPlugins }[]): LoadedPlugins =>
|
|
57
|
+
loaded.reduce<{ plugins: ParsedPlugin[]; problems: PluginProblem[] }>(
|
|
58
|
+
(acc, { written, result }) => {
|
|
59
|
+
const taken = result.plugins.filter((plugin) => acc.plugins.some((seen) => seen.name === plugin.name));
|
|
60
|
+
return {
|
|
61
|
+
plugins: [...acc.plugins, ...result.plugins.filter((plugin) => !taken.includes(plugin))],
|
|
62
|
+
problems: [...acc.problems, ...result.problems, ...taken.map((plugin) => problemOf("duplicate-name", written, plugin.name).problem)],
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
{ plugins: [], problems: [] },
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
const isStringList = (value: unknown): value is readonly string[] =>
|
|
69
|
+
Array.isArray(value) && value.every((entry) => typeof entry === "string" && entry.trim() !== "");
|
|
70
|
+
|
|
71
|
+
/** Every plugin chaff.yaml lists, loaded one by one in the order written. */
|
|
72
|
+
export const loadPlugins = async (config: Pick<Config, "plugins" | "baseDir">): Promise<LoadedPlugins> => {
|
|
73
|
+
const written: unknown = config.plugins;
|
|
74
|
+
if (written === undefined || written === null) return { plugins: [], problems: [] };
|
|
75
|
+
if (!isStringList(written)) return { plugins: [], problems: [problemOf("not-a-list", "plugins", JSON.stringify(written) ?? "").problem] };
|
|
76
|
+
const useFor = loadGenres().groups.map((group) => group.id);
|
|
77
|
+
const loaded = await written.reduce<Promise<{ written: string; result: LoadedPlugins }[]>>(
|
|
78
|
+
async (done, entry) => [...(await done), { written: entry.trim(), result: await loadPlugin(entry.trim(), config.baseDir, useFor) }],
|
|
79
|
+
Promise.resolve([]),
|
|
80
|
+
);
|
|
81
|
+
return withoutDuplicates(loaded);
|
|
82
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { isAbsolute } from "node:path";
|
|
2
|
+
|
|
3
|
+
// The names a plugin goes by. A package is chaff-plugin-<name> or @scope/chaff-plugin-<name>, and its rules are named
|
|
4
|
+
// <name>/<rule> or @scope/<name>/<rule>, so they cannot take a built-in rule's id or another plugin's. Pure.
|
|
5
|
+
|
|
6
|
+
/** A plugin's name, the prefix of its ids: foo, @scope/foo, or @scope for @scope/chaff-plugin. */
|
|
7
|
+
const PLUGIN_NAME = /^(?:@[a-z0-9][a-z0-9._-]*(?:\/[a-z][a-z0-9-]*)?|[a-z][a-z0-9-]*)$/u;
|
|
8
|
+
|
|
9
|
+
const PACKAGE = /^(?:(@[a-z0-9][a-z0-9._-]*)\/)?chaff-plugin(?:-([a-z][a-z0-9-]*))?$/u;
|
|
10
|
+
|
|
11
|
+
/** A rule id as chaff.yaml, stet and baseline may write it: a built-in or team id, or a plugin's id with its prefix. */
|
|
12
|
+
export const RULE_ID = /^(?:@[a-z0-9][a-z0-9._-]*\/)?(?:[a-z][a-z0-9-]*\/)?[a-z][a-z0-9-]*$/u;
|
|
13
|
+
|
|
14
|
+
export const isPluginName = (name: string): boolean => PLUGIN_NAME.test(name);
|
|
15
|
+
|
|
16
|
+
/** The name a plugin package must declare: chaff-plugin-foo → foo, @scope/chaff-plugin-foo → @scope/foo. undefined for a name that is not a plugin package's. */
|
|
17
|
+
export const pluginNameOfPackage = (packageName: string): string | undefined => {
|
|
18
|
+
const match = PACKAGE.exec(packageName);
|
|
19
|
+
if (match === null) return undefined;
|
|
20
|
+
const [, scope, name] = match;
|
|
21
|
+
if (scope === undefined) return name;
|
|
22
|
+
return name === undefined ? scope : `${scope}/${name}`;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** A path to a plugin of the project's own (./local-plugin), rather than a package's name. */
|
|
26
|
+
export const isPluginPath = (written: string): boolean => written.startsWith(".") || isAbsolute(written);
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
import { dirname } from "node:path";
|
|
2
|
+
import { API_VERSION } from "../api.ts";
|
|
3
|
+
import type { Lexicon, LexiconEntry, RuleDefinition } from "../plugin.ts";
|
|
4
|
+
import { parseCustomRules, type CustomProblem } from "../custom/parse.ts";
|
|
5
|
+
import { styleOf, type StyleDefinition } from "../style-parse.ts";
|
|
6
|
+
import type { UntrustedDetector } from "./module-detector.ts";
|
|
7
|
+
import { describeValue } from "./returned-findings.ts";
|
|
8
|
+
import { isPluginName } from "./plugin-name.ts";
|
|
9
|
+
|
|
10
|
+
// What a plugin package exports (api.ts PluginSpec), read into what chaff runs: its rules with ids under the plugin's
|
|
11
|
+
// name, their detectors, its word lists and its house styles. A rule is read exactly like a rule in custom_rules, with
|
|
12
|
+
// detect in place of type: module. Pure: the module comes in already imported.
|
|
13
|
+
|
|
14
|
+
/** What can be wrong in finding and loading a plugin (plugin-load.ts), and in what it exports (here). */
|
|
15
|
+
type PluginProblemKind =
|
|
16
|
+
| "not-a-list"
|
|
17
|
+
| "bad-specifier"
|
|
18
|
+
| "outside"
|
|
19
|
+
| "not-found"
|
|
20
|
+
| "import-failed"
|
|
21
|
+
| "duplicate-name"
|
|
22
|
+
| "bad-export"
|
|
23
|
+
| "no-api-version"
|
|
24
|
+
| "api-version"
|
|
25
|
+
| "bad-name"
|
|
26
|
+
| "name-mismatch"
|
|
27
|
+
| "no-detect"
|
|
28
|
+
| "bad-lexicon"
|
|
29
|
+
| "bad-style";
|
|
30
|
+
|
|
31
|
+
/** plugin: as chaff.yaml writes it. detail: what was there instead, the name expected, the rule, list or style at fault. */
|
|
32
|
+
export type PluginProblem =
|
|
33
|
+
| { readonly kind: PluginProblemKind; readonly plugin: string; readonly detail: string }
|
|
34
|
+
| { readonly kind: "rule"; readonly plugin: string; readonly problem: CustomProblem };
|
|
35
|
+
|
|
36
|
+
/** Where a plugin came from: as chaff.yaml writes it, the file imported, and the name its package's name gives (none for a path). */
|
|
37
|
+
export type PluginOrigin = { readonly written: string; readonly file: string; readonly expectedName: string | undefined };
|
|
38
|
+
|
|
39
|
+
export type ParsedPlugin = {
|
|
40
|
+
readonly name: string;
|
|
41
|
+
/** The plugin as chaff.yaml writes it (chaff-plugin-foo, ./local-plugin), which a failing rule's reason names. */
|
|
42
|
+
readonly written: string;
|
|
43
|
+
readonly rules: readonly RuleDefinition[];
|
|
44
|
+
/** Each code rule's detector, by its id with the plugin's prefix. */
|
|
45
|
+
readonly detectors: Readonly<Record<string, UntrustedDetector>>;
|
|
46
|
+
/** Word lists by language, then by name with the plugin's prefix. */
|
|
47
|
+
readonly lexicons: Readonly<Record<string, Readonly<Record<string, Lexicon>>>>;
|
|
48
|
+
readonly styles: readonly StyleDefinition[];
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export type PluginRead = { readonly plugin: ParsedPlugin | undefined; readonly problems: readonly PluginProblem[] };
|
|
52
|
+
|
|
53
|
+
type Problem = (kind: Exclude<PluginProblem["kind"], "rule">, detail: string) => PluginProblem;
|
|
54
|
+
|
|
55
|
+
const isRecord = (value: unknown): value is Record<string, unknown> => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
56
|
+
|
|
57
|
+
const printed = (value: unknown): string => JSON.stringify(value) ?? describeValue(value);
|
|
58
|
+
|
|
59
|
+
/** A word list's or a style's own name, before the plugin's prefix. */
|
|
60
|
+
const LOCAL_NAME = /^[a-z][a-z0-9-]*$/u;
|
|
61
|
+
|
|
62
|
+
/** The plugin's name, checked against the name its package's name gives it. */
|
|
63
|
+
const nameOf = (exported: Record<string, unknown>, origin: PluginOrigin, problem: Problem): { name: string } | { problem: PluginProblem } => {
|
|
64
|
+
const name = exported["name"];
|
|
65
|
+
if (typeof name !== "string" || !isPluginName(name)) return { problem: problem("bad-name", printed(name)) };
|
|
66
|
+
if (origin.expectedName !== undefined && name !== origin.expectedName) return { problem: problem("name-mismatch", origin.expectedName) };
|
|
67
|
+
return { name };
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const versionProblem = (exported: Record<string, unknown>, problem: Problem): PluginProblem | undefined => {
|
|
71
|
+
const version = exported["apiVersion"];
|
|
72
|
+
if (version === undefined) return problem("no-api-version", "");
|
|
73
|
+
return version === API_VERSION ? undefined : problem("api-version", printed(version));
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
// ───────── rules ─────────
|
|
77
|
+
|
|
78
|
+
const detectOf = (entry: Record<string, unknown>): UntrustedDetector | undefined => {
|
|
79
|
+
const detect = entry["detect"];
|
|
80
|
+
return typeof detect === "function" ? (doc, options): unknown => Reflect.apply(detect, undefined, [doc, options]) : undefined;
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/** A rule with detect is read as a type: module rule whose module is the plugin's own file. */
|
|
84
|
+
const asCustomRule = (entry: unknown, file: string): unknown =>
|
|
85
|
+
isRecord(entry) && detectOf(entry) !== undefined ? { ...entry, type: "module", module: file } : entry;
|
|
86
|
+
|
|
87
|
+
/** Each code rule's detector by the id the plugin wrote. */
|
|
88
|
+
const detectorsByWrittenId = (entries: readonly unknown[]): ReadonlyMap<string, UntrustedDetector> =>
|
|
89
|
+
new Map(
|
|
90
|
+
entries.flatMap((entry): [string, UntrustedDetector][] => {
|
|
91
|
+
const detect = isRecord(entry) ? detectOf(entry) : undefined;
|
|
92
|
+
return isRecord(entry) && typeof entry["id"] === "string" && detect !== undefined ? [[entry["id"], detect]] : [];
|
|
93
|
+
}),
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
const withPrefix = (rule: RuleDefinition, name: string, lists: ReadonlySet<string>): RuleDefinition => ({
|
|
97
|
+
...rule,
|
|
98
|
+
id: `${name}/${rule.id}`,
|
|
99
|
+
plugin: name,
|
|
100
|
+
word_list: rule.word_list !== undefined && lists.has(rule.word_list) ? `${name}/${rule.word_list}` : rule.word_list,
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
type RulesContext = { readonly name: string; readonly origin: PluginOrigin; readonly useFor: readonly string[]; readonly lists: ReadonlySet<string> };
|
|
104
|
+
|
|
105
|
+
type Rules = Pick<ParsedPlugin, "rules" | "detectors"> & { readonly problems: readonly PluginProblem[] };
|
|
106
|
+
|
|
107
|
+
const rulesOf = (raw: unknown, context: RulesContext): Rules => {
|
|
108
|
+
const { name, origin } = context;
|
|
109
|
+
const parsed = parseCustomRules(Array.isArray(raw) ? raw.map((entry: unknown) => asCustomRule(entry, origin.file)) : raw, {
|
|
110
|
+
builtIn: new Set(),
|
|
111
|
+
useFor: context.useFor,
|
|
112
|
+
baseDir: dirname(origin.file),
|
|
113
|
+
});
|
|
114
|
+
const detectors = detectorsByWrittenId(Array.isArray(raw) ? raw : []);
|
|
115
|
+
const runnable = parsed.rules.filter((rule) => rule.custom?.type !== "module" || detectors.has(rule.id));
|
|
116
|
+
const codeless = parsed.rules.filter((rule) => !runnable.includes(rule));
|
|
117
|
+
return {
|
|
118
|
+
rules: runnable.map((rule) => withPrefix(rule, name, context.lists)),
|
|
119
|
+
detectors: Object.fromEntries(
|
|
120
|
+
runnable.flatMap((rule) => {
|
|
121
|
+
const detect = detectors.get(rule.id);
|
|
122
|
+
return detect === undefined ? [] : [[`${name}/${rule.id}`, detect]];
|
|
123
|
+
}),
|
|
124
|
+
),
|
|
125
|
+
problems: [
|
|
126
|
+
...parsed.problems.map((problem): PluginProblem => ({ kind: "rule", plugin: origin.written, problem })),
|
|
127
|
+
...codeless.map((rule): PluginProblem => ({ kind: "no-detect", plugin: origin.written, detail: rule.id })),
|
|
128
|
+
],
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
// ───────── word lists ─────────
|
|
133
|
+
|
|
134
|
+
const lexiconEntryOf = (value: unknown): LexiconEntry | undefined => {
|
|
135
|
+
if (typeof value === "string") return value.trim() === "" ? undefined : { pattern: value.trim() };
|
|
136
|
+
if (!isRecord(value) || typeof value["pattern"] !== "string" || value["pattern"].trim() === "") return undefined;
|
|
137
|
+
const insteadOf = value["instead_of"];
|
|
138
|
+
return { pattern: value["pattern"].trim(), ...(typeof insteadOf === "string" && insteadOf.trim() !== "" ? { instead_of: insteadOf.trim() } : {}) };
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const lexiconOf = (words: unknown): Lexicon | undefined => {
|
|
142
|
+
const entries = Array.isArray(words) ? words.map(lexiconEntryOf) : [undefined];
|
|
143
|
+
const readable = entries.flatMap((entry) => (entry === undefined ? [] : [entry]));
|
|
144
|
+
return readable.length === entries.length ? readable : undefined;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
type ListInLanguage = { readonly language: string; readonly list: string; readonly lexicon: Lexicon };
|
|
148
|
+
|
|
149
|
+
/** One word list in each language it has. undefined when any part of it cannot be read. */
|
|
150
|
+
const listOf = (list: string, raw: unknown): ListInLanguage[] | undefined => {
|
|
151
|
+
if (!LOCAL_NAME.test(list) || !isRecord(raw)) return undefined;
|
|
152
|
+
const read = Object.entries(raw).map(([language, words]) => ({ language, lexicon: lexiconOf(words) }));
|
|
153
|
+
const readable = read.flatMap(({ language, lexicon }) => (lexicon === undefined ? [] : [{ language, list, lexicon }]));
|
|
154
|
+
return readable.length === read.length ? readable : undefined;
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
type Lexicons = Pick<ParsedPlugin, "lexicons"> & { readonly lists: ReadonlySet<string>; readonly problems: readonly PluginProblem[] };
|
|
158
|
+
|
|
159
|
+
const byLanguage = (lists: readonly ListInLanguage[], name: string): Record<string, Record<string, Lexicon>> =>
|
|
160
|
+
Object.fromEntries(
|
|
161
|
+
[...new Set(lists.map((entry) => entry.language))].map((language) => [
|
|
162
|
+
language,
|
|
163
|
+
Object.fromEntries(lists.filter((entry) => entry.language === language).map((entry) => [`${name}/${entry.list}`, entry.lexicon])),
|
|
164
|
+
]),
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
const lexiconsOf = (raw: unknown, name: string, problem: Problem): Lexicons => {
|
|
168
|
+
if (raw === undefined) return { lexicons: {}, lists: new Set(), problems: [] };
|
|
169
|
+
if (!isRecord(raw)) return { lexicons: {}, lists: new Set(), problems: [problem("bad-lexicon", printed(raw))] };
|
|
170
|
+
const read = Object.entries(raw).map(([list, words]) => ({ list, inLanguages: listOf(list, words) }));
|
|
171
|
+
const readable = read.flatMap((entry) => entry.inLanguages ?? []);
|
|
172
|
+
return {
|
|
173
|
+
lexicons: byLanguage(readable, name),
|
|
174
|
+
lists: new Set(readable.map((entry) => entry.list)),
|
|
175
|
+
problems: read.filter((entry) => entry.inLanguages === undefined).map((entry) => problem("bad-lexicon", entry.list)),
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
// ───────── styles ─────────
|
|
180
|
+
|
|
181
|
+
/** One string reads the same in every language; a style's words need ja and en. */
|
|
182
|
+
const bothLanguages = (value: unknown): unknown => (typeof value === "string" ? { ja: value, en: value } : value);
|
|
183
|
+
|
|
184
|
+
const styleSpecOf = (raw: Record<string, unknown>, id: string, name: string): Record<string, unknown> => {
|
|
185
|
+
const source = isRecord(raw["source"]) ? { ...raw["source"], title: bothLanguages(raw["source"]["title"]) } : raw["source"];
|
|
186
|
+
return { ...raw, id: `${name}/${id}`, name: bothLanguages(raw["name"]), summary: bothLanguages(raw["summary"]), source };
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
const styleOrProblem = (entry: unknown, name: string, problem: Problem): { style: StyleDefinition } | { problem: PluginProblem } => {
|
|
190
|
+
const id = isRecord(entry) ? entry["id"] : undefined;
|
|
191
|
+
if (!isRecord(entry) || typeof id !== "string" || !LOCAL_NAME.test(id)) return { problem: problem("bad-style", printed(id)) };
|
|
192
|
+
try {
|
|
193
|
+
return { style: styleOf(styleSpecOf(entry, id, name), `${name}/${id}`) };
|
|
194
|
+
} catch (error) {
|
|
195
|
+
return { problem: problem("bad-style", error instanceof Error ? error.message : String(error)) };
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
type Styles = Pick<ParsedPlugin, "styles"> & { readonly problems: readonly PluginProblem[] };
|
|
200
|
+
|
|
201
|
+
const stylesOf = (raw: unknown, name: string, problem: Problem): Styles => {
|
|
202
|
+
if (raw === undefined) return { styles: [], problems: [] };
|
|
203
|
+
if (!Array.isArray(raw)) return { styles: [], problems: [problem("bad-style", printed(raw))] };
|
|
204
|
+
const read = raw.map((entry: unknown) => styleOrProblem(entry, name, problem));
|
|
205
|
+
return {
|
|
206
|
+
styles: read.flatMap((entry) => ("style" in entry ? [entry.style] : [])),
|
|
207
|
+
problems: read.flatMap((entry) => ("problem" in entry ? [entry.problem] : [])),
|
|
208
|
+
};
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
// ───────── the plugin ─────────
|
|
212
|
+
|
|
213
|
+
/** A plugin's default export, read. Every problem is reported; a plugin with any is left out whole, and the run is stopped. */
|
|
214
|
+
export const parsePlugin = (exported: unknown, origin: PluginOrigin, useFor: readonly string[]): PluginRead => {
|
|
215
|
+
const problem: Problem = (kind, detail) => ({ kind, plugin: origin.written, detail });
|
|
216
|
+
if (!isRecord(exported)) return { plugin: undefined, problems: [problem("bad-export", describeValue(exported))] };
|
|
217
|
+
const version = versionProblem(exported, problem);
|
|
218
|
+
if (version !== undefined) return { plugin: undefined, problems: [version] };
|
|
219
|
+
const named = nameOf(exported, origin, problem);
|
|
220
|
+
if ("problem" in named) return { plugin: undefined, problems: [named.problem] };
|
|
221
|
+
const { name } = named;
|
|
222
|
+
const lexicons = lexiconsOf(exported["lexicons"], name, problem);
|
|
223
|
+
const rules = rulesOf(exported["rules"], { name, origin, useFor, lists: lexicons.lists });
|
|
224
|
+
const styles = stylesOf(exported["styles"], name, problem);
|
|
225
|
+
const problems = [...rules.problems, ...lexicons.problems, ...styles.problems];
|
|
226
|
+
if (problems.length > 0) return { plugin: undefined, problems };
|
|
227
|
+
const plugin = { name, written: origin.written, rules: rules.rules, detectors: rules.detectors, lexicons: lexicons.lexicons, styles: styles.styles };
|
|
228
|
+
return { plugin, problems: [] };
|
|
229
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { API_VERSION } from "../api.ts";
|
|
2
|
+
import type { Config } from "../config/load.ts";
|
|
3
|
+
import type { Texts, UiLanguage } from "../ui.ts";
|
|
4
|
+
import { customProblemSentence } from "../custom/problems.ts";
|
|
5
|
+
import type { LoadProblem } from "./load.ts";
|
|
6
|
+
import type { PluginProblem } from "./plugin-parse.ts";
|
|
7
|
+
|
|
8
|
+
// What in the code chaff.yaml names could not be loaded, as sentences. Each names the rule or plugin and the file or
|
|
9
|
+
// package, as chaff.yaml writes it.
|
|
10
|
+
|
|
11
|
+
type ModuleText = Readonly<Record<LoadProblem["kind"], (rule: string, file: string, detail: string) => string>>;
|
|
12
|
+
|
|
13
|
+
type PluginText = {
|
|
14
|
+
readonly problems: Readonly<Record<Exclude<PluginProblem["kind"], "rule">, (plugin: string, detail: string) => string>>;
|
|
15
|
+
/** Where a plugin's rule is, for a problem a rule in custom_rules could have too. */
|
|
16
|
+
readonly ruleScope: (plugin: string) => string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const API = String(API_VERSION);
|
|
20
|
+
|
|
21
|
+
const MODULE_TEXT: Texts<ModuleText> = {
|
|
22
|
+
ja: {
|
|
23
|
+
"missing-file": (rule, file) => `custom_rules の ${rule}: module のファイル ${file} がありません`,
|
|
24
|
+
outside: (rule, file) =>
|
|
25
|
+
`custom_rules の ${rule}: ${file} はリンクをたどると chaff.yaml のあるフォルダの外です。読み込むとそのコードが動くので、外のファイルは絶対パスで名指ししてください`,
|
|
26
|
+
"import-failed": (rule, file, detail) => `custom_rules の ${rule}: ${file} を読み込めませんでした(${detail})`,
|
|
27
|
+
"bad-export": (rule, file, detail) =>
|
|
28
|
+
`custom_rules の ${rule}: ${file} の default export が検出器ではありません(${detail})。関数か defineRule({ detect }) を export default してください`,
|
|
29
|
+
"api-version": (rule, file, detail) => `custom_rules の ${rule}: ${file} はプラグイン API ${detail} 向けです。この chaff のプラグイン API は ${API} です`,
|
|
30
|
+
},
|
|
31
|
+
en: {
|
|
32
|
+
"missing-file": (rule, file) => `custom_rules ${rule}: the module file ${file} does not exist`,
|
|
33
|
+
outside: (rule, file) =>
|
|
34
|
+
`custom_rules ${rule}: ${file} leads outside the folder chaff.yaml is in through a link. Loading a module runs its code, so name a file outside by its absolute path`,
|
|
35
|
+
"import-failed": (rule, file, detail) => `custom_rules ${rule}: cannot load ${file} (${detail})`,
|
|
36
|
+
"bad-export": (rule, file, detail) =>
|
|
37
|
+
`custom_rules ${rule}: the default export of ${file} is not a detector (${detail}); export default a function or defineRule({ detect })`,
|
|
38
|
+
"api-version": (rule, file, detail) => `custom_rules ${rule}: ${file} was written for plugin API ${detail}; this chaff has plugin API ${API}`,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
const PLUGIN_TEXT: Texts<PluginText> = {
|
|
43
|
+
ja: {
|
|
44
|
+
ruleScope: (plugin) => `plugins の ${plugin} の rules`,
|
|
45
|
+
problems: {
|
|
46
|
+
"not-a-list": (_plugin, detail) => `plugins はプラグインの並び(- chaff-plugin-foo や - ./local-plugin)で書いてください(${detail})`,
|
|
47
|
+
"bad-specifier": (plugin) =>
|
|
48
|
+
`plugins の ${plugin}: パッケージは chaff-plugin-<名前> か @scope/chaff-plugin-<名前> の名前で、手元のプラグインは ./ で始まるパスで書いてください`,
|
|
49
|
+
outside: (plugin) =>
|
|
50
|
+
`plugins の ${plugin}: chaff.yaml のあるフォルダの外です。読み込むとそのコードが動くので、外のプラグインは絶対パスで名指ししてください`,
|
|
51
|
+
"not-found": (plugin) => `plugins の ${plugin}: 見つかりません。パッケージなら chaff.yaml のあるフォルダで yarn add ${plugin} を実行してください`,
|
|
52
|
+
"import-failed": (plugin, detail) => `plugins の ${plugin}: 読み込めませんでした(${detail})`,
|
|
53
|
+
"duplicate-name": (plugin, detail) => `plugins の ${plugin}: 名前 ${detail} のプラグインがもう一つあります`,
|
|
54
|
+
"bad-export": (plugin, detail) =>
|
|
55
|
+
`plugins の ${plugin}: default export がプラグインではありません(${detail})。definePlugin({ name, rules }) を export default してください`,
|
|
56
|
+
"no-api-version": (plugin) => `plugins の ${plugin}: 向けているプラグイン API がありません。definePlugin で作ると付きます`,
|
|
57
|
+
"api-version": (plugin, detail) => `plugins の ${plugin}: プラグイン API ${detail} 向けです。この chaff のプラグイン API は ${API} です`,
|
|
58
|
+
"bad-name": (plugin, detail) =>
|
|
59
|
+
`plugins の ${plugin}: name: ${detail} はプラグインの名前として読めません(英小文字・数字・ハイフン。@scope/ を付けてもよい)`,
|
|
60
|
+
"name-mismatch": (plugin, detail) => `plugins の ${plugin}: name は ${detail} にしてください(パッケージの名前から決まります)`,
|
|
61
|
+
"no-detect": (plugin, detail) => `plugins の ${plugin}: ルール ${detail} に detect がありません`,
|
|
62
|
+
"bad-lexicon": (plugin, detail) => `plugins の ${plugin}: 語彙表 ${detail} が読めません(名前: { ja: [語, …], en: [語, …] })`,
|
|
63
|
+
"bad-style": (plugin, detail) => `plugins の ${plugin}: スタイルが読めません(${detail})`,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
en: {
|
|
67
|
+
ruleScope: (plugin) => `plugins ${plugin} rules`,
|
|
68
|
+
problems: {
|
|
69
|
+
"not-a-list": (_plugin, detail) => `write plugins as a list (- chaff-plugin-foo or - ./local-plugin), not ${detail}`,
|
|
70
|
+
"bad-specifier": (plugin) =>
|
|
71
|
+
`plugins ${plugin}: name a package chaff-plugin-<name> or @scope/chaff-plugin-<name>, and a plugin of your own by a path starting with ./`,
|
|
72
|
+
outside: (plugin) =>
|
|
73
|
+
`plugins ${plugin}: it is outside the folder chaff.yaml is in. Loading a plugin runs its code, so name one outside by its absolute path`,
|
|
74
|
+
"not-found": (plugin) => `plugins ${plugin}: not found. For a package, run yarn add ${plugin} in the folder chaff.yaml is in`,
|
|
75
|
+
"import-failed": (plugin, detail) => `plugins ${plugin}: cannot load it (${detail})`,
|
|
76
|
+
"duplicate-name": (plugin, detail) => `plugins ${plugin}: another plugin is named ${detail}`,
|
|
77
|
+
"bad-export": (plugin, detail) => `plugins ${plugin}: the default export is not a plugin (${detail}); export default definePlugin({ name, rules })`,
|
|
78
|
+
"no-api-version": (plugin) => `plugins ${plugin}: it does not say which plugin API it was written for; definePlugin adds that`,
|
|
79
|
+
"api-version": (plugin, detail) => `plugins ${plugin}: it was written for plugin API ${detail}; this chaff has plugin API ${API}`,
|
|
80
|
+
"bad-name": (plugin, detail) =>
|
|
81
|
+
`plugins ${plugin}: cannot read name: ${detail} as a plugin's name (lowercase letters, digits and hyphens, with an optional @scope/)`,
|
|
82
|
+
"name-mismatch": (plugin, detail) => `plugins ${plugin}: its name must be ${detail}, which the package's name gives`,
|
|
83
|
+
"no-detect": (plugin, detail) => `plugins ${plugin}: the rule ${detail} has no detect`,
|
|
84
|
+
"bad-lexicon": (plugin, detail) => `plugins ${plugin}: cannot read the word list ${detail} (name: { ja: [word, …], en: [word, …] })`,
|
|
85
|
+
"bad-style": (plugin, detail) => `plugins ${plugin}: cannot read a style (${detail})`,
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const pluginSentence = (problem: PluginProblem, ui: UiLanguage): string => {
|
|
91
|
+
const text = PLUGIN_TEXT[ui];
|
|
92
|
+
if (problem.kind === "rule") return customProblemSentence(problem.problem, ui, text.ruleScope(problem.plugin));
|
|
93
|
+
return text.problems[problem.kind](problem.plugin, problem.detail);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/** What chaff.yaml names in code that could not be loaded: type: module rules, then plugins. Each stops the run. */
|
|
97
|
+
export const extensionProblems = (config: Pick<Config, "extensions" | "path">, ui: UiLanguage): string[] => {
|
|
98
|
+
const where = `chaff: ${config.path ?? "chaff.yaml"}`;
|
|
99
|
+
return [
|
|
100
|
+
...(config.extensions?.problems ?? []).map((problem) => `${where}: ${MODULE_TEXT[ui][problem.kind](problem.rule, problem.file, problem.detail)}`),
|
|
101
|
+
...(config.extensions?.pluginProblems ?? []).map((problem) => `${where}: ${pluginSentence(problem, ui)}`),
|
|
102
|
+
];
|
|
103
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { realpathSync } from "node:fs";
|
|
2
|
+
import { isAbsolute } from "node:path";
|
|
3
|
+
import { isInside } from "../custom/module-path.ts";
|
|
4
|
+
|
|
5
|
+
// The path check of custom/module-path.ts reads only the path as written, so a symbolic link inside the project can
|
|
6
|
+
// still point outside it. Before code is loaded, the same check runs on the real paths.
|
|
7
|
+
|
|
8
|
+
/** Whether a file written as a relative path is really inside baseDir once links are followed. An absolute path was written on purpose. */
|
|
9
|
+
export const staysInside = (written: string, file: string, baseDir: string): boolean =>
|
|
10
|
+
isAbsolute(written) || isInside(realpathSync(baseDir), realpathSync(file));
|