paperlint 2.1.0 → 3.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.
Files changed (219) hide show
  1. package/CLAUDE.md +6 -1
  2. package/README.md +243 -235
  3. package/action.yml +4 -6
  4. package/dist/adapters/references/index.d.ts +13 -0
  5. package/dist/adapters/references/index.d.ts.map +1 -0
  6. package/dist/adapters/references/index.js +55 -0
  7. package/dist/adapters/references/index.js.map +1 -0
  8. package/dist/adapters/references/reach.io.d.ts +3 -0
  9. package/dist/adapters/references/reach.io.d.ts.map +1 -0
  10. package/dist/adapters/references/reach.io.js +14 -0
  11. package/dist/adapters/references/reach.io.js.map +1 -0
  12. package/dist/build-engine.d.ts.map +1 -1
  13. package/dist/build-engine.js +6 -2
  14. package/dist/build-engine.js.map +1 -1
  15. package/dist/build.d.ts +15 -0
  16. package/dist/build.d.ts.map +1 -1
  17. package/dist/build.js +60 -7
  18. package/dist/build.js.map +1 -1
  19. package/dist/cli.d.ts +94 -30
  20. package/dist/cli.d.ts.map +1 -1
  21. package/dist/cli.js +500 -288
  22. package/dist/cli.js.map +1 -1
  23. package/dist/doctor.d.ts.map +1 -1
  24. package/dist/doctor.js +40 -72
  25. package/dist/doctor.js.map +1 -1
  26. package/dist/engine.d.ts +9 -0
  27. package/dist/engine.d.ts.map +1 -1
  28. package/dist/engine.js +27 -0
  29. package/dist/engine.js.map +1 -1
  30. package/dist/facts-file.d.ts +2 -2
  31. package/dist/facts-file.js +2 -2
  32. package/dist/hooks-settings.d.ts +0 -21
  33. package/dist/hooks-settings.d.ts.map +1 -1
  34. package/dist/hooks-settings.js +17 -135
  35. package/dist/hooks-settings.js.map +1 -1
  36. package/dist/init.d.ts +39 -29
  37. package/dist/init.d.ts.map +1 -1
  38. package/dist/init.js +144 -173
  39. package/dist/init.js.map +1 -1
  40. package/dist/link-skills.d.ts +1 -1
  41. package/dist/link-skills.d.ts.map +1 -1
  42. package/dist/link-skills.js +11 -29
  43. package/dist/link-skills.js.map +1 -1
  44. package/dist/new-paper.d.ts +8 -1
  45. package/dist/new-paper.d.ts.map +1 -1
  46. package/dist/new-paper.js +49 -25
  47. package/dist/new-paper.js.map +1 -1
  48. package/dist/paper-files.d.ts +85 -0
  49. package/dist/paper-files.d.ts.map +1 -0
  50. package/dist/paper-files.js +96 -0
  51. package/dist/paper-files.js.map +1 -0
  52. package/dist/paper-settings.d.ts +13 -41
  53. package/dist/paper-settings.d.ts.map +1 -1
  54. package/dist/paper-settings.js +71 -71
  55. package/dist/paper-settings.js.map +1 -1
  56. package/dist/ports/check-references.d.ts +31 -0
  57. package/dist/ports/check-references.d.ts.map +1 -0
  58. package/dist/ports/check-references.js +7 -0
  59. package/dist/ports/check-references.js.map +1 -0
  60. package/dist/presets.d.ts +1 -1
  61. package/dist/presets.d.ts.map +1 -1
  62. package/dist/presets.js +4 -6
  63. package/dist/presets.js.map +1 -1
  64. package/dist/reference-rules.d.ts +47 -0
  65. package/dist/reference-rules.d.ts.map +1 -0
  66. package/dist/reference-rules.js +156 -0
  67. package/dist/reference-rules.js.map +1 -0
  68. package/dist/references.d.ts +36 -0
  69. package/dist/references.d.ts.map +1 -0
  70. package/dist/references.js +91 -0
  71. package/dist/references.js.map +1 -0
  72. package/dist/rules-config.d.ts +5 -3
  73. package/dist/rules-config.d.ts.map +1 -1
  74. package/dist/rules-config.js +15 -6
  75. package/dist/rules-config.js.map +1 -1
  76. package/dist/structure.js +3 -3
  77. package/dist/structure.js.map +1 -1
  78. package/dist/tex-requirements.js +2 -2
  79. package/dist/tex-requirements.js.map +1 -1
  80. package/dist/toolchain.d.ts +5 -1
  81. package/dist/toolchain.d.ts.map +1 -1
  82. package/dist/toolchain.js +22 -5
  83. package/dist/toolchain.js.map +1 -1
  84. package/dist/types.d.ts +26 -18
  85. package/dist/types.d.ts.map +1 -1
  86. package/dist/venue-rules.d.ts.map +1 -1
  87. package/dist/venue-rules.js +12 -10
  88. package/dist/venue-rules.js.map +1 -1
  89. package/docs/configuration.md +163 -104
  90. package/docs/e2e.md +1 -1
  91. package/docs/install.md +25 -40
  92. package/docs/optional-rules.md +5 -4
  93. package/docs/rules.md +65 -24
  94. package/docs/skills.md +80 -0
  95. package/eslint-rules/bib-reachable-entry.mjs +75 -0
  96. package/eslint-rules/latex-language.mjs +29 -1
  97. package/eslint-rules/paper-stages.harness.mjs +1 -117
  98. package/eslint-rules/paper-stages.mjs +0 -120
  99. package/eslint-rules/paper-stages.mutations.mjs +0 -76
  100. package/eslint-rules/paper-typography.mjs +306 -191
  101. package/eslint-rules/paper-typography.test.mjs +337 -0
  102. package/eslint-rules/papers.harness.mjs +8 -12
  103. package/eslint-rules/papers.mjs +17 -31
  104. package/eslint-rules/pdf-last-page-balance.mjs +4 -7
  105. package/eslint-rules/review-frontmatter.mjs +118 -0
  106. package/eslint-rules/review-frontmatter.schema.json +36 -0
  107. package/eslint-rules/review-frontmatter.test.mjs +118 -0
  108. package/eslint-rules/sibling-frontmatter.mjs +19 -0
  109. package/eslint-rules/sibling-frontmatter.schema.json +14 -0
  110. package/eslint.config.mjs +0 -15
  111. package/fixtures/real-markdown-paper/baseline.json +6 -7
  112. package/fixtures/toolchain-mirror/catalog.txt +1 -0
  113. package/fixtures/toolchain-mirror/install-tl +4 -1
  114. package/fixtures/toolchain-mirror/stub-fmtutil-sys +4 -0
  115. package/fixtures/toolchain-mirror/stub-tlmgr +15 -0
  116. package/hooks/hooks.harness.mjs +39 -98
  117. package/hooks/hooks.mutations.mjs +6 -6
  118. package/hooks/paper-edit-guard.hook.d.mts +2 -3
  119. package/hooks/paper-edit-guard.hook.mjs +31 -42
  120. package/hooks/paper-skills-nudge.hook.mjs +21 -19
  121. package/hooks/paper-status-gates.hook.mjs +21 -19
  122. package/hooks/paper-status-gates.sh +8 -13
  123. package/lib/paper-config.d.mts +15 -25
  124. package/lib/paper-config.harness.mjs +18 -35
  125. package/lib/paper-config.mjs +83 -105
  126. package/lib/paper-config.mutations.mjs +2 -2
  127. package/lib/skill-checks.mjs +1 -1
  128. package/lib/skill-trigger-cases.harness.mjs +9 -8
  129. package/lib/skill-trigger-cases.mjs +7 -15
  130. package/package.json +1 -1
  131. package/scripts/eslint-report-guard.mjs +1 -1
  132. package/scripts/harness-api.frozen.json +0 -3
  133. package/scripts/mutation-batteries.frozen.json +5 -14
  134. package/skills/analyze-sibling-paper/SKILL.md +16 -12
  135. package/skills/analyze-sibling-paper/SKILL.md.spec.ts +15 -11
  136. package/skills/cold-read-diff/SKILL.md +20 -1
  137. package/skills/cold-read-diff/SKILL.md.spec.ts +19 -0
  138. package/skills/grade-paper-writing/SKILL.md +20 -1
  139. package/skills/grade-paper-writing/SKILL.md.spec.ts +19 -0
  140. package/skills/paper-pipeline/scripts/consumer.d.mts +0 -1
  141. package/skills/paper-pipeline/scripts/consumer.harness.mjs +8 -12
  142. package/skills/paper-pipeline/scripts/consumer.mjs +19 -33
  143. package/skills/paper-pipeline/scripts/extract-ref-facts.harness.mjs +6 -4
  144. package/skills/paper-pipeline/scripts/run-mechanical.mjs +2 -11
  145. package/skills/plan-paper-timeline/SKILL.md +2 -2
  146. package/skills/plan-paper-timeline/SKILL.md.spec.ts +1 -1
  147. package/skills/plan-paper-timeline/plan-paper-timeline.effects.harness.mjs +1 -1
  148. package/skills/plan-paper-timeline/plan-paper-timeline.effects.mutations.mjs +2 -2
  149. package/skills/render-paper/check-render.sh +2 -3
  150. package/skills/render-paper/render-paper.harness.mjs +2 -2
  151. package/skills/verify-citations/SKILL.md +10 -1
  152. package/skills/verify-citations/SKILL.md.spec.ts +9 -0
  153. package/skills/verify-citations/scripts/bib-authors.mjs +48 -26
  154. package/src/adapters/references/index.ts +102 -0
  155. package/src/adapters/references/reach.io.ts +12 -0
  156. package/src/build-engine.ts +6 -1
  157. package/src/build.harness.mjs +54 -6
  158. package/src/build.ts +89 -11
  159. package/src/cli.harness.mjs +149 -294
  160. package/src/cli.mutations.mjs +35 -44
  161. package/src/cli.ts +637 -328
  162. package/src/doctor.harness.mjs +41 -84
  163. package/src/doctor.mutations.mjs +9 -9
  164. package/src/doctor.ts +44 -89
  165. package/src/engine.harness.mjs +50 -0
  166. package/src/engine.ts +35 -0
  167. package/src/facts-file.test.ts +0 -7
  168. package/src/facts-file.ts +2 -2
  169. package/src/hooks-settings.harness.mjs +7 -92
  170. package/src/hooks-settings.mutations.mjs +2 -17
  171. package/src/hooks-settings.ts +18 -162
  172. package/src/init.test.ts +206 -0
  173. package/src/init.ts +187 -231
  174. package/src/link-skills.harness.mjs +1 -38
  175. package/src/link-skills.mutations.mjs +9 -5
  176. package/src/link-skills.ts +10 -34
  177. package/src/lint-fix.test.ts +120 -0
  178. package/src/linted-set.test.ts +118 -0
  179. package/src/new-paper.harness.mjs +2 -0
  180. package/src/new-paper.mutations.mjs +0 -14
  181. package/src/new-paper.test.ts +173 -14
  182. package/src/new-paper.ts +82 -30
  183. package/src/paper-files.test.ts +395 -0
  184. package/src/paper-files.ts +200 -0
  185. package/src/paper-settings-commands.test.ts +121 -122
  186. package/src/paper-settings.test.ts +93 -64
  187. package/src/paper-settings.ts +99 -97
  188. package/src/parse-args.test.ts +48 -0
  189. package/src/ports/check-references.ts +28 -0
  190. package/src/presets.ts +5 -15
  191. package/src/reference-rules.ts +229 -0
  192. package/src/references.test.ts +209 -0
  193. package/src/references.ts +138 -0
  194. package/src/rules-config.harness.mjs +24 -8
  195. package/src/rules-config.ts +19 -7
  196. package/src/rules-off.test.ts +111 -0
  197. package/src/structure.harness.mjs +4 -2
  198. package/src/structure.ts +3 -3
  199. package/src/tex-requirements.ts +2 -2
  200. package/src/toolchain.harness.mjs +41 -6
  201. package/src/toolchain.ts +29 -5
  202. package/src/types.ts +36 -18
  203. package/src/venue-rules.test.ts +23 -11
  204. package/src/venue-rules.ts +12 -14
  205. package/templates/paper/paperlint.json +1 -1
  206. package/eslint-rules/doc-fields.harness.mjs +0 -336
  207. package/eslint-rules/doc-fields.mjs +0 -186
  208. package/eslint-rules/doc-fields.mutations.mjs +0 -96
  209. package/eslint-rules/paper-typography.harness.mjs +0 -291
  210. package/eslint-rules/paper-typography.mutations.mjs +0 -131
  211. package/eslint-rules/review-findings-cause.harness.mjs +0 -228
  212. package/eslint-rules/review-findings-cause.mjs +0 -135
  213. package/eslint-rules/review-findings-cause.mutations.mjs +0 -72
  214. package/fixtures/paper-stages/authors-ran/PIPELINE-STATUS.md +0 -16
  215. package/fixtures/paper-stages/marker-in-prose/PIPELINE-STATUS.md +0 -17
  216. package/fixtures/review-findings-cause/clean.md +0 -17
  217. package/fixtures/review-findings-cause/defect.md +0 -14
  218. package/fixtures/review-findings-cause/old-debt.md +0 -14
  219. package/fixtures/review-findings-cause/quiet-in-fence.md +0 -16
