paperlint 3.2.0 → 4.1.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/.github/workflows/ci.yml +16 -23
- package/CLAUDE.md +33 -13
- package/CONTRIBUTING.md +23 -7
- package/README.md +11 -8
- package/dist/adapters/banal/failure.d.ts +1 -7
- package/dist/adapters/banal/failure.d.ts.map +1 -1
- package/dist/adapters/banal/failure.js +5 -7
- package/dist/adapters/banal/failure.js.map +1 -1
- package/dist/adapters/banal/index.d.ts.map +1 -1
- package/dist/adapters/banal/index.js +8 -11
- package/dist/adapters/banal/index.js.map +1 -1
- package/dist/adapters/banal/install.d.ts.map +1 -1
- package/dist/adapters/banal/install.js +4 -3
- package/dist/adapters/banal/install.js.map +1 -1
- package/dist/adapters/banal/invocation.d.ts +10 -5
- package/dist/adapters/banal/invocation.d.ts.map +1 -1
- package/dist/adapters/banal/invocation.js +13 -1
- package/dist/adapters/banal/invocation.js.map +1 -1
- package/dist/adapters/banal/locate.d.ts +12 -9
- package/dist/adapters/banal/locate.d.ts.map +1 -1
- package/dist/adapters/banal/locate.js +19 -12
- package/dist/adapters/banal/locate.js.map +1 -1
- package/dist/adapters/banal/run.d.ts +10 -1
- package/dist/adapters/banal/run.d.ts.map +1 -1
- package/dist/adapters/banal/run.js +8 -4
- package/dist/adapters/banal/run.js.map +1 -1
- package/dist/adapters/banal/settings.d.ts +1 -1
- package/dist/adapters/banal/settings.d.ts.map +1 -1
- package/dist/adapters/banal/settings.js +2 -1
- package/dist/adapters/banal/settings.js.map +1 -1
- package/dist/adapters/latex/document-class.d.ts +22 -0
- package/dist/adapters/latex/document-class.d.ts.map +1 -0
- package/dist/adapters/latex/document-class.js +102 -0
- package/dist/adapters/latex/document-class.js.map +1 -0
- package/dist/adapters/latex/hidden.d.ts +16 -0
- package/dist/adapters/latex/hidden.d.ts.map +1 -0
- package/dist/adapters/latex/hidden.js +49 -0
- package/dist/adapters/latex/hidden.js.map +1 -0
- package/dist/adapters/latex/index.d.ts +29 -0
- package/dist/adapters/latex/index.d.ts.map +1 -0
- package/dist/adapters/latex/index.js +18 -0
- package/dist/adapters/latex/index.js.map +1 -0
- package/dist/adapters/latex/nodes.d.ts +54 -0
- package/dist/adapters/latex/nodes.d.ts.map +1 -0
- package/dist/adapters/latex/nodes.js +93 -0
- package/dist/adapters/latex/nodes.js.map +1 -0
- package/dist/adapters/latex/outline.d.ts +10 -0
- package/dist/adapters/latex/outline.d.ts.map +1 -0
- package/dist/adapters/latex/outline.js +39 -0
- package/dist/adapters/latex/outline.js.map +1 -0
- package/dist/adapters/latex/parse.d.ts +42 -0
- package/dist/adapters/latex/parse.d.ts.map +1 -0
- package/dist/adapters/latex/parse.js +94 -0
- package/dist/adapters/latex/parse.js.map +1 -0
- package/dist/adapters/latex/rendered.d.ts +10 -0
- package/dist/adapters/latex/rendered.d.ts.map +1 -0
- package/dist/adapters/latex/rendered.js +39 -0
- package/dist/adapters/latex/rendered.js.map +1 -0
- package/dist/adapters/memory/index.d.ts.map +1 -1
- package/dist/adapters/memory/index.js +8 -2
- package/dist/adapters/memory/index.js.map +1 -1
- package/dist/adapters/node/process.io.d.ts +6 -3
- package/dist/adapters/node/process.io.d.ts.map +1 -1
- package/dist/adapters/node/process.io.js.map +1 -1
- package/dist/adapters/node/workspace.io.d.ts.map +1 -1
- package/dist/adapters/node/workspace.io.js +4 -2
- package/dist/adapters/node/workspace.io.js.map +1 -1
- package/dist/adapters/pdfjs/fill.d.ts.map +1 -1
- package/dist/adapters/pdfjs/fill.js +12 -12
- package/dist/adapters/pdfjs/fill.js.map +1 -1
- package/dist/adapters/references/index.d.ts.map +1 -1
- package/dist/adapters/references/index.js +4 -2
- package/dist/adapters/references/index.js.map +1 -1
- package/dist/build-engine.d.ts +1 -1
- package/dist/build-engine.d.ts.map +1 -1
- package/dist/build-engine.js +8 -1
- package/dist/build-engine.js.map +1 -1
- package/dist/build.d.ts +2 -3
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +9 -10
- package/dist/build.js.map +1 -1
- package/dist/caller-path.d.ts +3 -0
- package/dist/caller-path.d.ts.map +1 -0
- package/dist/caller-path.js +13 -0
- package/dist/caller-path.js.map +1 -0
- package/dist/cli.d.ts +10 -17
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +91 -17
- package/dist/cli.js.map +1 -1
- package/dist/doctor.d.ts +12 -3
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +2 -1
- package/dist/doctor.js.map +1 -1
- package/dist/domain/paths.d.ts +8 -2
- package/dist/domain/paths.d.ts.map +1 -1
- package/dist/domain/paths.js +12 -1
- package/dist/domain/paths.js.map +1 -1
- package/dist/domain/ready.d.ts +24 -0
- package/dist/domain/ready.d.ts.map +1 -0
- package/dist/domain/ready.js +11 -0
- package/dist/domain/ready.js.map +1 -0
- package/dist/domain/record.d.ts +8 -0
- package/dist/domain/record.d.ts.map +1 -0
- package/dist/domain/record.js +8 -0
- package/dist/domain/record.js.map +1 -0
- package/dist/domain/sha256.d.ts.map +1 -1
- package/dist/domain/sha256.js +4 -2
- package/dist/domain/sha256.js.map +1 -1
- package/dist/domain/tex-document.d.ts +84 -0
- package/dist/domain/tex-document.d.ts.map +1 -0
- package/dist/domain/tex-document.js +43 -0
- package/dist/domain/tex-document.js.map +1 -0
- package/dist/engine.d.ts +23 -22
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js.map +1 -1
- package/dist/eslint-rules/bib-reachable-entry.d.ts +1 -1
- package/dist/eslint-rules/bib-reachable-entry.js.map +1 -1
- package/dist/eslint-rules/install-path-literals.d.ts +2 -2
- package/dist/eslint-rules/install-path-literals.js.map +1 -1
- package/dist/eslint-rules/paper-research-question.d.ts +1 -1
- package/dist/eslint-rules/paper-research-question.js.map +1 -1
- package/dist/eslint-rules/paper-stages.d.ts +2 -2
- package/dist/eslint-rules/paper-stages.js.map +1 -1
- package/dist/eslint-rules/paper-typography.d.ts +6 -6
- package/dist/eslint-rules/paper-typography.js.map +1 -1
- package/dist/eslint-rules/pdf-last-page-balance.d.ts +1 -1
- package/dist/eslint-rules/pdf-last-page-balance.js.map +1 -1
- package/dist/eslint-rules/review-frontmatter.d.ts +2 -2
- package/dist/eslint-rules/review-frontmatter.js.map +1 -1
- package/dist/eslint-rules/sibling-frontmatter.d.ts +1 -1
- package/dist/eslint-rules/sibling-frontmatter.d.ts.map +1 -1
- package/dist/eslint-rules/temp-root-realpath.d.ts +1 -1
- package/dist/eslint-rules/temp-root-realpath.js.map +1 -1
- package/dist/eslint-rules/tex-build.d.ts +2 -2
- package/dist/eslint-rules/tex-build.js.map +1 -1
- package/dist/facts-file.d.ts.map +1 -1
- package/dist/facts-file.js +31 -28
- package/dist/facts-file.js.map +1 -1
- package/dist/hooks-settings.d.ts.map +1 -1
- package/dist/hooks-settings.js +17 -2
- package/dist/hooks-settings.js.map +1 -1
- package/dist/init.d.ts +3 -4
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +18 -8
- package/dist/init.js.map +1 -1
- package/dist/lib/paper-config.d.ts.map +1 -1
- package/dist/lib/paper-config.js +1 -5
- package/dist/lib/paper-config.js.map +1 -1
- package/dist/new-paper.d.ts +5 -0
- package/dist/new-paper.d.ts.map +1 -1
- package/dist/new-paper.js +8 -1
- package/dist/new-paper.js.map +1 -1
- package/dist/package-dirs.d.ts +5 -0
- package/dist/package-dirs.d.ts.map +1 -0
- package/dist/package-dirs.js +14 -0
- package/dist/package-dirs.js.map +1 -0
- package/dist/paper-files.d.ts +4 -4
- package/dist/paper-files.d.ts.map +1 -1
- package/dist/paper-files.js +6 -6
- package/dist/paper-files.js.map +1 -1
- package/dist/paper-settings.js +3 -3
- package/dist/paper-settings.js.map +1 -1
- package/dist/pdf-facts.d.ts +51 -1
- package/dist/pdf-facts.d.ts.map +1 -1
- package/dist/pdf-facts.js +23 -15
- package/dist/pdf-facts.js.map +1 -1
- package/dist/pdf-geometry.d.ts.map +1 -1
- package/dist/pdf-geometry.js +2 -3
- package/dist/pdf-geometry.js.map +1 -1
- package/dist/ports/latex.d.ts +24 -0
- package/dist/ports/latex.d.ts.map +1 -0
- package/dist/ports/latex.js +2 -0
- package/dist/ports/latex.js.map +1 -0
- package/dist/ports/tool-installer.d.ts +2 -14
- package/dist/ports/tool-installer.d.ts.map +1 -1
- package/dist/presets.d.ts +15 -2
- package/dist/presets.d.ts.map +1 -1
- package/dist/presets.js +35 -10
- package/dist/presets.js.map +1 -1
- package/dist/references.d.ts.map +1 -1
- package/dist/references.js +4 -4
- package/dist/references.js.map +1 -1
- package/dist/rules-config.d.ts +26 -1
- package/dist/rules-config.d.ts.map +1 -1
- package/dist/rules-config.js +9 -9
- package/dist/rules-config.js.map +1 -1
- package/dist/tex-requirements.d.ts +15 -0
- package/dist/tex-requirements.d.ts.map +1 -1
- package/dist/tex-requirements.js +28 -10
- package/dist/tex-requirements.js.map +1 -1
- package/dist/tex-venue-rules.d.ts +83 -0
- package/dist/tex-venue-rules.d.ts.map +1 -0
- package/dist/tex-venue-rules.js +254 -0
- package/dist/tex-venue-rules.js.map +1 -0
- package/dist/types.d.ts +5 -3
- package/dist/types.d.ts.map +1 -1
- package/dist/venue-rules.d.ts +1 -1
- package/dist/venue-rules.d.ts.map +1 -1
- package/dist/venue-rules.js +20 -7
- package/dist/venue-rules.js.map +1 -1
- package/docs/configuration.md +5 -4
- package/docs/e2e.md +69 -40
- package/docs/install.md +1 -1
- package/docs/prior-art/README.md +1 -1
- package/docs/prior-art/package-location.md +5 -5
- package/docs/prior-art/repro/README.md +1 -1
- package/docs/prior-art/test-tooling.md +21 -10
- package/docs/rules/tex/required-section.md +73 -0
- package/docs/rules/tex/template.md +62 -0
- package/docs/rules/tex/venue-leftover.md +71 -0
- package/docs/rules.md +70 -48
- package/docs/testing.md +17 -4
- package/docs/texlive-install-decision.md +1 -1
- package/docs/toolchain.md +2 -2
- package/eslint-rules/bib-reachable-entry.ts +1 -1
- package/eslint-rules/install-path-literals.ts +2 -2
- package/eslint-rules/paper-research-question.ts +1 -1
- package/eslint-rules/paper-stages.ts +2 -2
- package/eslint-rules/paper-typography.ts +2 -2
- package/eslint-rules/pdf-last-page-balance.ts +1 -1
- package/eslint-rules/review-frontmatter.ts +1 -1
- package/eslint-rules/temp-root-realpath.ts +1 -1
- package/eslint-rules/tex-build.ts +2 -2
- package/eslint.config.mjs +162 -15
- package/fixtures/build-e2e/acmart/expect.json +26 -0
- package/fixtures/build-e2e/aidc/PIPELINE-STATUS.md +3 -0
- package/fixtures/build-e2e/aidc/expect.json +14 -0
- package/fixtures/build-e2e/aidc/paper.tex +46 -0
- package/fixtures/build-e2e/aidc/paperlint.json +1 -0
- package/fixtures/build-e2e/broken/expect.json +11 -0
- package/fixtures/build-e2e/cite/expect.json +27 -0
- package/fixtures/build-e2e/empty/expect.json +12 -0
- package/fixtures/build-e2e/fallback/expect.json +53 -0
- package/fixtures/build-e2e/guards/expect.json +6 -0
- package/fixtures/build-e2e/no-source/expect.json +10 -0
- package/fixtures/build-e2e/unbalanced/expect.json +60 -0
- package/fixtures/install-path-literals/clean.fixture.mjs +1 -1
- package/fixtures/install-path-literals/clean.md +2 -2
- package/fixtures/install-path-literals/defect.fixture.mjs +1 -1
- package/fixtures/install-path-literals/defect.md +2 -2
- package/fixtures/pdf-facts/README.md +1 -1
- package/fixtures/real-markdown-paper/baseline.ts +1 -1
- package/fixtures/render-paper/build-clean.sh +3 -5
- package/hooks/paper-status-gates.sh +9 -19
- package/lib/paper-config.harness.mjs +1 -1
- package/lib/paper-config.ts +1 -5
- package/lib/skill-checks.mjs +24 -381
- package/lib/skill-checks.test.mjs +63 -115
- package/lib/skill-corpus.mjs +10 -251
- package/lib/skill-corpus.test.mjs +2 -13
- package/lib/skill-trigger-cases.mjs +1 -1
- package/package.json +13 -2
- package/{skills/submit-paper/references/venues → presets}/acm-sigconf.jsonc +4 -1
- package/{skills/submit-paper/references/venues → presets}/agenticdev.jsonc +4 -0
- package/presets/aidc.jsonc +73 -0
- package/{skills/submit-paper/references/venues → presets}/aisec.jsonc +4 -0
- package/presets/ieee-conference.jsonc +66 -0
- package/{skills/submit-paper/references/venues → presets}/realm.jsonc +8 -1
- package/{skills/submit-paper/references/venues → presets/tex}/paper-guards.tex +1 -1
- package/{skills/submit-paper/references/venues → presets}/venue-profile.schema.json +30 -2
- package/scripts/check.harness.ts +64 -10
- package/scripts/check.test.ts +60 -13
- package/scripts/check.ts +83 -30
- package/scripts/coverage-config.test.ts +0 -1
- package/scripts/harness-api.frozen.json +0 -1
- package/scripts/test.test.ts +1 -1
- package/scripts/test.ts +1 -1
- package/skills/analyze-sibling-paper/SKILL.md +1 -39
- package/skills/analyze-sibling-paper/SKILL.md.spec.ts +0 -38
- package/skills/argument-arc/SKILL.md +2 -36
- package/skills/argument-arc/SKILL.md.spec.ts +1 -43
- package/skills/build-benchmark/SKILL.md +1 -41
- package/skills/build-benchmark/SKILL.md.spec.ts +0 -40
- package/skills/camera-ready/SKILL.md +1 -34
- package/skills/camera-ready/SKILL.md.spec.ts +0 -33
- package/skills/cold-read-diff/SKILL.md +1 -35
- package/skills/cold-read-diff/SKILL.md.spec.ts +0 -34
- package/skills/draft-paper/SKILL.md +2 -41
- package/skills/draft-paper/SKILL.md.spec.ts +1 -50
- package/skills/extend-paper/SKILL.md +2 -33
- package/skills/extend-paper/SKILL.md.spec.ts +1 -42
- package/skills/find-venue/SKILL.md +2 -38
- package/skills/find-venue/SKILL.md.spec.ts +1 -47
- package/skills/grade-paper-writing/SKILL.md +3 -38
- package/skills/grade-paper-writing/SKILL.md.spec.ts +2 -47
- package/skills/grade-paper-writing/prose-lint.mjs +2 -3
- package/skills/grade-paper-writing/prose-lint.test.ts +1 -1
- package/skills/harden-paper/SKILL.md +1 -39
- package/skills/harden-paper/SKILL.md.spec.ts +0 -38
- package/skills/map-prior-work/SKILL.md +1 -35
- package/skills/map-prior-work/SKILL.md.spec.ts +0 -34
- package/skills/osf-artifact-upload/osf-artifact-upload.harness.ts +3 -4
- package/skills/paper-adversarial-review/SKILL.md +2 -35
- package/skills/paper-adversarial-review/SKILL.md.spec.ts +1 -43
- package/skills/paper-pipeline/PIPELINE-MAP.md +2 -2
- package/skills/paper-pipeline/SKILL.md +3 -29
- package/skills/paper-pipeline/SKILL.md.spec.ts +2 -28
- package/skills/paper-pipeline/grade-paper-writing-ablation.eval.mjs +1 -1
- package/skills/paper-pipeline/paper-pipeline.harness.mjs +25 -40
- package/skills/paper-pipeline/references/acceptance-gate.md +1 -6
- package/skills/paper-pipeline/references/pipeline-status-template.md +8 -35
- package/skills/paper-pipeline/scripts/README.md +30 -225
- package/skills/paper-pipeline/scripts/artifact-coverage.harness.mjs +4 -8
- package/skills/paper-pipeline/scripts/consumer.d.mts +0 -2
- package/skills/paper-pipeline/scripts/consumer.harness.mjs +6 -104
- package/skills/paper-pipeline/scripts/consumer.mjs +24 -119
- package/skills/paper-pipeline/scripts/generated-code.harness.mjs +2 -3
- package/skills/paper-pipeline/scripts/population-map.harness.mjs +3 -3
- package/skills/paper-status/SKILL.md +2 -42
- package/skills/paper-status/SKILL.md.spec.ts +1 -41
- package/skills/pc-panel-review/SKILL.md +2 -46
- package/skills/pc-panel-review/SKILL.md.spec.ts +1 -45
- package/skills/plan-paper-timeline/SKILL.md +2 -36
- package/skills/plan-paper-timeline/SKILL.md.spec.ts +0 -36
- package/skills/render-paper/SKILL.md +2 -38
- package/skills/render-paper/SKILL.md.spec.ts +1 -37
- package/skills/render-paper/check-render.sh +16 -63
- package/skills/render-paper/render-paper.harness.mjs +17 -59
- package/skills/research-ideate/SKILL.md +2 -39
- package/skills/research-ideate/SKILL.md.spec.ts +1 -47
- package/skills/study-accepted-papers/SKILL.md +1 -34
- package/skills/study-accepted-papers/SKILL.md.spec.ts +0 -33
- package/skills/submit-paper/SKILL.md +1 -33
- package/skills/submit-paper/SKILL.md.spec.ts +0 -32
- package/skills/sweep-design-space/SKILL.md +1 -38
- package/skills/sweep-design-space/SKILL.md.spec.ts +0 -37
- package/skills/tighten-paper/SKILL.md +2 -39
- package/skills/tighten-paper/SKILL.md.spec.ts +1 -47
- package/skills/tighten-paper/structure.mjs +4 -11
- package/skills/verify-citations/SKILL.md +2 -38
- package/skills/verify-citations/SKILL.md.spec.ts +1 -37
- package/src/adapters/banal/failure.ts +9 -10
- package/src/adapters/banal/index.test.ts +3 -3
- package/src/adapters/banal/index.ts +8 -10
- package/src/adapters/banal/install.ts +9 -4
- package/src/adapters/banal/invocation.test.ts +20 -8
- package/src/adapters/banal/invocation.ts +24 -9
- package/src/adapters/banal/locate.test.ts +2 -2
- package/src/adapters/banal/locate.ts +27 -21
- package/src/adapters/banal/output.test.ts +1 -1
- package/src/adapters/banal/run.test.ts +3 -3
- package/src/adapters/banal/run.ts +16 -10
- package/src/adapters/banal/settings.ts +2 -2
- package/src/adapters/banal/xml.test.ts +1 -1
- package/src/adapters/curl/download.test.ts +4 -4
- package/src/adapters/latex/document-class.ts +147 -0
- package/src/adapters/latex/hidden.ts +70 -0
- package/src/adapters/latex/index.test.ts +361 -0
- package/src/adapters/latex/index.ts +55 -0
- package/src/adapters/latex/nodes.ts +141 -0
- package/src/adapters/latex/outline.ts +64 -0
- package/src/adapters/latex/parse.ts +136 -0
- package/src/adapters/latex/rendered.ts +59 -0
- package/src/adapters/memory/index.ts +4 -3
- package/src/adapters/node/files.test.ts +5 -3
- package/src/adapters/node/process.io.ts +9 -2
- package/src/adapters/node/process.test.ts +4 -4
- package/src/adapters/node/workspace.io.ts +9 -4
- package/src/adapters/pdfjs/fill.test.ts +1 -1
- package/src/adapters/pdfjs/fill.ts +18 -10
- package/src/adapters/references/index.ts +7 -2
- package/src/build-engine.test.ts +11 -6
- package/src/build-engine.ts +10 -5
- package/src/build.harness.mjs +5 -7
- package/src/build.test.ts +10 -11
- package/src/build.ts +12 -13
- package/src/caller-path.ts +13 -0
- package/src/cli.harness.mjs +1 -3
- package/src/cli.test.ts +21 -16
- package/src/cli.ts +115 -33
- package/src/doctor.test.ts +1 -1
- package/src/doctor.ts +14 -5
- package/src/domain/paths.test.ts +15 -0
- package/src/domain/paths.ts +20 -1
- package/src/domain/ready.ts +31 -0
- package/src/domain/record.test.ts +20 -0
- package/src/domain/record.ts +12 -0
- package/src/domain/sha256.ts +5 -3
- package/src/domain/tex-document.test.ts +80 -0
- package/src/domain/tex-document.ts +110 -0
- package/src/engine.harness.mjs +1 -1
- package/src/engine.ts +30 -2
- package/src/facts-file.test.ts +4 -7
- package/src/facts-file.ts +45 -30
- package/src/hooks-settings.harness.ts +17 -0
- package/src/hooks-settings.ts +28 -4
- package/src/init.test.ts +25 -5
- package/src/init.ts +26 -12
- package/src/latex-loop.harness.ts +1 -1
- package/src/new-paper.harness.mjs +7 -23
- package/src/new-paper.test.ts +28 -3
- package/src/new-paper.ts +15 -3
- package/src/package-dirs.ts +17 -0
- package/src/paper-files.test.ts +22 -19
- package/src/paper-files.ts +16 -27
- package/src/paper-settings-commands.test.ts +6 -1
- package/src/paper-settings.test.ts +2 -2
- package/src/paper-settings.ts +5 -5
- package/src/pdf-facts.test.ts +16 -5
- package/src/pdf-facts.ts +79 -22
- package/src/pdf-geometry.ts +5 -3
- package/src/ports/latex.ts +29 -0
- package/src/ports/tool-installer.ts +2 -17
- package/src/presets.test.ts +65 -4
- package/src/presets.ts +65 -28
- package/src/references.test.ts +25 -19
- package/src/references.ts +4 -5
- package/src/rule-cases.test.ts +474 -0
- package/src/rule-docs.test.ts +159 -0
- package/src/rules-config.ts +40 -11
- package/src/tex-requirements.harness.ts +13 -23
- package/src/tex-requirements.test.ts +21 -0
- package/src/tex-requirements.ts +64 -14
- package/src/tex-venue-rules.test.ts +659 -0
- package/src/tex-venue-rules.ts +429 -0
- package/src/toolchain.harness.mjs +1 -1
- package/src/toolchain.test.ts +9 -5
- package/src/toolchain.ts +2 -2
- package/src/types.ts +5 -3
- package/src/venue-rules.test.ts +104 -8
- package/src/venue-rules.ts +22 -12
- package/templates/paper/paper.tex +2 -1
- package/skills/paper-pipeline/scripts/announce.mjs +0 -67
- package/skills/paper-pipeline/scripts/announce.test.mjs +0 -102
- package/skills/paper-pipeline/scripts/fixtures/clean/PIPELINE-STATUS.md +0 -51
- package/skills/paper-pipeline/scripts/fixtures/dirty/PIPELINE-STATUS.md +0 -52
- package/skills/paper-pipeline/scripts/fixtures/dirty/paper.md +0 -6
- package/skills/paper-pipeline/scripts/fixtures/scorecard.ts +0 -100
- package/skills/paper-pipeline/scripts/ledger.cli.test.mjs +0 -302
- package/skills/paper-pipeline/scripts/ledger.mjs +0 -623
- package/skills/paper-pipeline/scripts/ledger.test.mjs +0 -254
- package/skills/paper-pipeline/scripts/pipeline-check.cli.test.mjs +0 -474
- package/skills/paper-pipeline/scripts/pipeline-check.harness.mjs +0 -328
- package/skills/paper-pipeline/scripts/pipeline-check.mjs +0 -750
- package/skills/paper-pipeline/scripts/pipeline-edges.mjs +0 -169
- package/skills/paper-pipeline/scripts/pipeline-edges.test.mjs +0 -73
- package/skills/paper-pipeline/scripts/run-mechanical.mjs +0 -648
- package/skills/paper-pipeline/scripts/run-mechanical.test.mjs +0 -468
- package/skills/paper-pipeline/scripts/status.mjs +0 -295
- package/skills/paper-pipeline/scripts/status.test.mjs +0 -232
- /package/{skills/submit-paper/references/venues → presets/tex}/agenticdev.tex +0 -0
- /package/{skills/submit-paper/references/venues → presets}/tex-base.jsonc +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tex-requirements.d.ts","sourceRoot":"","sources":["../src/tex-requirements.ts"],"names":[],"mappings":"AA0BA,OAAO,GAAG,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"tex-requirements.d.ts","sourceRoot":"","sources":["../src/tex-requirements.ts"],"names":[],"mappings":"AA0BA,OAAO,GAAG,MAAM,KAAK,CAAC;AAKtB,gEAAgE;AAChE,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC,CAAC;AAExE,MAAM,WAAW,eAAe;IAC9B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CAAC;CACnD;AA2ED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,GAAE,MAAqB,GACzB,UAAU,CAwBZ;AAED,qGAAqG;AACrG,wBAAgB,YAAY,CAC1B,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,GAAG,GAAE,MAAqB,GACzB,eAAe,CAEjB;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM1D;AAMD,4FAA4F;AAC5F,wBAAgB,UAAU,CAAC,GAAG,GAAE,MAAqB,GAAG,MAAM,EAAE,CAK/D;AAED,mGAAmG;AACnG,wBAAgB,iBAAiB,CAC/B,CAAC,EAAE,eAAe,EAClB,CAAC,EAAE,eAAe,GACjB,eAAe,CAWjB;AAED,yFAAyF;AACzF,wBAAgB,YAAY,CAAC,GAAG,EAAE,eAAe,GAAG,MAAM,EAAE,CAI3D;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,eAAe,CAAA;CAAE,GAAG,IAAI,EACxE,GAAG,GAAE,MAAqB,GACzB,iBAAiB,CAWnB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,GAAG,GAAE,MAAqB,EAC1B,KAAK,GAAE,SAAS,eAAe,EAAO,GACrC;IACD,QAAQ,CAAC,GAAG,EAAE,eAAe,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B,CAUA"}
|
package/dist/tex-requirements.js
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
* `TexRequirements` and never looks at the text again; a malformed profile throws with the path
|
|
17
17
|
* of every violation, it is never read as "no packages".
|
|
18
18
|
*
|
|
19
|
-
* Where the profiles live is answered by `
|
|
20
|
-
* allowed to know where this package is installed (rule 10).
|
|
19
|
+
* Where the profiles live is answered by `presetsDir()` in `package-dirs.ts` — the one module
|
|
20
|
+
* allowed to know where this package's data is installed (rule 10).
|
|
21
21
|
*/
|
|
22
22
|
// eslint-disable-next-line boundaries/dependencies -- legacy I/O, moves behind a port in #76
|
|
23
23
|
import { readFileSync, readdirSync } from "node:fs";
|
|
@@ -25,19 +25,31 @@ import { createRequire } from "node:module";
|
|
|
25
25
|
import { join } from "node:path";
|
|
26
26
|
// eslint-disable-next-line boundaries/dependencies -- legacy layer, moves behind a port in #76
|
|
27
27
|
import Ajv from "ajv";
|
|
28
|
-
import {
|
|
28
|
+
import { presetsDir } from "./package-dirs.js";
|
|
29
29
|
import { CONFIG_FILE } from "#lib/paper-config";
|
|
30
|
+
import { fieldOf } from "./domain/record.js";
|
|
30
31
|
/** The profile every paper gets, and the only one a paper with an unknown venue gets. */
|
|
31
32
|
export const BASE_PROFILE = "tex-base.jsonc";
|
|
32
33
|
export const SCHEMA_FILE = "venue-profile.schema.json";
|
|
33
34
|
const PROFILE_EXT = ".jsonc";
|
|
34
35
|
export const NO_REQUIREMENTS = { packages: {}, tools: {} };
|
|
36
|
+
const isTsJsonc = (m) => typeof fieldOf(m, "parseConfigFileTextToJson") === "function" &&
|
|
37
|
+
typeof fieldOf(m, "flattenDiagnosticMessageText") === "function";
|
|
38
|
+
/** `typescript` as `load` returns it — `require` answers `any` — checked for the two functions used. */
|
|
39
|
+
export function loadTypescript(load) {
|
|
40
|
+
const m = load("typescript");
|
|
41
|
+
if (!isTsJsonc(m))
|
|
42
|
+
throw new Error("`typescript` loaded without parseConfigFileTextToJson — reinstall this package");
|
|
43
|
+
return m;
|
|
44
|
+
}
|
|
35
45
|
let ts = null;
|
|
36
46
|
/** TypeScript is loaded only when a profile is read: `paperlint lint` never pays for it. */
|
|
37
47
|
function typescript() {
|
|
38
|
-
ts ??= createRequire(import.meta.url)
|
|
48
|
+
ts ??= loadTypescript(createRequire(import.meta.url));
|
|
39
49
|
return ts;
|
|
40
50
|
}
|
|
51
|
+
/** `PresetJson` is the TypeScript side of the profile schema: a document the schema accepts is one. */
|
|
52
|
+
const matchesSchema = (v, validate) => validate(v) === true;
|
|
41
53
|
const validators = new Map();
|
|
42
54
|
function validatorFor(dir) {
|
|
43
55
|
const known = validators.get(dir);
|
|
@@ -96,6 +108,10 @@ function formatOf(j = {}) {
|
|
|
96
108
|
kinds: kindsOf(j.kinds),
|
|
97
109
|
};
|
|
98
110
|
}
|
|
111
|
+
/** A preset's `required_sections`, or null when it names none. */
|
|
112
|
+
const sectionsOf = (r) => r === undefined
|
|
113
|
+
? null
|
|
114
|
+
: r.map((x) => ({ title: x.title, position: orNull(x.position) }));
|
|
99
115
|
/**
|
|
100
116
|
* The text of one preset file → the typed file, or an Error naming every problem. The ONE parser
|
|
101
117
|
* of a preset: the toolchain reads its `tex`, the venue rules its `format`, the config its `rules`.
|
|
@@ -104,27 +120,29 @@ function formatOf(j = {}) {
|
|
|
104
120
|
* @param file the name to put in messages
|
|
105
121
|
* @param dir the directory holding the schema (the shipped venues directory by default)
|
|
106
122
|
*/
|
|
107
|
-
export function parsePreset(text, file, dir =
|
|
123
|
+
export function parsePreset(text, file, dir = presetsDir()) {
|
|
108
124
|
const parsed = typescript().parseConfigFileTextToJson(file, text);
|
|
109
125
|
const config = parsed.config;
|
|
110
126
|
const error = parsed.error;
|
|
111
127
|
if (error)
|
|
112
128
|
throw new Error(`${file}: not valid JSONC — ${typescript().flattenDiagnosticMessageText(error.messageText, " ")}`);
|
|
113
129
|
const validate = validatorFor(dir);
|
|
114
|
-
if (!
|
|
130
|
+
if (!matchesSchema(config, validate))
|
|
115
131
|
throw new Error(`${file} does not match ${SCHEMA_FILE}:\n ${violations(file, validate).join("\n ")}`);
|
|
116
132
|
const j = config;
|
|
117
133
|
return {
|
|
118
134
|
extends: orNull(j.extends),
|
|
119
135
|
name: orNull(j.name),
|
|
120
136
|
template: orNull(j.template),
|
|
137
|
+
aliases: j.aliases ?? [],
|
|
138
|
+
requiredSections: sectionsOf(j.required_sections),
|
|
121
139
|
tex: j.tex ? { packages: j.tex.packages, tools: j.tex.tools ?? {} } : null,
|
|
122
140
|
format: formatOf(j.format),
|
|
123
141
|
rules: j.rules ?? {},
|
|
124
142
|
};
|
|
125
143
|
}
|
|
126
144
|
/** The text of one preset → the TeX requirements it declares itself (none without a `tex` block). */
|
|
127
|
-
export function parseProfile(text, file, dir =
|
|
145
|
+
export function parseProfile(text, file, dir = presetsDir()) {
|
|
128
146
|
return parsePreset(text, file, dir).tex ?? NO_REQUIREMENTS;
|
|
129
147
|
}
|
|
130
148
|
/**
|
|
@@ -142,7 +160,7 @@ function readProfile(dir, file) {
|
|
|
142
160
|
return parseProfile(readFileSync(join(dir, file), "utf8"), file, dir);
|
|
143
161
|
}
|
|
144
162
|
/** The venues that have a profile — every `.jsonc` in the directory except the base set. */
|
|
145
|
-
export function venueNames(dir =
|
|
163
|
+
export function venueNames(dir = presetsDir()) {
|
|
146
164
|
return readdirSync(dir)
|
|
147
165
|
.filter((f) => f.endsWith(PROFILE_EXT) && f !== BASE_PROFILE)
|
|
148
166
|
.map((f) => f.slice(0, -PROFILE_EXT.length))
|
|
@@ -172,7 +190,7 @@ export function packageNames(tex) {
|
|
|
172
190
|
* `extends` chain, resolved by `src/presets.ts`). A paper with no preset gets the base set, and the
|
|
173
191
|
* source says so, so an ACM paper built without a preset is visibly running on the base set.
|
|
174
192
|
*/
|
|
175
|
-
export function requirementsFor(preset, dir =
|
|
193
|
+
export function requirementsFor(preset, dir = presetsDir()) {
|
|
176
194
|
const base = readProfile(dir, BASE_PROFILE);
|
|
177
195
|
return preset === null
|
|
178
196
|
? {
|
|
@@ -189,7 +207,7 @@ export function requirementsFor(preset, dir = packageVenuesDir()) {
|
|
|
189
207
|
* papers, which may live outside the package. The set `paperlint toolchain` installs, so one tree
|
|
190
208
|
* builds any paper.
|
|
191
209
|
*/
|
|
192
|
-
export function declaredUnion(dir =
|
|
210
|
+
export function declaredUnion(dir = presetsDir(), extra = []) {
|
|
193
211
|
const venues = venueNames(dir);
|
|
194
212
|
const shipped = venues.reduce((acc, v) => mergeRequirements(acc, readProfile(dir, `${v}${PROFILE_EXT}`)), readProfile(dir, BASE_PROFILE));
|
|
195
213
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tex-requirements.js","sourceRoot":"","sources":["../src/tex-requirements.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,6FAA6F;AAC7F,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,+FAA+F;AAC/F,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"tex-requirements.js","sourceRoot":"","sources":["../src/tex-requirements.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,6FAA6F;AAC7F,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,+FAA+F;AAC/F,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAkB7C,yFAAyF;AACzF,MAAM,CAAC,MAAM,YAAY,GAAG,gBAAgB,CAAC;AAC7C,MAAM,CAAC,MAAM,WAAW,GAAG,2BAA2B,CAAC;AACvD,MAAM,WAAW,GAAG,QAAQ,CAAC;AAE7B,MAAM,CAAC,MA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,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;IAC/B,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAC3B,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,GAAG,EAAE,WAAW,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,WAAW,EAAE,CAAC,CAAC,EAC1E,WAAW,CAAC,GAAG,EAAE,YAAY,CAAC,CAC/B,CAAC;IACF,OAAO;QACL,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,iBAAiB,EAAE,OAAO,CAAC;QAC7C,QAAQ,EAAE,MAAM,CAAC,MAAM,GAAG,CAAC;KAC5B,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { type ClassLine, type Outline, type Span, type TextRun } from "./domain/tex-document.ts";
|
|
2
|
+
import type { LatexReader } from "./ports/latex.ts";
|
|
3
|
+
import { type Preset } from "./presets.ts";
|
|
4
|
+
import type { Finding, VenueRuleDeps } from "./venue-rules.ts";
|
|
5
|
+
/** A finding and where it points; null points at the top of the file. */
|
|
6
|
+
export interface Located extends Finding {
|
|
7
|
+
readonly at: Span | null;
|
|
8
|
+
}
|
|
9
|
+
/** The slice of ESLint's rule context these rules use. `raw` exists on the `.tex` language's. */
|
|
10
|
+
export interface TexRuleContext {
|
|
11
|
+
readonly filename: string;
|
|
12
|
+
readonly sourceCode: {
|
|
13
|
+
readonly text: string;
|
|
14
|
+
readonly raw?: string;
|
|
15
|
+
getLocFromIndex(index: number): Readonly<{
|
|
16
|
+
line: number;
|
|
17
|
+
column: number;
|
|
18
|
+
}>;
|
|
19
|
+
};
|
|
20
|
+
report(d: {
|
|
21
|
+
readonly loc: {
|
|
22
|
+
readonly start: {
|
|
23
|
+
line: number;
|
|
24
|
+
column: number;
|
|
25
|
+
};
|
|
26
|
+
readonly end: {
|
|
27
|
+
line: number;
|
|
28
|
+
column: number;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
readonly messageId: string;
|
|
32
|
+
readonly data?: Readonly<Record<string, string | number>>;
|
|
33
|
+
}): void;
|
|
34
|
+
}
|
|
35
|
+
export interface TexRuleModule {
|
|
36
|
+
readonly meta: {
|
|
37
|
+
readonly type: "problem" | "suggestion";
|
|
38
|
+
readonly docs: {
|
|
39
|
+
readonly description: string;
|
|
40
|
+
readonly url: string;
|
|
41
|
+
};
|
|
42
|
+
readonly schema: readonly object[];
|
|
43
|
+
readonly messages: Readonly<Record<string, string>>;
|
|
44
|
+
};
|
|
45
|
+
create(context: TexRuleContext): {
|
|
46
|
+
root?: () => void;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The paper's class line against the preset's template: a template the reader cannot read is said
|
|
51
|
+
* once; then the class must be there, name a class, be the template's class, and carry every
|
|
52
|
+
* option the template names.
|
|
53
|
+
*/
|
|
54
|
+
export declare function judgeTemplate(line: ClassLine, preset: Preset, latex: Pick<LatexReader, "template">): readonly Located[];
|
|
55
|
+
/** Every section the preset requires, against the paper's outline. */
|
|
56
|
+
export declare function judgeRequiredSections(outline: () => Outline, preset: Preset): readonly Located[];
|
|
57
|
+
/** Another shipped venue: the word for it, and what it is called in a paper's text. */
|
|
58
|
+
export interface OtherVenue {
|
|
59
|
+
readonly label: string;
|
|
60
|
+
readonly aliases: readonly string[];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Each place the rendered text names another venue — one of its aliases as a whole word, case
|
|
64
|
+
* and all — unless that alias is also this paper's venue's own (a shared parent conference).
|
|
65
|
+
*/
|
|
66
|
+
export declare function judgeLeftover(runs: readonly TextRun[], preset: Preset, others: readonly OtherVenue[]): readonly Located[];
|
|
67
|
+
/** Where a rule's page lives: `docs/rules/tex/<name>.md` on the default branch. */
|
|
68
|
+
export declare const ruleDocsUrl: (name: TexVenueRuleName) => string;
|
|
69
|
+
export type TexVenueRuleName = "template" | "required-section" | "venue-leftover";
|
|
70
|
+
/** The level each rule is on at in paperlint's own config, for every `paper.tex`. */
|
|
71
|
+
export declare const TEX_VENUE_RULE_LEVELS: Readonly<Record<`tex/${TexVenueRuleName}`, "error" | "warn">>;
|
|
72
|
+
/**
|
|
73
|
+
* Every shipped venue but the ones on this paper's own chain, each resolved the way a paper
|
|
74
|
+
* extending it would be. A preset that does not resolve is skipped: `pdf/profile` owns that.
|
|
75
|
+
*/
|
|
76
|
+
export declare function otherVenues(preset: Preset, fromFile: string, deps: VenueRuleDeps): readonly OtherVenue[];
|
|
77
|
+
/** What the venue-conformance rules are built with: the preset store, and the LaTeX reader. */
|
|
78
|
+
export interface TexVenueRuleDeps extends VenueRuleDeps {
|
|
79
|
+
readonly latex: LatexReader;
|
|
80
|
+
}
|
|
81
|
+
/** The venue-conformance rules, as rules of the `tex` plugin (beside `tex/future-promise`). */
|
|
82
|
+
export declare function texVenueRules(deps: TexVenueRuleDeps): Readonly<Record<TexVenueRuleName, TexRuleModule>>;
|
|
83
|
+
//# sourceMappingURL=tex-venue-rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tex-venue-rules.d.ts","sourceRoot":"","sources":["../src/tex-venue-rules.ts"],"names":[],"mappings":"AAwBA,OAAO,EAML,KAAK,SAAS,EAGd,KAAK,OAAO,EAEZ,KAAK,IAAI,EACT,KAAK,OAAO,EACb,MAAM,0BAA0B,CAAC;AAClC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAKL,KAAK,MAAM,EACZ,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAE/D,yEAAyE;AACzE,MAAM,WAAW,OAAQ,SAAQ,OAAO;IACtC,QAAQ,CAAC,EAAE,EAAE,IAAI,GAAG,IAAI,CAAC;CAC1B;AAED,iGAAiG;AACjG,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IA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BAAgB,EAAE,aAAa,CAAC,CAAC,CAMnD"}
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* THE VENUE-CONFORMANCE RULES OVER THE SOURCE — `paper.tex` judged against what its venue preset
|
|
3
|
+
* requires of the LaTeX itself, before any build:
|
|
4
|
+
*
|
|
5
|
+
* tex/template error the `\documentclass` is the preset's class, with every option it names
|
|
6
|
+
* tex/required-section error each section the preset requires is there, titled exactly, and
|
|
7
|
+
* where the preset says (`last`: after every section of the body)
|
|
8
|
+
* tex/venue-leftover warn the text a reader sees names ANOTHER shipped venue — its `name`
|
|
9
|
+
* or one of its `aliases` — than the one the paper extends
|
|
10
|
+
*
|
|
11
|
+
* ── WHY THEY LIVE HERE AND NOT IN `eslint-rules/` ────────────────────────────────
|
|
12
|
+
* Like the `pdf/*` venue rules (`venue-rules.ts`), they need the paper's resolved preset —
|
|
13
|
+
* `paperPreset`, the one answer to "which venue is this paper judged against" — and read it through
|
|
14
|
+
* the `Files` port. What they read of the source comes through the `LatexReader` port
|
|
15
|
+
* (`src/ports/latex.ts`, implemented over unified-latex in `src/adapters/latex/`): the parse tree of
|
|
16
|
+
* `sourceCode.raw`, never a search of the text.
|
|
17
|
+
*
|
|
18
|
+
* ── WHO SPEAKS WHEN THERE IS NOTHING TO JUDGE ───────────────────────────────────
|
|
19
|
+
* No `paperlint.json`, no `extends`, or a preset that does not resolve: silent. `pdf/measured` and
|
|
20
|
+
* `pdf/profile` already say so, once. A preset that names no template: silent — there is nothing to
|
|
21
|
+
* compare, and a template-family preset is where it is named.
|
|
22
|
+
*/
|
|
23
|
+
import { basename, dirname, join } from "node:path";
|
|
24
|
+
import { CONFIG_FILE } from "#lib/paper-config";
|
|
25
|
+
import { collapse, documentClassLine, missingOptions, runText, spanIn, } from "./domain/tex-document.js";
|
|
26
|
+
import { paperPreset, resolvePreset, SHIPPED_PREFIX, shippedPresets, } from "./presets.js";
|
|
27
|
+
// ── the judges: what the source says + a resolved preset → findings. Pure. ─────────
|
|
28
|
+
/** A place as a finding points at it: its span, or null — the top of the file — when unplaced. */
|
|
29
|
+
const spanOf = (p) => (p.kind === "at" ? p.span : null);
|
|
30
|
+
/** A class line that names a class, against the template's: the same class, with every option. */
|
|
31
|
+
function judgeClass(line, want, data) {
|
|
32
|
+
const at = spanOf(line.place);
|
|
33
|
+
if (line.cls !== want.cls)
|
|
34
|
+
return [{ messageId: "wrongClass", data: { ...data, got: line.cls }, at }];
|
|
35
|
+
return missingOptions(line, want).map((option) => ({
|
|
36
|
+
messageId: "missingOption",
|
|
37
|
+
data: { ...data, option },
|
|
38
|
+
at,
|
|
39
|
+
}));
|
|
40
|
+
}
|
|
41
|
+
/** The paper's class line against a template that was read: present, naming a class, that class. */
|
|
42
|
+
function judgeClassLine(line, want, data) {
|
|
43
|
+
switch (line.kind) {
|
|
44
|
+
case "missing":
|
|
45
|
+
return [{ messageId: "noClass", data, at: null }];
|
|
46
|
+
case "empty":
|
|
47
|
+
return [{ messageId: "emptyClass", data, at: spanOf(line.place) }];
|
|
48
|
+
case "class":
|
|
49
|
+
return judgeClass(line, want, data);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The paper's class line against the preset's template: a template the reader cannot read is said
|
|
54
|
+
* once; then the class must be there, name a class, be the template's class, and carry every
|
|
55
|
+
* option the template names.
|
|
56
|
+
*/
|
|
57
|
+
export function judgeTemplate(line, preset, latex) {
|
|
58
|
+
const t = preset.template;
|
|
59
|
+
if (t === null)
|
|
60
|
+
return [];
|
|
61
|
+
const want = latex.template(t.text);
|
|
62
|
+
if (want === null) {
|
|
63
|
+
const data = { file: t.file, text: JSON.stringify(t.text) };
|
|
64
|
+
return [{ messageId: "badTemplate", data, at: null }];
|
|
65
|
+
}
|
|
66
|
+
const data = { venue: preset.label, template: documentClassLine(want) };
|
|
67
|
+
return judgeClassLine(line, want, data);
|
|
68
|
+
}
|
|
69
|
+
/** Where a heading starts, or null when the parser gave it no place. */
|
|
70
|
+
const startOf = (p) => p.kind === "at" ? p.span.start : null;
|
|
71
|
+
/** A required section that is absent, reported where the document ends — where it would go. */
|
|
72
|
+
const missingSection = (outline, data) => ({
|
|
73
|
+
messageId: "missing",
|
|
74
|
+
data,
|
|
75
|
+
at: outline.end === null ? null : { start: outline.end, end: outline.end },
|
|
76
|
+
});
|
|
77
|
+
/** The first section of the body that starts after `start` and is not titled `title`. */
|
|
78
|
+
function bodySectionAfter(outline, start, title) {
|
|
79
|
+
const backMatter = outline.backMatter ?? Number.POSITIVE_INFINITY;
|
|
80
|
+
return outline.sections.find((h) => {
|
|
81
|
+
const s = startOf(h.place);
|
|
82
|
+
return s !== null && s > start && s < backMatter && h.title !== title;
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* One required section against the outline: missing (reported where the document ends, where it
|
|
87
|
+
* would go), or — for `last` — standing before a section of the body. The body is every section
|
|
88
|
+
* before the appendix and the bibliography, so the required one may follow the bibliography. A
|
|
89
|
+
* heading without a place cannot be ordered, so it is never reported as out of order.
|
|
90
|
+
*/
|
|
91
|
+
function judgeSection(outline, want, venue) {
|
|
92
|
+
const title = collapse(want.title);
|
|
93
|
+
const last = outline.sections.filter((h) => h.title === title).at(-1);
|
|
94
|
+
const data = { venue, title };
|
|
95
|
+
if (last === undefined)
|
|
96
|
+
return [missingSection(outline, data)];
|
|
97
|
+
const lastStart = startOf(last.place);
|
|
98
|
+
if (want.position !== "last" || lastStart === null)
|
|
99
|
+
return [];
|
|
100
|
+
const after = bodySectionAfter(outline, lastStart, title);
|
|
101
|
+
if (after === undefined)
|
|
102
|
+
return [];
|
|
103
|
+
const notLast = { ...data, after: after.title };
|
|
104
|
+
return [{ messageId: "notLast", data: notLast, at: spanOf(last.place) }];
|
|
105
|
+
}
|
|
106
|
+
/** Every section the preset requires, against the paper's outline. */
|
|
107
|
+
export function judgeRequiredSections(outline, preset) {
|
|
108
|
+
if (preset.requiredSections.length === 0)
|
|
109
|
+
return [];
|
|
110
|
+
const o = outline();
|
|
111
|
+
return preset.requiredSections.flatMap((r) => judgeSection(o, r, preset.label));
|
|
112
|
+
}
|
|
113
|
+
/** `s` as a pattern that matches it literally. */
|
|
114
|
+
const literal = (s) => s.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&");
|
|
115
|
+
/**
|
|
116
|
+
* Each place the rendered text names another venue — one of its aliases as a whole word, case
|
|
117
|
+
* and all — unless that alias is also this paper's venue's own (a shared parent conference).
|
|
118
|
+
*/
|
|
119
|
+
export function judgeLeftover(runs, preset, others) {
|
|
120
|
+
const own = new Set(preset.aliases);
|
|
121
|
+
const names = others.flatMap((o) => o.aliases
|
|
122
|
+
.filter((a) => !own.has(a))
|
|
123
|
+
.map((alias) => ({
|
|
124
|
+
other: o.label,
|
|
125
|
+
re: new RegExp(`(?<![\\p{L}\\p{N}])${literal(alias)}(?![\\p{L}\\p{N}])`, "gu"),
|
|
126
|
+
})));
|
|
127
|
+
return runs.flatMap((run) => names.flatMap(({ other, re }) => [...runText(run).matchAll(re)].map((m) => ({
|
|
128
|
+
messageId: "leftover",
|
|
129
|
+
data: { name: m[0], other, venue: preset.label },
|
|
130
|
+
at: spanIn(run, m.index, m.index + m[0].length),
|
|
131
|
+
}))));
|
|
132
|
+
}
|
|
133
|
+
/** Where a rule's page lives: `docs/rules/tex/<name>.md` on the default branch. */
|
|
134
|
+
export const ruleDocsUrl = (name) => `https://github.com/zernie/paperlint/blob/main/docs/rules/tex/${name}.md`;
|
|
135
|
+
const RULES = {
|
|
136
|
+
template: {
|
|
137
|
+
judge: (r) => judgeTemplate(r.latex.documentClass(r.src), r.preset, r.latex),
|
|
138
|
+
meta: {
|
|
139
|
+
type: "problem",
|
|
140
|
+
docs: {
|
|
141
|
+
description: "the \\documentclass is the venue preset's class, with every option the preset names",
|
|
142
|
+
url: ruleDocsUrl("template"),
|
|
143
|
+
},
|
|
144
|
+
schema: [],
|
|
145
|
+
messages: {
|
|
146
|
+
noClass: "paper.tex has no \\documentclass; {{venue}} requires `{{template}}`",
|
|
147
|
+
emptyClass: "the \\documentclass names no class; {{venue}} requires `{{template}}`",
|
|
148
|
+
badTemplate: '{{file}}: the preset\'s "template" {{text}} is neither a \\documentclass line nor a class name, so the class cannot be checked',
|
|
149
|
+
wrongClass: "the class is `{{got}}`, and {{venue}} requires `{{template}}` — the page size, fonts and layout the venue checks come from the class",
|
|
150
|
+
missingOption: "the class option `{{option}}` is missing: {{venue}} requires `{{template}}`",
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
"required-section": {
|
|
155
|
+
judge: (r) => judgeRequiredSections(() => r.latex.outline(r.src), r.preset),
|
|
156
|
+
meta: {
|
|
157
|
+
type: "problem",
|
|
158
|
+
docs: {
|
|
159
|
+
description: "every section the venue preset requires is there, titled exactly, and where the preset says",
|
|
160
|
+
url: ruleDocsUrl("required-section"),
|
|
161
|
+
},
|
|
162
|
+
schema: [],
|
|
163
|
+
messages: {
|
|
164
|
+
missing: "{{venue}} requires a section titled «{{title}}» and there is none — add `\\section*{{{title}}}` (the title exactly; a bold paragraph does not count)",
|
|
165
|
+
notLast: "«{{title}}» must close the paper at {{venue}}, and the section «{{after}}» comes after it — move it after the last section of the body (after the bibliography is fine)",
|
|
166
|
+
},
|
|
167
|
+
},
|
|
168
|
+
},
|
|
169
|
+
"venue-leftover": {
|
|
170
|
+
judge: (r) => judgeLeftover(r.latex.renderedRuns(r.src), r.preset, r.others()),
|
|
171
|
+
meta: {
|
|
172
|
+
type: "suggestion",
|
|
173
|
+
docs: {
|
|
174
|
+
description: "the text names another shipped venue than the one the paper extends — a leftover from an earlier submission",
|
|
175
|
+
url: ruleDocsUrl("venue-leftover"),
|
|
176
|
+
},
|
|
177
|
+
schema: [],
|
|
178
|
+
messages: {
|
|
179
|
+
leftover: "«{{name}}» names {{other}}, and this paper extends {{venue}} — a leftover from an earlier submission? A reviewer reads it before the abstract. Comments and citation keys are not reported; a sentence that names the other venue on purpose can keep it with a disable directive",
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
},
|
|
183
|
+
};
|
|
184
|
+
/** The level each rule is on at in paperlint's own config, for every `paper.tex`. */
|
|
185
|
+
export const TEX_VENUE_RULE_LEVELS = {
|
|
186
|
+
"tex/template": "error",
|
|
187
|
+
"tex/required-section": "error",
|
|
188
|
+
"tex/venue-leftover": "warn",
|
|
189
|
+
};
|
|
190
|
+
/**
|
|
191
|
+
* Every shipped venue but the ones on this paper's own chain, each resolved the way a paper
|
|
192
|
+
* extending it would be. A preset that does not resolve is skipped: `pdf/profile` owns that.
|
|
193
|
+
*/
|
|
194
|
+
export function otherVenues(preset, fromFile, deps) {
|
|
195
|
+
return shippedPresets(deps.venuesDir).flatMap((name) => {
|
|
196
|
+
const r = resolvePreset(`${SHIPPED_PREFIX}${name}`, fromFile, deps);
|
|
197
|
+
// A preset all of whose files are on this paper's chain is this venue or one it extends.
|
|
198
|
+
return r.ok && !r.value.chain.every((f) => preset.chain.includes(f))
|
|
199
|
+
? [{ label: r.value.label, aliases: r.value.aliases }]
|
|
200
|
+
: [];
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* What a judge reads for the paper whose `paper.tex` is `filename`, or null when the paper has no
|
|
205
|
+
* resolved preset (`pdf/measured` and `pdf/profile` already say so).
|
|
206
|
+
*/
|
|
207
|
+
function readingOf(filename, src, deps) {
|
|
208
|
+
const dir = dirname(filename);
|
|
209
|
+
const p = paperPreset(dir, deps);
|
|
210
|
+
if (p.kind !== "resolved")
|
|
211
|
+
return null;
|
|
212
|
+
const preset = p.preset;
|
|
213
|
+
const others = () => otherVenues(preset, join(dir, CONFIG_FILE), deps);
|
|
214
|
+
return { src, latex: deps.latex, preset, others };
|
|
215
|
+
}
|
|
216
|
+
/** Each finding reported at its span, or at the top of the file when it has none. */
|
|
217
|
+
function reportAll(context, findings) {
|
|
218
|
+
const at = (i) => context.sourceCode.getLocFromIndex(i);
|
|
219
|
+
findings.forEach((f) => {
|
|
220
|
+
context.report({
|
|
221
|
+
loc: { start: at(f.at?.start ?? 0), end: at(f.at?.end ?? 0) },
|
|
222
|
+
messageId: f.messageId,
|
|
223
|
+
data: f.data,
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
function rule(name, deps) {
|
|
228
|
+
const { judge, meta } = RULES[name];
|
|
229
|
+
return {
|
|
230
|
+
meta,
|
|
231
|
+
create(context) {
|
|
232
|
+
// Judged once per paper, on its paper.tex: the paper directory is the file's directory.
|
|
233
|
+
if (basename(context.filename) !== "paper.tex")
|
|
234
|
+
return {};
|
|
235
|
+
return {
|
|
236
|
+
root() {
|
|
237
|
+
const sc = context.sourceCode;
|
|
238
|
+
const reading = readingOf(context.filename, sc.raw ?? sc.text, deps);
|
|
239
|
+
if (reading !== null)
|
|
240
|
+
reportAll(context, judge(reading));
|
|
241
|
+
},
|
|
242
|
+
};
|
|
243
|
+
},
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
/** The venue-conformance rules, as rules of the `tex` plugin (beside `tex/future-promise`). */
|
|
247
|
+
export function texVenueRules(deps) {
|
|
248
|
+
return {
|
|
249
|
+
template: rule("template", deps),
|
|
250
|
+
"required-section": rule("required-section", deps),
|
|
251
|
+
"venue-leftover": rule("venue-leftover", deps),
|
|
252
|
+
};
|
|
253
|
+
}
|
|
254
|
+
//# sourceMappingURL=tex-venue-rules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tex-venue-rules.js","sourceRoot":"","sources":["../src/tex-venue-rules.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EACL,QAAQ,EACR,iBAAiB,EACjB,cAAc,EACd,OAAO,EACP,MAAM,GAQP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,kBAAkB,EAAE,IAAI,CAAC;QAClD,gBAAgB,EAAE,IAAI,CAAC,gBAAgB,EAAE,IAAI,CAAC;KAC/C,CAAC;AACJ,CAAC"}
|
package/dist/types.d.ts
CHANGED
|
@@ -10,10 +10,12 @@ import type { RuleBlock } from "./rules-config.ts";
|
|
|
10
10
|
*/
|
|
11
11
|
export interface PaperlintConfig {
|
|
12
12
|
/** The paper director(ies), relative to the project root. Default `papers`. The field name is
|
|
13
|
-
* `PAPERS_DIR_FIELD` in lib/paper-config.mjs; code reads it through `papersDirOf()` in cli.ts.
|
|
14
|
-
|
|
13
|
+
* `PAPERS_DIR_FIELD` in lib/paper-config.mjs; code reads it through `papersDirOf()` in cli.ts.
|
|
14
|
+
* As written in the file: `toPaths` turns a string or a list of strings into directories, and
|
|
15
|
+
* reads anything else as none. */
|
|
16
|
+
papersDir?: unknown;
|
|
15
17
|
/** Which files a paper directory must carry; `false` turns the check off entirely. */
|
|
16
|
-
structure?: StructureConfig | false;
|
|
18
|
+
structure?: StructureConfig | false | undefined;
|
|
17
19
|
/** ESLint config blocks appended after paperlint's own — PARSED by `parseSettings` in cli.ts. */
|
|
18
20
|
rules?: readonly RuleBlock[];
|
|
19
21
|
/** The default venue preset of every paper that names none (`src/paper-settings.ts`). */
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEnD;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B;;;sCAGkC;IAClC,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,CAAC;CAClB,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,UAAU,CAAC,EAAE,SAAS,CAAC;IACvB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC"}
|
package/dist/venue-rules.d.ts
CHANGED
|
@@ -42,7 +42,7 @@ export type Assessment = {
|
|
|
42
42
|
};
|
|
43
43
|
export interface VenueRuleDeps {
|
|
44
44
|
readonly files: Files;
|
|
45
|
-
/** The package's
|
|
45
|
+
/** The package's presets directory (`presetsDir()`): the shipped presets and their schema. */
|
|
46
46
|
readonly venuesDir: string;
|
|
47
47
|
}
|
|
48
48
|
/** One paper, assessed. Reads through `deps.files` only; never throws on a paper's files. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"venue-rules.d.ts","sourceRoot":"","sources":["../src/venue-rules.ts"],"names":[],"mappings":"AAoCA,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"venue-rules.d.ts","sourceRoot":"","sources":["../src/venue-rules.ts"],"names":[],"mappings":"AAoCA,OAAO,EAKL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAIzD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAK9C,qEAAqE;AACrE,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,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