paperlint 2.0.1 → 2.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/CONTRIBUTING.md +21 -0
- package/README.md +56 -14
- package/dist/build-engine.d.ts.map +1 -1
- package/dist/build-engine.js +5 -2
- package/dist/build-engine.js.map +1 -1
- package/dist/build.d.ts +1 -1
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +4 -3
- package/dist/build.js.map +1 -1
- package/dist/cli.d.ts +15 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +138 -24
- package/dist/cli.js.map +1 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +21 -4
- package/dist/doctor.js.map +1 -1
- package/dist/facts-file.d.ts +33 -9
- package/dist/facts-file.d.ts.map +1 -1
- package/dist/facts-file.js +117 -17
- package/dist/facts-file.js.map +1 -1
- package/dist/init.d.ts +11 -0
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +67 -3
- package/dist/init.js.map +1 -1
- package/dist/new-paper.d.ts +2 -2
- package/dist/new-paper.d.ts.map +1 -1
- package/dist/new-paper.js +17 -2
- package/dist/new-paper.js.map +1 -1
- package/dist/paper-settings.d.ts +68 -0
- package/dist/paper-settings.d.ts.map +1 -0
- package/dist/paper-settings.js +144 -0
- package/dist/paper-settings.js.map +1 -0
- package/dist/presets.d.ts +84 -0
- package/dist/presets.d.ts.map +1 -0
- package/dist/presets.js +186 -0
- package/dist/presets.js.map +1 -0
- package/dist/rules-config.d.ts +7 -0
- package/dist/rules-config.d.ts.map +1 -1
- package/dist/rules-config.js +11 -6
- package/dist/rules-config.js.map +1 -1
- package/dist/structure.d.ts.map +1 -1
- package/dist/structure.js +2 -1
- package/dist/structure.js.map +1 -1
- package/dist/tex-requirements.d.ts +63 -7
- package/dist/tex-requirements.d.ts.map +1 -1
- package/dist/tex-requirements.js +91 -24
- package/dist/tex-requirements.js.map +1 -1
- package/dist/venue-rules.d.ts +109 -0
- package/dist/venue-rules.d.ts.map +1 -0
- package/dist/venue-rules.js +387 -0
- package/dist/venue-rules.js.map +1 -0
- package/docs/configuration.md +67 -7
- package/docs/optional-rules.md +25 -24
- package/docs/rules.md +131 -2
- package/eslint-rules/papers.mjs +6 -2
- package/eslint-rules/pdf-last-page-balance.mjs +23 -2
- package/fixtures/build-e2e/acmart/paperlint.json +1 -0
- package/lib/paper-config.d.mts +7 -0
- package/lib/paper-config.mjs +31 -0
- package/package.json +1 -1
- package/skills/find-venue/SKILL.md +5 -1
- package/skills/find-venue/SKILL.md.spec.ts +4 -0
- package/skills/paper-pipeline/PIPELINE-MAP.md +14 -4
- package/skills/paper-pipeline/SKILL.md +4 -3
- package/skills/paper-pipeline/SKILL.md.spec.ts +3 -2
- package/skills/render-paper/extract-pdf-facts.harness.mjs +5 -5
- package/skills/render-paper/extract-pdf-facts.mjs +4 -4
- package/skills/study-accepted-papers/SKILL.md +2 -1
- package/skills/study-accepted-papers/SKILL.md.spec.ts +1 -0
- package/skills/submit-paper/SKILL.md +9 -1
- package/skills/submit-paper/SKILL.md.spec.ts +8 -0
- package/skills/submit-paper/references/venues/acm-sigconf.jsonc +86 -0
- package/skills/submit-paper/references/venues/agenticdev.jsonc +34 -102
- package/skills/submit-paper/references/venues/aisec.jsonc +21 -82
- package/skills/submit-paper/references/venues/realm.jsonc +45 -43
- package/skills/submit-paper/references/venues/tex-base.jsonc +1 -1
- package/skills/submit-paper/references/venues/venue-profile.schema.json +119 -29
- package/src/build-engine.ts +10 -2
- package/src/build.harness.mjs +23 -18
- package/src/build.ts +5 -4
- package/src/cli.harness.mjs +4 -2
- package/src/cli.ts +158 -29
- package/src/doctor.ts +28 -3
- package/src/facts-file.test.ts +54 -7
- package/src/facts-file.ts +145 -24
- package/src/init.ts +81 -3
- package/src/new-paper.harness.mjs +9 -6
- package/src/new-paper.test.ts +145 -0
- package/src/new-paper.ts +22 -2
- package/src/paper-settings-commands.test.ts +311 -0
- package/src/paper-settings.test.ts +220 -0
- package/src/paper-settings.ts +206 -0
- package/src/presets.test.ts +236 -0
- package/src/presets.ts +307 -0
- package/src/rules-config.ts +12 -7
- package/src/structure.harness.mjs +3 -3
- package/src/structure.ts +2 -1
- package/src/tex-requirements.harness.mjs +11 -17
- package/src/tex-requirements.ts +179 -29
- package/src/venue-rules.test.ts +545 -0
- package/src/venue-rules.ts +573 -0
- package/templates/paper/paperlint.json +4 -0
- package/fixtures/build-e2e/acmart/venue.json +0 -1
|
@@ -15,14 +15,63 @@ export interface PaperRequirements {
|
|
|
15
15
|
export declare const BASE_PROFILE = "tex-base.jsonc";
|
|
16
16
|
export declare const SCHEMA_FILE = "venue-profile.schema.json";
|
|
17
17
|
export declare const NO_REQUIREMENTS: TexRequirements;
|
|
18
|
+
/** One kind of paper a venue takes (`short`, `research`, …) and its page limits; null = not limited. */
|
|
19
|
+
export interface KindLimits {
|
|
20
|
+
readonly bodyPagesMax: number | null;
|
|
21
|
+
readonly refPagesMax: number | null;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The format a venue's call for papers sets — what the `pdf/*` venue rules judge a built PDF
|
|
25
|
+
* against. Every field the profile leaves out is null, and a rule that finds null checks nothing:
|
|
26
|
+
* a profile that does not name a number never makes one up.
|
|
27
|
+
*/
|
|
28
|
+
export interface VenueFormat {
|
|
29
|
+
readonly pageWidthIn: number | null;
|
|
30
|
+
readonly pageHeightIn: number | null;
|
|
31
|
+
readonly columns: number | null;
|
|
32
|
+
readonly bodyPt: number | null;
|
|
33
|
+
readonly bodyPtTol: number | null;
|
|
34
|
+
readonly refPtMin: number | null;
|
|
35
|
+
readonly refPtMax: number | null;
|
|
36
|
+
/** The prefix a font name of the body text starts with (`LinLibertine`). */
|
|
37
|
+
readonly fontsText: string | null;
|
|
38
|
+
readonly fontsTitle: string | null;
|
|
39
|
+
readonly kinds: ReadonlyMap<string, KindLimits>;
|
|
40
|
+
}
|
|
41
|
+
/** Every format field a preset left out is null; a merge fills it from the parent. */
|
|
42
|
+
export declare const NO_FORMAT: VenueFormat;
|
|
43
|
+
/**
|
|
44
|
+
* One preset FILE, parsed — before its `extends` chain is resolved (`src/presets.ts` does that).
|
|
45
|
+
* A preset is a venue or a template family: `{ extends?, name?, template?, format?, tex?, rules? }`.
|
|
46
|
+
*/
|
|
47
|
+
export interface PresetFile {
|
|
48
|
+
/** The preset this one builds on: `paperlint:<name>` or a relative path. */
|
|
49
|
+
readonly extends: string | null;
|
|
50
|
+
/** A display name for messages; the file name otherwise. */
|
|
51
|
+
readonly name: string | null;
|
|
52
|
+
readonly template: string | null;
|
|
53
|
+
/** Null when the file declares no `tex` block (allowed only with `extends`). */
|
|
54
|
+
readonly tex: TexRequirements | null;
|
|
55
|
+
readonly format: VenueFormat;
|
|
56
|
+
/** rule id → ESLint entry, checked against the shipped rules where a config is built. */
|
|
57
|
+
readonly rules: Readonly<Record<string, unknown>>;
|
|
58
|
+
}
|
|
18
59
|
/**
|
|
19
|
-
* The text of one
|
|
60
|
+
* The text of one preset file → the typed file, or an Error naming every problem. The ONE parser
|
|
61
|
+
* of a preset: the toolchain reads its `tex`, the venue rules its `format`, the config its `rules`.
|
|
20
62
|
*
|
|
21
63
|
* @param text the file's contents
|
|
22
64
|
* @param file the name to put in messages
|
|
23
65
|
* @param dir the directory holding the schema (the shipped venues directory by default)
|
|
24
66
|
*/
|
|
67
|
+
export declare function parsePreset(text: string, file: string, dir?: string): PresetFile;
|
|
68
|
+
/** The text of one preset → the TeX requirements it declares itself (none without a `tex` block). */
|
|
25
69
|
export declare function parseProfile(text: string, file: string, dir?: string): TexRequirements;
|
|
70
|
+
/**
|
|
71
|
+
* The file a venue's profile lives in, or null when the name cannot be a venue (the base set is a
|
|
72
|
+
* profile file but not a venue). Whether the file exists is the caller's question.
|
|
73
|
+
*/
|
|
74
|
+
export declare function profileFileOf(venue: string): string | null;
|
|
26
75
|
/** The venues that have a profile — every `.jsonc` in the directory except the base set. */
|
|
27
76
|
export declare function venueNames(dir?: string): string[];
|
|
28
77
|
/** The union of two sets of requirements; a package declared by both keeps every proof of both. */
|
|
@@ -30,13 +79,20 @@ export declare function mergeRequirements(a: TexRequirements, b: TexRequirements
|
|
|
30
79
|
/** Every package name, packages and tools together, sorted — what tlmgr is asked for. */
|
|
31
80
|
export declare function packageNames(tex: TexRequirements): string[];
|
|
32
81
|
/**
|
|
33
|
-
* What ONE paper needs: the base set plus its venue's
|
|
34
|
-
*
|
|
35
|
-
* without
|
|
82
|
+
* What ONE paper needs: the base set plus its venue preset's `tex` (the union over the preset's
|
|
83
|
+
* `extends` chain, resolved by `src/presets.ts`). A paper with no preset gets the base set, and the
|
|
84
|
+
* source says so, so an ACM paper built without a preset is visibly running on the base set.
|
|
85
|
+
*/
|
|
86
|
+
export declare function requirementsFor(preset: {
|
|
87
|
+
readonly label: string;
|
|
88
|
+
readonly tex: TexRequirements;
|
|
89
|
+
} | null, dir?: string): PaperRequirements;
|
|
90
|
+
/**
|
|
91
|
+
* Everything any shipped preset declares, plus `extra` — the resolved presets of the project's own
|
|
92
|
+
* papers, which may live outside the package. The set `paperlint toolchain` installs, so one tree
|
|
93
|
+
* builds any paper.
|
|
36
94
|
*/
|
|
37
|
-
export declare function
|
|
38
|
-
/** Everything any profile declares — the set `paperlint toolchain` installs, so one tree builds any paper. */
|
|
39
|
-
export declare function declaredUnion(dir?: string): {
|
|
95
|
+
export declare function declaredUnion(dir?: string, extra?: readonly TexRequirements[]): {
|
|
40
96
|
readonly tex: TexRequirements;
|
|
41
97
|
readonly profiles: number;
|
|
42
98
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tex-requirements.d.ts","sourceRoot":"","sources":["../src/tex-requirements.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tex-requirements.d.ts","sourceRoot":"","sources":["../src/tex-requirements.ts"],"names":[],"mappings":"AA8BA,gEAAgE;AAChE,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAA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AAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,eAAe,CAAA;CAAE,GAAG,IAAI,EACxE,GAAG,GAAE,MAA2B,GAC/B,iBAAiB,CAWnB;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAC3B,GAAG,GAAE,MAA2B,EAChC,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
|
@@ -20,12 +20,13 @@
|
|
|
20
20
|
* allowed to know where this package is installed (rule 10).
|
|
21
21
|
*/
|
|
22
22
|
// eslint-disable-next-line boundaries/dependencies -- legacy I/O, moves behind a port in #76
|
|
23
|
-
import {
|
|
23
|
+
import { readFileSync, readdirSync } from "node:fs";
|
|
24
24
|
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
28
|
import { packageVenuesDir } from "../skills/paper-pipeline/scripts/consumer.mjs";
|
|
29
|
+
import { PAPER_SETTINGS_FILE } from "../lib/paper-config.mjs";
|
|
29
30
|
/** The profile every paper gets, and the only one a paper with an unknown venue gets. */
|
|
30
31
|
export const BASE_PROFILE = "tex-base.jsonc";
|
|
31
32
|
export const SCHEMA_FILE = "venue-profile.schema.json";
|
|
@@ -51,22 +52,85 @@ function validatorFor(dir) {
|
|
|
51
52
|
function violations(file, v) {
|
|
52
53
|
return (v.errors ?? []).map((e) => `${file}: ${e.dataPath || "(top level)"} ${e.message ?? ""}`);
|
|
53
54
|
}
|
|
55
|
+
/** Every format field a preset left out is null; a merge fills it from the parent. */
|
|
56
|
+
export const NO_FORMAT = {
|
|
57
|
+
pageWidthIn: null,
|
|
58
|
+
pageHeightIn: null,
|
|
59
|
+
columns: null,
|
|
60
|
+
bodyPt: null,
|
|
61
|
+
bodyPtTol: null,
|
|
62
|
+
refPtMin: null,
|
|
63
|
+
refPtMax: null,
|
|
64
|
+
fontsText: null,
|
|
65
|
+
fontsTitle: null,
|
|
66
|
+
kinds: new Map(),
|
|
67
|
+
};
|
|
68
|
+
/** An optional field as the typed preset holds it: absent is null. */
|
|
69
|
+
const orNull = (v) => (v === undefined ? null : v);
|
|
70
|
+
function kindsOf(k) {
|
|
71
|
+
return new Map(Object.entries(k ?? {}).map(([name, v]) => [
|
|
72
|
+
name,
|
|
73
|
+
{
|
|
74
|
+
bodyPagesMax: orNull(v.body_pages_max),
|
|
75
|
+
refPagesMax: orNull(v.ref_pages_max),
|
|
76
|
+
},
|
|
77
|
+
]));
|
|
78
|
+
}
|
|
79
|
+
function formatOf(j = {}) {
|
|
80
|
+
return {
|
|
81
|
+
pageWidthIn: orNull(j.page_w_in),
|
|
82
|
+
pageHeightIn: orNull(j.page_h_in),
|
|
83
|
+
columns: orNull(j.columns),
|
|
84
|
+
bodyPt: orNull(j.body_pt),
|
|
85
|
+
bodyPtTol: orNull(j.body_pt_tol),
|
|
86
|
+
refPtMin: orNull(j.ref_pt_min),
|
|
87
|
+
refPtMax: orNull(j.ref_pt_max),
|
|
88
|
+
fontsText: orNull(j.fonts_text),
|
|
89
|
+
fontsTitle: orNull(j.fonts_title),
|
|
90
|
+
kinds: kindsOf(j.kinds),
|
|
91
|
+
};
|
|
92
|
+
}
|
|
54
93
|
/**
|
|
55
|
-
* The text of one
|
|
94
|
+
* The text of one preset file → the typed file, or an Error naming every problem. The ONE parser
|
|
95
|
+
* of a preset: the toolchain reads its `tex`, the venue rules its `format`, the config its `rules`.
|
|
56
96
|
*
|
|
57
97
|
* @param text the file's contents
|
|
58
98
|
* @param file the name to put in messages
|
|
59
99
|
* @param dir the directory holding the schema (the shipped venues directory by default)
|
|
60
100
|
*/
|
|
61
|
-
export function
|
|
101
|
+
export function parsePreset(text, file, dir = packageVenuesDir()) {
|
|
62
102
|
const { config, error } = typescript().parseConfigFileTextToJson(file, text);
|
|
63
103
|
if (error)
|
|
64
104
|
throw new Error(`${file}: not valid JSONC — ${typescript().flattenDiagnosticMessageText(error.messageText, " ")}`);
|
|
65
105
|
const validate = validatorFor(dir);
|
|
66
106
|
if (!validate(config))
|
|
67
107
|
throw new Error(`${file} does not match ${SCHEMA_FILE}:\n ${violations(file, validate).join("\n ")}`);
|
|
68
|
-
const
|
|
69
|
-
return {
|
|
108
|
+
const j = config;
|
|
109
|
+
return {
|
|
110
|
+
extends: orNull(j.extends),
|
|
111
|
+
name: orNull(j.name),
|
|
112
|
+
template: orNull(j.template),
|
|
113
|
+
tex: j.tex
|
|
114
|
+
? { packages: j.tex.packages ?? {}, tools: j.tex.tools ?? {} }
|
|
115
|
+
: null,
|
|
116
|
+
format: formatOf(j.format),
|
|
117
|
+
rules: j.rules ?? {},
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
/** The text of one preset → the TeX requirements it declares itself (none without a `tex` block). */
|
|
121
|
+
export function parseProfile(text, file, dir = packageVenuesDir()) {
|
|
122
|
+
return parsePreset(text, file, dir).tex ?? NO_REQUIREMENTS;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* The file a venue's profile lives in, or null when the name cannot be a venue (the base set is a
|
|
126
|
+
* profile file but not a venue). Whether the file exists is the caller's question.
|
|
127
|
+
*/
|
|
128
|
+
export function profileFileOf(venue) {
|
|
129
|
+
return venue === BASE_PROFILE.slice(0, -PROFILE_EXT.length) ||
|
|
130
|
+
venue.includes("/") ||
|
|
131
|
+
venue.includes("\\")
|
|
132
|
+
? null
|
|
133
|
+
: `${venue}${PROFILE_EXT}`;
|
|
70
134
|
}
|
|
71
135
|
function readProfile(dir, file) {
|
|
72
136
|
return parseProfile(readFileSync(join(dir, file), "utf8"), file, dir);
|
|
@@ -98,30 +162,33 @@ export function packageNames(tex) {
|
|
|
98
162
|
].sort();
|
|
99
163
|
}
|
|
100
164
|
/**
|
|
101
|
-
* What ONE paper needs: the base set plus its venue's
|
|
102
|
-
*
|
|
103
|
-
* without
|
|
165
|
+
* What ONE paper needs: the base set plus its venue preset's `tex` (the union over the preset's
|
|
166
|
+
* `extends` chain, resolved by `src/presets.ts`). A paper with no preset gets the base set, and the
|
|
167
|
+
* source says so, so an ACM paper built without a preset is visibly running on the base set.
|
|
104
168
|
*/
|
|
105
|
-
export function requirementsFor(
|
|
169
|
+
export function requirementsFor(preset, dir = packageVenuesDir()) {
|
|
106
170
|
const base = readProfile(dir, BASE_PROFILE);
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if (venue === BASE_PROFILE.slice(0, -PROFILE_EXT.length) ||
|
|
111
|
-
!existsSync(join(dir, file)))
|
|
112
|
-
return {
|
|
113
|
-
source: `the base set (venue ${venue} has no profile in paperlint)`,
|
|
171
|
+
return preset === null
|
|
172
|
+
? {
|
|
173
|
+
source: `the base set (no venue preset in ${PAPER_SETTINGS_FILE})`,
|
|
114
174
|
tex: base,
|
|
175
|
+
}
|
|
176
|
+
: {
|
|
177
|
+
source: `venue ${preset.label}`,
|
|
178
|
+
tex: mergeRequirements(base, preset.tex),
|
|
115
179
|
};
|
|
116
|
-
return {
|
|
117
|
-
source: `venue ${venue}`,
|
|
118
|
-
tex: mergeRequirements(base, readProfile(dir, file)),
|
|
119
|
-
};
|
|
120
180
|
}
|
|
121
|
-
/**
|
|
122
|
-
|
|
181
|
+
/**
|
|
182
|
+
* Everything any shipped preset declares, plus `extra` — the resolved presets of the project's own
|
|
183
|
+
* papers, which may live outside the package. The set `paperlint toolchain` installs, so one tree
|
|
184
|
+
* builds any paper.
|
|
185
|
+
*/
|
|
186
|
+
export function declaredUnion(dir = packageVenuesDir(), extra = []) {
|
|
123
187
|
const venues = venueNames(dir);
|
|
124
|
-
const
|
|
125
|
-
return {
|
|
188
|
+
const shipped = venues.reduce((acc, v) => mergeRequirements(acc, readProfile(dir, `${v}${PROFILE_EXT}`)), readProfile(dir, BASE_PROFILE));
|
|
189
|
+
return {
|
|
190
|
+
tex: extra.reduce(mergeRequirements, shipped),
|
|
191
|
+
profiles: venues.length + 1,
|
|
192
|
+
};
|
|
126
193
|
}
|
|
127
194
|
//# sourceMappingURL=tex-requirements.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tex-requirements.js","sourceRoot":"","sources":["../src/tex-requirements.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,6FAA6F;AAC7F,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,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAkB9D,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,MAAM,eAAe,GAAoB,EAAE,QAAQ,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AAG5E,IAAI,EAAE,GAAc,IAAI,CAAC;AACzB,4FAA4F;AAC5F,SAAS,UAAU;IACjB,EAAE,KAAK,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,YAAY,CAAO,CAAC;IAC1D,OAAO,EAAE,CAAC;AACZ,CA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C1E,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,109 @@
|
|
|
1
|
+
import { type FontEntry, type ReadFacts } from "./facts-file.ts";
|
|
2
|
+
import type { KindLimits, VenueFormat } from "./tex-requirements.ts";
|
|
3
|
+
import type { FlatGeometry } from "./domain/geometry.ts";
|
|
4
|
+
import type { Files } from "./ports/files.ts";
|
|
5
|
+
/** One finding: the message it prints and the values it fills in. */
|
|
6
|
+
export interface Finding {
|
|
7
|
+
readonly messageId: string;
|
|
8
|
+
readonly data: Readonly<Record<string, string | number>>;
|
|
9
|
+
}
|
|
10
|
+
/** A venue that resolved to a profile: its name, its format, and the kind's limits or why not. */
|
|
11
|
+
export interface Resolved {
|
|
12
|
+
readonly venue: string;
|
|
13
|
+
readonly format: VenueFormat;
|
|
14
|
+
readonly kind: {
|
|
15
|
+
readonly name: string;
|
|
16
|
+
readonly limits: KindLimits;
|
|
17
|
+
} | null;
|
|
18
|
+
/** Why the kind did not resolve — `pdf/profile` reports it — or null. */
|
|
19
|
+
readonly kindProblem: Finding | null;
|
|
20
|
+
}
|
|
21
|
+
/** Everything the rules need to know about one paper, decided once. */
|
|
22
|
+
export type Assessment = {
|
|
23
|
+
readonly kind: "no-venue";
|
|
24
|
+
}
|
|
25
|
+
/** A `paperlint.json` that extends no preset yet — `pdf/measured` names the file to set. */
|
|
26
|
+
| {
|
|
27
|
+
readonly kind: "no-preset";
|
|
28
|
+
readonly file: string;
|
|
29
|
+
} | {
|
|
30
|
+
readonly kind: "unresolved";
|
|
31
|
+
readonly finding: Finding;
|
|
32
|
+
} | {
|
|
33
|
+
readonly kind: "unbuilt";
|
|
34
|
+
readonly venue: Resolved;
|
|
35
|
+
} | {
|
|
36
|
+
readonly kind: "stale";
|
|
37
|
+
readonly finding: Finding;
|
|
38
|
+
} | {
|
|
39
|
+
readonly kind: "ready";
|
|
40
|
+
readonly venue: Resolved;
|
|
41
|
+
readonly facts: ReadFacts;
|
|
42
|
+
};
|
|
43
|
+
export interface VenueRuleDeps {
|
|
44
|
+
readonly files: Files;
|
|
45
|
+
/** The package's venues directory (`packageVenuesDir()`): the shipped presets and their schema. */
|
|
46
|
+
readonly venuesDir: string;
|
|
47
|
+
}
|
|
48
|
+
/** One paper, assessed. Reads through `deps.files` only; never throws on a paper's files. */
|
|
49
|
+
export declare function assessPaper(paperDir: string, deps: VenueRuleDeps): Assessment;
|
|
50
|
+
/** Type 3, not embedded, and each family the venue names missing from every font. */
|
|
51
|
+
export declare function judgeFonts(fonts: readonly FontEntry[], format: VenueFormat, venue: string): Finding[];
|
|
52
|
+
/** Page width and height within `dimTol` inches, and the column count, against the preset. */
|
|
53
|
+
export declare function judgeGeometry(g: FlatGeometry, format: VenueFormat, venue: string, dimTol: number): Finding[];
|
|
54
|
+
/**
|
|
55
|
+
* Body and reference pages against the kind's limits, and the reference font size against the
|
|
56
|
+
* profile's range. The range is about the DECLARED size and banal measures the rendered mode, so
|
|
57
|
+
* it is widened by `body_pt_tol` — the drift the preset itself names — or a correct paper fails.
|
|
58
|
+
*/
|
|
59
|
+
export declare function judgeLimits(g: FlatGeometry, resolved: Resolved): Finding[];
|
|
60
|
+
/** The body font size against `body_pt ± body_pt_tol`. */
|
|
61
|
+
export declare function judgeBodySize(g: FlatGeometry, format: VenueFormat, venue: string): Finding[];
|
|
62
|
+
/** The slice of ESLint's rule context these rules use. */
|
|
63
|
+
export interface VenueRuleContext {
|
|
64
|
+
readonly filename: string;
|
|
65
|
+
/** ESLint's working directory; file names in messages are shown relative to it. */
|
|
66
|
+
readonly cwd?: string;
|
|
67
|
+
readonly sourceCode: {
|
|
68
|
+
readonly text: string;
|
|
69
|
+
};
|
|
70
|
+
readonly options: readonly unknown[];
|
|
71
|
+
report(d: {
|
|
72
|
+
readonly loc: {
|
|
73
|
+
readonly start: {
|
|
74
|
+
line: number;
|
|
75
|
+
column: number;
|
|
76
|
+
};
|
|
77
|
+
readonly end: {
|
|
78
|
+
line: number;
|
|
79
|
+
column: number;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
readonly messageId: string;
|
|
83
|
+
readonly data?: Readonly<Record<string, string | number>>;
|
|
84
|
+
}): void;
|
|
85
|
+
}
|
|
86
|
+
export interface VenueRuleModule {
|
|
87
|
+
readonly meta: {
|
|
88
|
+
readonly type: "problem" | "suggestion";
|
|
89
|
+
readonly docs: {
|
|
90
|
+
readonly description: string;
|
|
91
|
+
};
|
|
92
|
+
readonly schema: readonly object[];
|
|
93
|
+
readonly messages: Readonly<Record<string, string>>;
|
|
94
|
+
};
|
|
95
|
+
create(context: VenueRuleContext): {
|
|
96
|
+
root?: () => void;
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
/** How far, in inches, a measured page dimension may be from the preset's. */
|
|
100
|
+
export declare const DEFAULT_DIM_TOL_IN = 0.05;
|
|
101
|
+
export type VenueRuleName = "fresh" | "profile" | "measured" | "fonts" | "geometry" | "limits" | "body-size";
|
|
102
|
+
/**
|
|
103
|
+
* The level each venue rule is on at in paperlint's own config, for every `paper.tex`. One owner:
|
|
104
|
+
* the config reads it, the docs describe it, a consumer overrides it in `rules`.
|
|
105
|
+
*/
|
|
106
|
+
export declare const VENUE_RULE_LEVELS: Readonly<Record<`pdf/${VenueRuleName}`, "error" | "warn">>;
|
|
107
|
+
/** The venue rules, as the rules of the `pdf` plugin (beside `last-page-balance`). */
|
|
108
|
+
export declare function venueRules(deps: VenueRuleDeps): Record<VenueRuleName, VenueRuleModule>;
|
|
109
|
+
//# sourceMappingURL=venue-rules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"venue-rules.d.ts","sourceRoot":"","sources":["../src/venue-rules.ts"],"names":[],"mappings":"A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