package/dist/cli.d.ts CHANGED
@@ -13,10 +13,8 @@
13
13
  * uses: zernie/paperlint@<sha> ← action.yml
14
14
  *
15
15
  * ⚠️ THE BOUNDARY THIS UTILITY HAS NO RIGHT TO ERASE: the consumer's data stays with the consumer.
16
- * The typography debt, the marker of the author-list check run, the field dictionary — all of that
17
- * is about ONE corpus, and wiring it into the package would repeat the defect that put the path
18
- * `.claude/skills/verify-citations/...` into a rule's message. So they live in the consumer's
19
- * `package.json`, under the `paperlint` key.
16
+ * Where the papers are and the project's own rule blocks — that is about ONE corpus, so it lives in
17
+ * the consumer's own `paperlint.json`, at the project root and in each paper.
20
18
  *
21
19
  * 🔴 WHY THE COMMAND IS CALLED `lint` AND NOT `check`. It does exactly what everyone else calls by
22
20
  * that word: reads files, changes nothing, prints findings, exits non-zero. `check` is taken in the
@@ -25,14 +23,14 @@
25
23
  * has no right to occupy that word with a linter. `check` stays as an alias and prints what
26
24
  * replaced it: silently breaking someone else's workflow is worse than asking them to fix a line.
27
25
  */
