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.
- package/CLAUDE.md +6 -1
- package/README.md +243 -235
- package/action.yml +4 -6
- package/dist/adapters/references/index.d.ts +13 -0
- package/dist/adapters/references/index.d.ts.map +1 -0
- package/dist/adapters/references/index.js +55 -0
- package/dist/adapters/references/index.js.map +1 -0
- package/dist/adapters/references/reach.io.d.ts +3 -0
- package/dist/adapters/references/reach.io.d.ts.map +1 -0
- package/dist/adapters/references/reach.io.js +14 -0
- package/dist/adapters/references/reach.io.js.map +1 -0
- package/dist/build-engine.d.ts.map +1 -1
- package/dist/build-engine.js +6 -2
- package/dist/build-engine.js.map +1 -1
- package/dist/build.d.ts +15 -0
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +60 -7
- package/dist/build.js.map +1 -1
- package/dist/cli.d.ts +94 -30
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +500 -288
- package/dist/cli.js.map +1 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +40 -72
- package/dist/doctor.js.map +1 -1
- package/dist/engine.d.ts +9 -0
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +27 -0
- package/dist/engine.js.map +1 -1
- package/dist/facts-file.d.ts +2 -2
- package/dist/facts-file.js +2 -2
- package/dist/hooks-settings.d.ts +0 -21
- package/dist/hooks-settings.d.ts.map +1 -1
- package/dist/hooks-settings.js +17 -135
- package/dist/hooks-settings.js.map +1 -1
- package/dist/init.d.ts +39 -29
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +144 -173
- package/dist/init.js.map +1 -1
- package/dist/link-skills.d.ts +1 -1
- package/dist/link-skills.d.ts.map +1 -1
- package/dist/link-skills.js +11 -29
- package/dist/link-skills.js.map +1 -1
- package/dist/new-paper.d.ts +8 -1
- package/dist/new-paper.d.ts.map +1 -1
- package/dist/new-paper.js +49 -25
- package/dist/new-paper.js.map +1 -1
- package/dist/paper-files.d.ts +85 -0
- package/dist/paper-files.d.ts.map +1 -0
- package/dist/paper-files.js +96 -0
- package/dist/paper-files.js.map +1 -0
- package/dist/paper-settings.d.ts +13 -41
- package/dist/paper-settings.d.ts.map +1 -1
- package/dist/paper-settings.js +71 -71
- package/dist/paper-settings.js.map +1 -1
- package/dist/ports/check-references.d.ts +31 -0
- package/dist/ports/check-references.d.ts.map +1 -0
- package/dist/ports/check-references.js +7 -0
- package/dist/ports/check-references.js.map +1 -0
- package/dist/presets.d.ts +1 -1
- package/dist/presets.d.ts.map +1 -1
- package/dist/presets.js +4 -6
- package/dist/presets.js.map +1 -1
- package/dist/reference-rules.d.ts +47 -0
- package/dist/reference-rules.d.ts.map +1 -0
- package/dist/reference-rules.js +156 -0
- package/dist/reference-rules.js.map +1 -0
- package/dist/references.d.ts +36 -0
- package/dist/references.d.ts.map +1 -0
- package/dist/references.js +91 -0
- package/dist/references.js.map +1 -0
- package/dist/rules-config.d.ts +5 -3
- package/dist/rules-config.d.ts.map +1 -1
- package/dist/rules-config.js +15 -6
- package/dist/rules-config.js.map +1 -1
- package/dist/structure.js +3 -3
- package/dist/structure.js.map +1 -1
- package/dist/tex-requirements.js +2 -2
- package/dist/tex-requirements.js.map +1 -1
- package/dist/toolchain.d.ts +5 -1
- package/dist/toolchain.d.ts.map +1 -1
- package/dist/toolchain.js +22 -5
- package/dist/toolchain.js.map +1 -1
- package/dist/types.d.ts +26 -18
- package/dist/types.d.ts.map +1 -1
- package/dist/venue-rules.d.ts.map +1 -1
- package/dist/venue-rules.js +12 -10
- package/dist/venue-rules.js.map +1 -1
- package/docs/configuration.md +163 -104
- package/docs/e2e.md +1 -1
- package/docs/install.md +25 -40
- package/docs/optional-rules.md +5 -4
- package/docs/rules.md +65 -24
- package/docs/skills.md +80 -0
- package/eslint-rules/bib-reachable-entry.mjs +75 -0
- package/eslint-rules/latex-language.mjs +29 -1
- package/eslint-rules/paper-stages.harness.mjs +1 -117
- package/eslint-rules/paper-stages.mjs +0 -120
- package/eslint-rules/paper-stages.mutations.mjs +0 -76
- package/eslint-rules/paper-typography.mjs +306 -191
- package/eslint-rules/paper-typography.test.mjs +337 -0
- package/eslint-rules/papers.harness.mjs +8 -12
- package/eslint-rules/papers.mjs +17 -31
- package/eslint-rules/pdf-last-page-balance.mjs +4 -7
- package/eslint-rules/review-frontmatter.mjs +118 -0
- package/eslint-rules/review-frontmatter.schema.json +36 -0
- package/eslint-rules/review-frontmatter.test.mjs +118 -0
- package/eslint-rules/sibling-frontmatter.mjs +19 -0
- package/eslint-rules/sibling-frontmatter.schema.json +14 -0
- package/eslint.config.mjs +0 -15
- package/fixtures/real-markdown-paper/baseline.json +6 -7
- package/fixtures/toolchain-mirror/catalog.txt +1 -0
- package/fixtures/toolchain-mirror/install-tl +4 -1
- package/fixtures/toolchain-mirror/stub-fmtutil-sys +4 -0
- package/fixtures/toolchain-mirror/stub-tlmgr +15 -0
- package/hooks/hooks.harness.mjs +39 -98
- package/hooks/hooks.mutations.mjs +6 -6
- package/hooks/paper-edit-guard.hook.d.mts +2 -3
- package/hooks/paper-edit-guard.hook.mjs +31 -42
- package/hooks/paper-skills-nudge.hook.mjs +21 -19
- package/hooks/paper-status-gates.hook.mjs +21 -19
- package/hooks/paper-status-gates.sh +8 -13
- package/lib/paper-config.d.mts +15 -25
- package/lib/paper-config.harness.mjs +18 -35
- package/lib/paper-config.mjs +83 -105
- package/lib/paper-config.mutations.mjs +2 -2
- package/lib/skill-checks.mjs +1 -1
- package/lib/skill-trigger-cases.harness.mjs +9 -8
- package/lib/skill-trigger-cases.mjs +7 -15
- package/package.json +1 -1
- package/scripts/eslint-report-guard.mjs +1 -1
- package/scripts/harness-api.frozen.json +0 -3
- package/scripts/mutation-batteries.frozen.json +5 -14
- package/skills/analyze-sibling-paper/SKILL.md +16 -12
- package/skills/analyze-sibling-paper/SKILL.md.spec.ts +15 -11
- package/skills/cold-read-diff/SKILL.md +20 -1
- package/skills/cold-read-diff/SKILL.md.spec.ts +19 -0
- package/skills/grade-paper-writing/SKILL.md +20 -1
- package/skills/grade-paper-writing/SKILL.md.spec.ts +19 -0
- package/skills/paper-pipeline/scripts/consumer.d.mts +0 -1
- package/skills/paper-pipeline/scripts/consumer.harness.mjs +8 -12
- package/skills/paper-pipeline/scripts/consumer.mjs +19 -33
- package/skills/paper-pipeline/scripts/extract-ref-facts.harness.mjs +6 -4
- package/skills/paper-pipeline/scripts/run-mechanical.mjs +2 -11
- package/skills/plan-paper-timeline/SKILL.md +2 -2
- package/skills/plan-paper-timeline/SKILL.md.spec.ts +1 -1
- package/skills/plan-paper-timeline/plan-paper-timeline.effects.harness.mjs +1 -1
- package/skills/plan-paper-timeline/plan-paper-timeline.effects.mutations.mjs +2 -2
- package/skills/render-paper/check-render.sh +2 -3
- package/skills/render-paper/render-paper.harness.mjs +2 -2
- package/skills/verify-citations/SKILL.md +10 -1
- package/skills/verify-citations/SKILL.md.spec.ts +9 -0
- package/skills/verify-citations/scripts/bib-authors.mjs +48 -26
- package/src/adapters/references/index.ts +102 -0
- package/src/adapters/references/reach.io.ts +12 -0
- package/src/build-engine.ts +6 -1
- package/src/build.harness.mjs +54 -6
- package/src/build.ts +89 -11
- package/src/cli.harness.mjs +149 -294
- package/src/cli.mutations.mjs +35 -44
- package/src/cli.ts +637 -328
- package/src/doctor.harness.mjs +41 -84
- package/src/doctor.mutations.mjs +9 -9
- package/src/doctor.ts +44 -89
- package/src/engine.harness.mjs +50 -0
- package/src/engine.ts +35 -0
- package/src/facts-file.test.ts +0 -7
- package/src/facts-file.ts +2 -2
- package/src/hooks-settings.harness.mjs +7 -92
- package/src/hooks-settings.mutations.mjs +2 -17
- package/src/hooks-settings.ts +18 -162
- package/src/init.test.ts +206 -0
- package/src/init.ts +187 -231
- package/src/link-skills.harness.mjs +1 -38
- package/src/link-skills.mutations.mjs +9 -5
- package/src/link-skills.ts +10 -34
- package/src/lint-fix.test.ts +120 -0
- package/src/linted-set.test.ts +118 -0
- package/src/new-paper.harness.mjs +2 -0
- package/src/new-paper.mutations.mjs +0 -14
- package/src/new-paper.test.ts +173 -14
- package/src/new-paper.ts +82 -30
- package/src/paper-files.test.ts +395 -0
- package/src/paper-files.ts +200 -0
- package/src/paper-settings-commands.test.ts +121 -122
- package/src/paper-settings.test.ts +93 -64
- package/src/paper-settings.ts +99 -97
- package/src/parse-args.test.ts +48 -0
- package/src/ports/check-references.ts +28 -0
- package/src/presets.ts +5 -15
- package/src/reference-rules.ts +229 -0
- package/src/references.test.ts +209 -0
- package/src/references.ts +138 -0
- package/src/rules-config.harness.mjs +24 -8
- package/src/rules-config.ts +19 -7
- package/src/rules-off.test.ts +111 -0
- package/src/structure.harness.mjs +4 -2
- package/src/structure.ts +3 -3
- package/src/tex-requirements.ts +2 -2
- package/src/toolchain.harness.mjs +41 -6
- package/src/toolchain.ts +29 -5
- package/src/types.ts +36 -18
- package/src/venue-rules.test.ts +23 -11
- package/src/venue-rules.ts +12 -14
- package/templates/paper/paperlint.json +1 -1
- package/eslint-rules/doc-fields.harness.mjs +0 -336
- package/eslint-rules/doc-fields.mjs +0 -186
- package/eslint-rules/doc-fields.mutations.mjs +0 -96
- package/eslint-rules/paper-typography.harness.mjs +0 -291
- package/eslint-rules/paper-typography.mutations.mjs +0 -131
- package/eslint-rules/review-findings-cause.harness.mjs +0 -228
- package/eslint-rules/review-findings-cause.mjs +0 -135
- package/eslint-rules/review-findings-cause.mutations.mjs +0 -72
- package/fixtures/paper-stages/authors-ran/PIPELINE-STATUS.md +0 -16
- package/fixtures/paper-stages/marker-in-prose/PIPELINE-STATUS.md +0 -17
- package/fixtures/review-findings-cause/clean.md +0 -17
- package/fixtures/review-findings-cause/defect.md +0 -14
- package/fixtures/review-findings-cause/old-debt.md +0 -14
- 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
|
-
*
|
|
17
|
-
*
|
|
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
|
|
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,
|
|
89
|
+
export declare function silentOptionalRules(eslint: ESLint, files: readonly string[], opts: PaperlintConfig): Promise<string[]>;
|
|
59
90
|
/**
|
|
60
|
-
* Every linted paper's
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
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<
|
|
96
|
+
export declare function paperRuleBlocks(paths: readonly string[]): Parsed<{
|
|
97
|
+
preset: RuleBlock[];
|
|
98
|
+
own: RuleBlock[];
|
|
99
|
+
}>;
|
|
66
100
|
/**
|
|
67
|
-
* The
|
|
68
|
-
*
|
|
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(
|
|
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
|
-
*
|
|
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
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAG7C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAK/C,OAAO,EACL,MAAM,EAEP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