28
- import { ESLint } from "eslint";
26
+ import { ESLint, type Linter } from "eslint";
29
27
  import { spawnSync } from "node:child_process";
30
28
  import { isMain } from "../skills/paper-pipeline/scripts/consumer.mjs";
31
29
  export { isMain };
32
30
  import type { Args, PaperlintConfig, ConfigRead } from "./types.ts";
33
31
  import { type TexRequirements } from "./tex-requirements.ts";
34
32
  import { init } from "./init.ts";
35
- import { type PaperFormat } from "./new-paper.ts";
33
+ import { type PaperFormat, type VenueSetting } from "./new-paper.ts";
36
34
  import { type Parsed, type RuleBlock } from "./rules-config.ts";
37
35
  export { init };
38
36
  export { nextSteps } from "./init.ts";
@@ -43,6 +41,34 @@ export declare function buildConfig(opts: PaperlintConfig | undefined, texLangua
43
41
  * config rather than listed again. `@eslint/markdown` is a dependency's plugin, not paperlint's.
44
42
  */
45
43
  export declare const SHIPPED_RULES: ReadonlySet<string>;
44
+ /** A plugin as `rulePlugins` gives it: its rules, and for `tex` the LaTeX language when given. */
45
+ export interface RulePlugin {
46
+ readonly rules?: Readonly<Record<string, unknown>>;
47
+ readonly languages?: Readonly<Record<string, unknown>>;
48
+ }
49
+ /**
50
+ * Every plugin paperlint's config registers, ONE object per name, read off that config. In it one
51
+ * name is bound to different objects in different blocks (`paper` beside `PIPELINE-STATUS.md` is
52
+ * not `paper` beside `paper.tex`); here their rules are merged, so a config that lints any paper
53
+ * file knows every rule id. `@eslint/markdown` is a dependency's plugin and is left out. The LaTeX
54
+ * language rides on `tex` when `texLanguage` is given, and that is how a consumer registers it: a
55
+ * second `tex` plugin of its own is refused by ESLint ("Cannot redefine plugin "tex"", measured
56
+ * with and without the language here). Without it, `tex` carries rules only — for a config that
57
+ * lints markdown papers alone.
58
+ */
59
+ export declare function rulePlugins(texLanguage?: unknown): Record<string, RulePlugin>;
60
+ /**
61
+ * A flat-config fragment for a consumer's OWN ESLint run over paper files (#104): every rule
62
+ * paperlint ships, registered and turned off. Without it a `% eslint-disable-next-line
63
+ * paper/leading-zero -- why` — the documented escape hatch — fails that run with "Definition for
64
+ * rule 'paper/leading-zero' was not found". Off, because `paperlint lint` is where they run.
65
+ *
66
+ * The second block is not optional, and it is measured: a directive naming a rule that is off
67
+ * suppresses nothing, so ESLint reports it as an unused directive (a warning by default, an error
68
+ * under `reportUnusedDisableDirectives: "error"`). On the files paperlint lints that report is
69
+ * switched off in THIS run — `paperlint lint` still reports a directive that silences nothing.
70
+ */
71
+ export declare function rulesOff(texLanguage?: unknown): Linter.Config[];
46
72
  /**
47
73
  * Rules paperlint ships and turns on for no file itself — the ones a consumer opts into with `rules`.
48
74
  * Derived: every shipped rule that no block of paperlint's own config names.
@@ -52,48 +78,58 @@ export declare const OPTIONAL_RULES: ReadonlySet<string>;
52
78
  * 🔴 AN OPTIONAL RULE THAT IS ON AND REACHES NO PAPER IS A GREEN ZERO. A `files` glob that matches
53
79
  * nothing — a typo, a path relative to the wrong directory — leaves the rule never invoked, and a
54
80
  * rule that never runs reports exactly like a rule that passed. So for every optional rule the
55
- * consumer turned on, some linted `paper.tex` must actually have it enabled; the ones none has are
81
+ * consumer turned on, some `paper.tex` must actually have it enabled; the ones none has are
56
82
  * returned, for the caller to refuse.
83
+ *
84
+ * `files` is every `paper.tex` the guard may count: the ones this run linted AND every paper of the
85
+ * project. Judged against the run alone, `paperlint lint papers/c` failed on a block written for
86
+ * papers a and b (#103) — a block that reaches a paper outside this run is not dead. A glob that
87
+ * reaches no paper of the project at all still fails, from a subset as from the whole.
57
88
  */
58
- export declare function silentOptionalRules(eslint: ESLint, lintedFiles: readonly string[], opts: PaperlintConfig): Promise<string[]>;
89
+ export declare function silentOptionalRules(eslint: ESLint, files: readonly string[], opts: PaperlintConfig): Promise<string[]>;
59
90
  /**
60
- * Every linted paper's `rules` from its `paperlint.json`, as ESLint blocks scoped to that paper.
61
- * A file that does not parse, or names a rule paperlint does not ship, stops the run with one line
62
- * naming the file — the same strictness as the project's own `rules`. A leftover `venue.json` is
63
- * not read here; `pdf/profile` and `paperlint doctor` name it.
91
+ * Every linted paper's rules, as ESLint blocks scoped to that paper, in two groups: what its venue
92
+ * preset turns on, and what its own `paperlint.json` says. The caller puts the root's blocks between
93
+ * them. A file that does not parse, or names a rule paperlint does not ship, stops the run with one
94
+ * line naming the file — the same strictness as the root's own `rules`.
64
95
  */
65
- export declare function paperRuleBlocks(paths: readonly string[]): Parsed<RuleBlock[]>;
96
+ export declare function paperRuleBlocks(paths: readonly string[]): Parsed<{
97
+ preset: RuleBlock[];
98
+ own: RuleBlock[];
99
+ }>;
66
100
  /**
67
- * The settings after the boundary: an unknown key is refused by name, and `rules` becomes parsed
68
- * config blocks. Nothing after this sees the raw object.
101
+ * The root `paperlint.json` after the boundary: an unknown key is refused by name, the paper
102
+ * defaults (`extends`, `kind`, `pdf`) are checked the way a paper's own are, and `rules` becomes
103
+ * parsed config blocks. Nothing after this sees the raw object.
69
104
  */
70
- export declare function parseSettings(opts: PaperlintConfig, where: string, baseDir: string): Parsed<PaperlintConfig>;
105
+ export declare function parseSettings(json: unknown, where: string, baseDir: string): Parsed<PaperlintConfig>;
71
106
  export declare function parseArgs(argv: readonly string[]): Args;
72
- export declare const PKG_NAME = "package.json";
73
- /**
74
- * 🔴 THE CLI READS `package.json`, THE ONE DECLARATION. `paperlint init` writes the settings under
75
- * the `package.json` key that the three hooks and `eslint-rules` already read; the CLI reads the
76
- * same file, so the install and the check cannot look at different files (issue #33,
77
- * `docs/install.md`).
78
- *
79
- * The walk goes up to the filesystem root, the way eslint, prettier and tsc find theirs, so a run
80
- * from inside one paper sees the same settings as a run from the repository root.
81
- */
82
- export declare function findConfig(startDir: string): string | null;
83
107
  /**
84
108
  * Reading the config, ONE reader for all commands. Pulled out of `run()` the moment a second
85
109
  * command needed the same config (`build`): two copies of this block would have drifted apart on
86
110
  * the very first edit — exactly the class that already cost us the empty-set guard in two places.
87
111
  *
88
- * @returns `{ opts, configPath }` on success, or `{ code }` — and then the caller exits with it.
112
+ * 🔴 THE CONFIG FINDS ITSELF: the project root is the nearest directory up from `cwd` with a root
113
+ * `paperlint.json`, else with a `package.json`, else `cwd` (`findProjectRoot`). The file is
114
+ * optional — without one every setting has its default, and papers are in `papers/`. An explicit
115
+ * `--config` beats the discovered one: it was named out loud, and a substitution is never silent.
116
+ *
117
+ * @returns `{ opts, configPath, root }` on success, or `{ code }` — and then the caller exits with it.
89
118
  */
90
119
  export declare function readConfig(a: Args, { log, err, cwd, }?: {
91
120
  log?: typeof console.log;
92
121
  err?: typeof console.error;
93
122
  cwd?: string;
94
123
  }): ConfigRead;
95
- /** The papers directory field of the settings, read by its one declared name. */
124
+ /** The papers directory field of the settings, read by its one declared name; the default when absent. */
96
125
  export declare function papersDirOf(opts: PaperlintConfig): unknown;
126
+ /** The error for a papers directory that is missing or holds no paper. */
127
+ export declare const noPapersMessage: (dir: string) => string;
128
+ /** The papers directories of a read config, absolute: each relative to the project root. */
129
+ export declare const papersRoots: (cfg: {
130
+ opts: PaperlintConfig;
131
+ root: string;
132
+ }) => string[];
97
133
  /** The papers directory may be one directory or several; both spellings normalise to a list. */
98
134
  export declare function toPaths(papers: unknown): string[];
99
135
  /**
@@ -131,11 +167,39 @@ export declare function runHook(name: string | undefined, { err, run, resolve, }
131
167
  * become two implementations. The lint runs on THAT folder, so the first thing printed after the
132
168
  * file list is its verdict rather than the old "missing PIPELINE-STATUS.md".
133
169
  */
134
- export declare function createPaperAt(papersRoot: string, name: string, format: PaperFormat, { log, err, cwd, }: {
170
+ export declare function createPaperAt(papersRoot: string, name: string, format: PaperFormat, { log, err, cwd, venue, }: {
135
171
  log: typeof console.log;
136
172
  err: typeof console.error;
137
173
  cwd: string;
174
+ /** What `--venue` chose; null writes the template's `paperlint.json` as it is. */
175
+ venue?: VenueChoice | null;
138
176
  }): Promise<number>;
177
+ /** A venue `paperlint new` will write, with what the messages need to say about it. */
178
+ export interface VenueChoice extends VenueSetting {
179
+ /** The preset's word in messages (`agenticdev`, `my-workshop`). */
180
+ readonly label: string;
181
+ /** The preset's kinds; empty when it sets no page limit. */
182
+ readonly kinds: readonly string[];
183
+ }
184
+ /**
185
+ * `--venue` / `--kind` → the `extends` and `kind` to write into `<paperDir>/paperlint.json`, or why
186
+ * not. Parsed here, at the boundary, and resolved through the same `resolvePreset` lint uses — so a
187
+ * venue `new` accepts is a venue lint resolves. On a terminal with no `--venue` it asks, with
188
+ * "none" as the default; without a terminal it chooses nothing (null), as before.
189
+ *
190
+ * A path is relative to where the command runs, because that is where it was typed; it is written
191
+ * relative to the paper's `paperlint.json`, because that is what `extends` is relative to. Written
192
+ * as typed, `./venues/x.jsonc` would name `<paper>/venues/x.jsonc`.
193
+ */
194
+ export declare function chooseVenue(flags: {
195
+ readonly venue: string | null;
196
+ readonly kind: string | null;
197
+ }, { paperDir, cwd, interactive, ask, }: {
198
+ paperDir: string;
199
+ cwd: string;
200
+ interactive: boolean;
201
+ ask: (q: string) => Promise<string>;
202
+ }): Promise<Parsed<VenueChoice | null>>;
139
203
  /**
140
204
  * What `paperlint toolchain` installs: every shipped preset's packages, plus the resolved chain of
141
205
  * every paper under the project's papers directory — a project's own preset lives outside the
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,EAAE,MAAM,EAAe,MAAM,QAAQ,CAAC;AAG7C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAK/C,OAAO,EACL,MAAM,EAEP,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,CAAC;AAClB,OAAO,KAAK,EAAE,IAAI,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAoBpE,OAAO,EAKL,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAuC,MAAM,WAAW,CAAC;AACtE,OAAO,EAML,KAAK,WAAW,EACjB,MAAM,gBAAgB,CAAC;AAYxB,OAAO,EAKL,KAAK,MAAM,EACX,KAAK,SAAS,EACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAE,CAAC;AAChB,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AA4FtC,4GAA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