paperlint 17.2.0 → 18.0.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/deadlines.yml +1 -1
- package/CONTRIBUTING.md +8 -5
- package/README.md +26 -23
- package/dist/adapters/latex/index.d.ts +1 -0
- package/dist/adapters/latex/index.d.ts.map +1 -1
- package/dist/adapters/latex/index.js +3 -0
- package/dist/adapters/latex/index.js.map +1 -1
- package/dist/adapters/latex/parse.d.ts +9 -0
- package/dist/adapters/latex/parse.d.ts.map +1 -1
- package/dist/adapters/latex/parse.js +12 -0
- package/dist/adapters/latex/parse.js.map +1 -1
- package/dist/adapters/latex/venue-lines.d.ts +10 -0
- package/dist/adapters/latex/venue-lines.d.ts.map +1 -0
- package/dist/adapters/latex/venue-lines.js +11 -0
- package/dist/adapters/latex/venue-lines.js.map +1 -0
- package/dist/build.d.ts +1 -1
- package/dist/build.d.ts.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +17 -6
- package/dist/cli.js.map +1 -1
- package/dist/domain/body-pages.d.ts +1 -1
- package/dist/domain/body-pages.js +1 -1
- package/dist/domain/edition.d.ts +35 -0
- package/dist/domain/edition.d.ts.map +1 -0
- package/dist/domain/edition.js +64 -0
- package/dist/domain/edition.js.map +1 -0
- package/dist/edition-rule.d.ts +17 -0
- package/dist/edition-rule.d.ts.map +1 -0
- package/dist/edition-rule.js +90 -0
- package/dist/edition-rule.js.map +1 -0
- package/dist/facts-file.d.ts +1 -1
- package/dist/facts-file.d.ts.map +1 -1
- package/dist/folder-layout-rule.js +1 -1
- package/dist/folder-layout-rule.js.map +1 -1
- package/dist/folder-venue-rule.d.ts +1 -1
- package/dist/folder-venue-rule.d.ts.map +1 -1
- package/dist/folder-venue-rule.js +15 -6
- package/dist/folder-venue-rule.js.map +1 -1
- package/dist/heading-case.js +1 -1
- package/dist/ports/latex.d.ts +6 -1
- package/dist/ports/latex.d.ts.map +1 -1
- package/dist/preset-card-rule.d.ts.map +1 -1
- package/dist/preset-card-rule.js +2 -1
- package/dist/preset-card-rule.js.map +1 -1
- package/dist/presets.d.ts +26 -8
- package/dist/presets.d.ts.map +1 -1
- package/dist/presets.js +86 -19
- package/dist/presets.js.map +1 -1
- package/dist/tex-requirements.d.ts +0 -2
- package/dist/tex-requirements.d.ts.map +1 -1
- package/dist/tex-requirements.js +0 -1
- package/dist/tex-requirements.js.map +1 -1
- package/dist/tex-venue-rules.d.ts +19 -8
- package/dist/tex-venue-rules.d.ts.map +1 -1
- package/dist/tex-venue-rules.js +81 -21
- package/dist/tex-venue-rules.js.map +1 -1
- package/dist/venue-rules.js +1 -1
- package/dist/venue-rules.js.map +1 -1
- package/docs/configuration.md +7 -6
- package/docs/optional-rules.md +2 -2
- package/docs/prior-art/hotcrp-option-types.md +1 -1
- package/docs/rules/anonymity/identity.md +2 -2
- package/docs/rules/cycle/record.md +4 -4
- package/docs/rules/paper/edition-over.md +66 -0
- package/docs/rules/paper/folder-venue-leftover.md +22 -18
- package/docs/rules/pdf/body-size.md +6 -6
- package/docs/rules/talk/profile.md +3 -3
- package/docs/rules/tex/claim-emphasis.md +1 -1
- package/docs/rules/tex/contrast-frames.md +1 -1
- package/docs/rules/tex/heading-case.md +20 -20
- package/docs/rules/tex/negated-sentences.md +1 -1
- package/docs/rules/tex/relation-markers.md +1 -1
- package/docs/rules/tex/venue-leftover.md +82 -44
- package/docs/rules.md +38 -23
- package/docs/submission.md +6 -6
- package/docs/talk.md +2 -2
- package/docs/venues.md +85 -5
- package/fixtures/build-e2e/acmart/expect.json +1 -1
- package/fixtures/build-e2e/acmart/paperlint.json +1 -1
- package/fixtures/build-e2e/aidc/paperlint.json +1 -1
- package/fixtures/build-e2e/anon-ack/paperlint.json +1 -1
- package/fixtures/build-e2e/anon-author/paperlint.json +1 -1
- package/fixtures/build-e2e/anon-bib/paperlint.json +1 -1
- package/fixtures/build-e2e/anon-href/paperlint.json +1 -1
- package/fixtures/build-e2e/anon-macro/paperlint.json +1 -1
- package/fixtures/build-e2e/anon-pdfauthor/paperlint.json +1 -1
- package/fixtures/build-e2e/fallback/expect.json +1 -1
- package/fixtures/build-e2e/fse/PIPELINE-STATUS.md +3 -0
- package/fixtures/build-e2e/fse/expect.json +15 -0
- package/fixtures/build-e2e/fse/paper.tex +42 -0
- package/fixtures/build-e2e/fse/paperlint.json +1 -0
- package/fixtures/build-e2e/fse-over/PIPELINE-STATUS.md +3 -0
- package/fixtures/build-e2e/fse-over/expect.json +16 -0
- package/fixtures/build-e2e/fse-over/paper.tex +41 -0
- package/fixtures/build-e2e/fse-over/paperlint.json +1 -0
- package/fixtures/build-e2e/msr/paperlint.json +1 -1
- package/fixtures/build-e2e/msr-appendix-after/paperlint.json +1 -1
- package/lib/skill-checks.mjs +1 -1
- package/package.json +1 -1
- package/presets/acl-latex.jsonc +35 -0
- package/presets/acl-latex.md +40 -0
- package/presets/acm-acmsmall.jsonc +115 -0
- package/presets/acm-acmsmall.md +62 -0
- package/presets/acm-sigconf.jsonc +1 -1
- package/presets/acm-sigconf.md +1 -1
- package/presets/acsac-2026.jsonc +19 -0
- package/presets/acsac-2026.md +46 -0
- package/presets/{agent.jsonc → agent-2027.jsonc} +14 -7
- package/presets/{agent.md → agent-2027.md} +10 -6
- package/presets/{agenticdev.jsonc → agenticdev-2026.jsonc} +6 -3
- package/presets/{agenticdev.md → agenticdev-2026.md} +5 -5
- package/presets/{agentverify.jsonc → agentverify-2027.jsonc} +10 -2
- package/presets/{agentverify.md → agentverify-2027.md} +9 -3
- package/presets/{aidc.jsonc → aidc-2026.jsonc} +12 -4
- package/presets/{aidc.md → aidc-2026.md} +8 -4
- package/presets/{aisec.jsonc → aisec-2026.jsonc} +7 -4
- package/presets/{aisec.md → aisec-2026.md} +7 -6
- package/presets/{ase.jsonc → ase-2026.jsonc} +9 -9
- package/presets/{ase.md → ase-2026.md} +8 -8
- package/presets/{ccs.jsonc → ccs-2026.jsonc} +4 -4
- package/presets/{ccs.md → ccs-2026.md} +4 -4
- package/presets/emnlp-2026.jsonc +21 -0
- package/presets/emnlp-2026.md +46 -0
- package/presets/fse-2027.jsonc +92 -0
- package/presets/fse-2027.md +143 -0
- package/presets/icse-2027.jsonc +24 -0
- package/presets/icse-2027.md +53 -0
- package/presets/{icse.jsonc → icse-2028.jsonc} +8 -7
- package/presets/{icse.md → icse-2028.md} +9 -8
- package/presets/ieee-conference.jsonc +1 -1
- package/presets/ieee-conference.md +2 -2
- package/presets/{msr.jsonc → msr-2027.jsonc} +4 -5
- package/presets/{msr.md → msr-2027.md} +7 -7
- package/presets/{nlbse.jsonc → nlbse-2027.jsonc} +9 -1
- package/presets/{nlbse.md → nlbse-2027.md} +9 -3
- package/presets/{realm.jsonc → realm-2026.jsonc} +17 -27
- package/presets/{realm.md → realm-2026.md} +11 -4
- package/presets/{sp.jsonc → sp-2027.jsonc} +8 -8
- package/presets/{sp.md → sp-2027.md} +5 -5
- package/presets/tex/agenticdev.tex +1 -1
- package/presets/venue-profile.schema.json +28 -13
- package/scripts/refresh-deadlines/main.test.ts +4 -4
- package/scripts/refresh-deadlines/refresh.test.ts +9 -9
- package/skills/find-venue/SKILL.md +2 -2
- package/skills/find-venue/SKILL.md.spec.ts +1 -1
- package/skills/render-paper/extract-pdf-facts.harness.ts +2 -2
- package/skills/submit-paper/SKILL.md +7 -7
- package/skills/submit-paper/SKILL.md.spec.ts +6 -6
- package/src/adapters/latex/index.ts +3 -0
- package/src/adapters/latex/parse.ts +15 -0
- package/src/adapters/latex/venue-lines.ts +21 -0
- package/src/build.harness.mjs +5 -2
- package/src/build.ts +1 -1
- package/src/cli.test.ts +8 -6
- package/src/cli.ts +23 -6
- package/src/cycle-rules.test.ts +8 -6
- package/src/domain/body-pages.ts +1 -1
- package/src/domain/edition.ts +104 -0
- package/src/domain/submission-fields.test.ts +13 -10
- package/src/domain/venue-name.test.ts +41 -16
- package/src/domain/versions.test.ts +2 -2
- package/src/edition-rule.test.ts +164 -0
- package/src/edition-rule.ts +121 -0
- package/src/facts-file.test.ts +4 -4
- package/src/facts-file.ts +1 -1
- package/src/folder-layout-rule.test.ts +1 -1
- package/src/folder-layout-rule.ts +1 -1
- package/src/folder-venue-rule.test.ts +43 -10
- package/src/folder-venue-rule.ts +16 -7
- package/src/heading-case.test.ts +4 -4
- package/src/heading-case.ts +1 -1
- package/src/linted-set.test.ts +1 -1
- package/src/new-paper.test.ts +38 -25
- package/src/paper-files.test.ts +1 -1
- package/src/paper-settings-commands.test.ts +4 -4
- package/src/paper-settings.test.ts +16 -13
- package/src/ports/latex.ts +6 -0
- package/src/preset-card-rule.test.ts +31 -23
- package/src/preset-card-rule.ts +2 -1
- package/src/presets.test.ts +389 -61
- package/src/presets.ts +124 -31
- package/src/register-bands.test.ts +2 -2
- package/src/rule-cases.test.ts +26 -4
- package/src/submission-show.test.ts +3 -3
- package/src/submission-update.test.ts +1 -1
- package/src/submission.test.ts +1 -1
- package/src/talk-rules.test.ts +1 -1
- package/src/tex-requirements.harness.ts +2 -2
- package/src/tex-requirements.ts +2 -4
- package/src/tex-venue-rules.test.ts +231 -53
- package/src/tex-venue-rules.ts +129 -29
- package/src/venue-rules.test.ts +154 -21
- package/src/venue-rules.ts +1 -1
- package/src/versions-command.test.ts +2 -2
- package/templates/paper/paperlint.json +1 -1
package/src/presets.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* A venue is a preset, the way an ESLint config is a shareable config: a file with the venue's
|
|
5
5
|
* format (page size, columns, fonts, font sizes, page limits per kind), the TeX packages its
|
|
6
6
|
* template needs, and the rules it implies. A preset may build on another with its own `extends`:
|
|
7
|
-
* `agenticdev` extends the family `acm-sigconf`, which holds everything the ACM template decides.
|
|
7
|
+
* `agenticdev-2026` extends the family `acm-sigconf`, which holds everything the ACM template decides.
|
|
8
8
|
*
|
|
9
9
|
* ── TWO SPEC FORMS, AND ONLY TWO ─────────────────────────────────────────────────
|
|
10
10
|
* paperlint:<name> a preset shipped in the package's venues directory
|
|
@@ -31,18 +31,25 @@
|
|
|
31
31
|
* parent the child wins: the conference a workshop is held at, a spec resolved from the
|
|
32
32
|
* file that names it
|
|
33
33
|
*
|
|
34
|
+
* ── ONE PRESET PER EDITION ────────────────────────────────────────────────────────
|
|
35
|
+
* A venue preset is one edition, `paperlint:<series>-<year>` (`src/domain/edition.ts`); a family's id
|
|
36
|
+
* ends in no year. A bare series (`paperlint:icse`) is refused wherever a spec is resolved — an
|
|
37
|
+
* `extends`, a `parent`, `paperlint new --venue` — naming the shipped editions: it is never the
|
|
38
|
+
* latest edition, so no upgrade changes a paper's rules without its settings changing.
|
|
39
|
+
*
|
|
34
40
|
* ── THE PARENT CONFERENCE ─────────────────────────────────────────────────────────
|
|
35
|
-
* A workshop names the
|
|
36
|
-
* is resolved like any spec and must be a venue
|
|
37
|
-
* `parentNames`: names a paper of this venue may use as its own. A parent
|
|
38
|
-
* a venue, or parents that name each other, are
|
|
41
|
+
* A workshop names the edition it is held at (`"parent": "paperlint:ccs-2026"` in aisec-2026.jsonc).
|
|
42
|
+
* The parent is resolved like any spec and must be a venue of the workshop's own year; its names,
|
|
43
|
+
* and its own parent's, are `parentNames`: names a paper of this venue may use as its own. A parent
|
|
44
|
+
* that does not resolve to a venue, a parent of another year, or parents that name each other, are
|
|
45
|
+
* refused naming the file that says it.
|
|
39
46
|
*
|
|
40
47
|
* ── THE ID AND THE LABEL ──────────────────────────────────────────────────────────
|
|
41
48
|
* The facts file and the build plan carry the preset's `id`: the spec's file name without its
|
|
42
49
|
* extension, a stable key consumers match against preset ids. Messages say the `label`: the most
|
|
43
50
|
* derived venue's `name` when the chain has a venue, else the id
|
|
44
|
-
* (`paperlint:agenticdev` → `
|
|
45
|
-
* only: nothing is ever resolved by it.
|
|
51
|
+
* (`paperlint:agenticdev-2026` → `AgenticDev`, `./venues/usenix-sec.jsonc` → `usenix-sec`). Display
|
|
52
|
+
* only: nothing is ever resolved by it. The edition's `year` is the id's, never the name's.
|
|
46
53
|
*/
|
|
47
54
|
import { basename, dirname, extname, join, resolve } from "node:path";
|
|
48
55
|
import {
|
|
@@ -68,6 +75,9 @@ import {
|
|
|
68
75
|
} from "./paper-settings.ts";
|
|
69
76
|
import { CONFIG_FILE } from "#lib/paper-config";
|
|
70
77
|
import { messageOf } from "./domain/text.ts";
|
|
78
|
+
import { hasAtLeast } from "remeda";
|
|
79
|
+
import { editionLabel, editionOf, editionsOf } from "./domain/edition.ts";
|
|
80
|
+
import type { NamedVenue } from "./domain/venue-name.ts";
|
|
71
81
|
import { setMembers } from "./rule-sets.ts";
|
|
72
82
|
import type { RegisterAnchor } from "./domain/register.ts";
|
|
73
83
|
import type { VenueTalk } from "./domain/talk.ts";
|
|
@@ -97,7 +107,7 @@ export interface PresetTemplate {
|
|
|
97
107
|
/** A resolved chain, merged. */
|
|
98
108
|
export interface Preset {
|
|
99
109
|
/**
|
|
100
|
-
* The preset's id: the spec's file name without its extension (`agenticdev`, `usenix-sec`). The
|
|
110
|
+
* The preset's id: the spec's file name without its extension (`agenticdev-2026`, `usenix-sec`). The
|
|
101
111
|
* stable key a machine reads — the facts file and the build plan carry it — whatever `name` says.
|
|
102
112
|
*/
|
|
103
113
|
readonly id: string;
|
|
@@ -115,6 +125,10 @@ export interface Preset {
|
|
|
115
125
|
readonly template: PresetTemplate | null;
|
|
116
126
|
/** Every `name` and `aliases` along the chain: what this venue is called in a paper's text. */
|
|
117
127
|
readonly aliases: readonly string[];
|
|
128
|
+
/** The `aliases` the chain's files declare, without any `name`: what a folder name is matched against beside the edition. */
|
|
129
|
+
readonly declaredAliases: readonly string[];
|
|
130
|
+
/** The edition's year, from the id (`icse-2028` → 2028); null when the id ends in no year. */
|
|
131
|
+
readonly year: number | null;
|
|
118
132
|
/**
|
|
119
133
|
* Every name of the conference this venue is held at (`parent`), and of that one's parent: names a
|
|
120
134
|
* paper of this venue may use as its own. Empty when no file of the chain names a parent.
|
|
@@ -122,11 +136,6 @@ export interface Preset {
|
|
|
122
136
|
readonly parentNames: readonly string[];
|
|
123
137
|
/** Whether the venue reviews double-blind (`anonymity/identity`); false when no file of the chain says. */
|
|
124
138
|
readonly blind: boolean;
|
|
125
|
-
/**
|
|
126
|
-
* When the venue's names count as a mention in a paper's text (`tex/venue-leftover`): `any`
|
|
127
|
-
* whole-word use, or `with-year` beside it; `any` when no file of the chain says.
|
|
128
|
-
*/
|
|
129
|
-
readonly mentions: "any" | "with-year";
|
|
130
139
|
readonly requiredSections: readonly RequiredSection[];
|
|
131
140
|
readonly tex: TexRequirements;
|
|
132
141
|
readonly format: VenueFormat;
|
|
@@ -151,6 +160,12 @@ export interface Preset {
|
|
|
151
160
|
/** Why a spec does not resolve. */
|
|
152
161
|
export type PresetProblem =
|
|
153
162
|
| { readonly kind: "unsupported"; readonly spec: string }
|
|
163
|
+
/** `paperlint:<series>` with no year, where `editions` of that series ship, oldest first. */
|
|
164
|
+
| {
|
|
165
|
+
readonly kind: "bare-series";
|
|
166
|
+
readonly spec: string;
|
|
167
|
+
readonly editions: readonly [string, ...string[]];
|
|
168
|
+
}
|
|
154
169
|
| {
|
|
155
170
|
readonly kind: "not-found";
|
|
156
171
|
readonly spec: string;
|
|
@@ -304,7 +319,7 @@ const namesOf = (i: PresetIdentity): readonly string[] =>
|
|
|
304
319
|
/** What the merge carries from file to file: the preset without what only the whole chain knows. */
|
|
305
320
|
type Merging = Omit<
|
|
306
321
|
Preset,
|
|
307
|
-
"id" | "label" | "chain" | "identity" | "parentNames"
|
|
322
|
+
"id" | "label" | "chain" | "identity" | "parentNames" | "year"
|
|
308
323
|
> & {
|
|
309
324
|
readonly name: string | null;
|
|
310
325
|
readonly parent: ParentLink | null;
|
|
@@ -321,8 +336,8 @@ const NOTHING_MERGED: Merging = {
|
|
|
321
336
|
parent: null,
|
|
322
337
|
template: null,
|
|
323
338
|
aliases: [],
|
|
339
|
+
declaredAliases: [],
|
|
324
340
|
blind: false,
|
|
325
|
-
mentions: "any",
|
|
326
341
|
requiredSections: [],
|
|
327
342
|
tex: NO_REQUIREMENTS,
|
|
328
343
|
format: NO_FORMAT,
|
|
@@ -368,8 +383,8 @@ const mergeOne = (
|
|
|
368
383
|
? acc.template
|
|
369
384
|
: { text: p.template, file, forbids: p.templateForbids },
|
|
370
385
|
aliases: [...new Set([...acc.aliases, ...namesOf(p.identity), ...p.aliases])],
|
|
386
|
+
declaredAliases: [...new Set([...acc.declaredAliases, ...p.aliases])],
|
|
371
387
|
blind: p.blind ?? acc.blind,
|
|
372
|
-
mentions: p.mentions ?? acc.mentions,
|
|
373
388
|
tex: p.tex ? mergeRequirements(acc.tex, p.tex) : acc.tex,
|
|
374
389
|
format: mergeFormat(acc.format, p.format),
|
|
375
390
|
rules: { ...acc.rules, ...p.rules },
|
|
@@ -390,15 +405,27 @@ function merged(
|
|
|
390
405
|
return {
|
|
391
406
|
id: labelOf(spec),
|
|
392
407
|
label: name ?? labelOf(spec),
|
|
408
|
+
year: editionOf(labelOf(spec))?.year ?? null,
|
|
393
409
|
chain: rootFirst.map((x) => x.file),
|
|
394
410
|
identity: leaf.preset.identity,
|
|
395
411
|
...rest,
|
|
396
412
|
};
|
|
397
413
|
}
|
|
398
414
|
|
|
399
|
-
/**
|
|
400
|
-
|
|
401
|
-
|
|
415
|
+
/**
|
|
416
|
+
* A problem as a caller reads it: a missing file lists the shipped presets, and a shipped spec that
|
|
417
|
+
* names a series of shipped editions (`paperlint:icse`) is refused as a bare series.
|
|
418
|
+
*/
|
|
419
|
+
function refusal(p: PresetProblem, venuesDir: string): PresetProblem {
|
|
420
|
+
if (p.kind !== "not-found") return p;
|
|
421
|
+
const shipped = shippedPresets(venuesDir);
|
|
422
|
+
const editions = p.spec.startsWith(SHIPPED_PREFIX)
|
|
423
|
+
? editionsOf(p.spec.slice(SHIPPED_PREFIX.length), shipped)
|
|
424
|
+
: [];
|
|
425
|
+
return hasAtLeast(editions, 1)
|
|
426
|
+
? { kind: "bare-series", spec: p.spec, editions }
|
|
427
|
+
: { ...p, shipped };
|
|
428
|
+
}
|
|
402
429
|
|
|
403
430
|
/**
|
|
404
431
|
* The names `parent` brings, resolved from the file that names it: the parent venue's names and its
|
|
@@ -422,11 +449,27 @@ function parentNamesOf(
|
|
|
422
449
|
? bad(presetProblemText(p, "parent"))
|
|
423
450
|
: bad(`${named} does not resolve: ${presetProblemText(p)}`);
|
|
424
451
|
}
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
);
|
|
429
|
-
|
|
452
|
+
const why = parentProblem(named, parent.file, up.value);
|
|
453
|
+
return why === null
|
|
454
|
+
? ok([...new Set([...up.value.aliases, ...up.value.parentNames])])
|
|
455
|
+
: bad(why);
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Why a resolved parent cannot be the one `file` names, or null: it must be a venue, and an edition
|
|
460
|
+
* of the year `file`'s id carries, when both ids carry one. Pure.
|
|
461
|
+
*/
|
|
462
|
+
function parentProblem(
|
|
463
|
+
named: string,
|
|
464
|
+
file: string,
|
|
465
|
+
up: Pick<Preset, "identity" | "year">,
|
|
466
|
+
): string | null {
|
|
467
|
+
if (up.identity.type !== "venue")
|
|
468
|
+
return `${named} is a ${up.identity.type}, and a workshop's parent is the venue it is held at`;
|
|
469
|
+
const year = editionOf(labelOf(file))?.year ?? null;
|
|
470
|
+
return year === null || up.year === null || up.year === year
|
|
471
|
+
? null
|
|
472
|
+
: `${named} is the ${String(up.year)} edition, and this workshop is of ${String(year)} — a workshop's parent is the edition it is held at, of the same year`;
|
|
430
473
|
}
|
|
431
474
|
|
|
432
475
|
/** `resolvePreset`, inside the venues `below` whose `parent` led here. */
|
|
@@ -488,18 +531,27 @@ export function resolveShipped(deps: PresetDeps): readonly Preset[] {
|
|
|
488
531
|
/** A shipped venue as a name knows it, and the files of its chain: what tells it from a paper's own. */
|
|
489
532
|
export type ShippedVenue = Pick<
|
|
490
533
|
Preset,
|
|
491
|
-
"label" | "aliases" | "
|
|
534
|
+
"id" | "label" | "aliases" | "declaredAliases" | "year" | "chain"
|
|
492
535
|
>;
|
|
493
536
|
|
|
494
537
|
/**
|
|
495
538
|
* A resolved preset as a name knows it: its label, its aliases, its chain. Pure.
|
|
496
539
|
*/
|
|
497
540
|
export const venueOf = ({
|
|
541
|
+
id,
|
|
542
|
+
label,
|
|
543
|
+
aliases,
|
|
544
|
+
declaredAliases,
|
|
545
|
+
year,
|
|
546
|
+
chain,
|
|
547
|
+
}: Preset): ShippedVenue => ({
|
|
548
|
+
id,
|
|
498
549
|
label,
|
|
499
550
|
aliases,
|
|
551
|
+
declaredAliases,
|
|
552
|
+
year,
|
|
500
553
|
chain,
|
|
501
|
-
|
|
502
|
-
}: Preset): ShippedVenue => ({ label, aliases, chain, mentions });
|
|
554
|
+
});
|
|
503
555
|
|
|
504
556
|
/**
|
|
505
557
|
* THE ONE SOURCE OF VENUE NAMES: every shipped venue's label and `aliases` (with each `name` along
|
|
@@ -509,6 +561,22 @@ export const venueOf = ({
|
|
|
509
561
|
export const shippedVenueNames = (deps: PresetDeps): readonly ShippedVenue[] =>
|
|
510
562
|
resolveShipped(deps).map(venueOf);
|
|
511
563
|
|
|
564
|
+
/**
|
|
565
|
+
* A venue as a FOLDER name names it: its edition (`AGENT 2027`, the name and the id's year) and the
|
|
566
|
+
* `aliases` its files declare — never its bare `name`, which may be an ordinary word (`AGENT`) or
|
|
567
|
+
* the series of every edition (`ICSE`). Read by `paper/folder-venue-leftover` and `paperlint new`. Pure.
|
|
568
|
+
*/
|
|
569
|
+
export const folderNamesOf = (
|
|
570
|
+
v: Pick<ShippedVenue, "label" | "year" | "declaredAliases">,
|
|
571
|
+
): NamedVenue => ({
|
|
572
|
+
label: editionLabel(v.label, v.year),
|
|
573
|
+
aliases: v.declaredAliases,
|
|
574
|
+
});
|
|
575
|
+
|
|
576
|
+
/** Every shipped venue as a folder name names it (`folderNamesOf`): what `paperlint new` refuses. */
|
|
577
|
+
export const shippedFolderNames = (deps: PresetDeps): readonly NamedVenue[] =>
|
|
578
|
+
shippedVenueNames(deps).map(folderNamesOf);
|
|
579
|
+
|
|
512
580
|
/** For a rule set named where a venue belongs, where the set goes instead; "" otherwise. Pure. */
|
|
513
581
|
const ruleSetHint = (spec: string): string =>
|
|
514
582
|
setMembers(spec) === null
|
|
@@ -523,11 +591,8 @@ export function presetProblemText(
|
|
|
523
591
|
p: PresetProblem,
|
|
524
592
|
key: "extends" | "parent" = "extends",
|
|
525
593
|
): string {
|
|
594
|
+
if (isSpecProblem(p)) return specProblemText(p, key);
|
|
526
595
|
switch (p.kind) {
|
|
527
|
-
case "unsupported":
|
|
528
|
-
return `"${key}": "${p.spec}" — a preset is \`paperlint:<name>\` (shipped) or a path starting with ./ or ../ (your own); npm presets: not yet supported. Did you mean "${shippedSpec(p.spec)}"?`;
|
|
529
|
-
case "not-found":
|
|
530
|
-
return `"${key}": "${p.spec}" names no preset (${p.file}); shipped presets (${SHIPPED_PREFIX}<name>): ${p.shipped.join(", ")}${ruleSetHint(p.spec)}`;
|
|
531
596
|
case "cycle":
|
|
532
597
|
return `the presets extend each other in a cycle: ${p.chain.join(" → ")}`;
|
|
533
598
|
case "too-deep":
|
|
@@ -543,6 +608,34 @@ export function presetProblemText(
|
|
|
543
608
|
}
|
|
544
609
|
}
|
|
545
610
|
|
|
611
|
+
/** A problem of the spec itself, which names no file: what a line for it says depends on `key`. */
|
|
612
|
+
type SpecProblem = Extract<
|
|
613
|
+
PresetProblem,
|
|
614
|
+
{ readonly kind: "bare-series" | "unsupported" | "not-found" }
|
|
615
|
+
>;
|
|
616
|
+
|
|
617
|
+
const isSpecProblem = (p: PresetProblem): p is SpecProblem =>
|
|
618
|
+
["bare-series", "unsupported", "not-found"].includes(p.kind);
|
|
619
|
+
|
|
620
|
+
/** The line for a spec that names no file: what it should look like, or what ships. Pure. */
|
|
621
|
+
function specProblemText(p: SpecProblem, key: "extends" | "parent"): string {
|
|
622
|
+
if (p.kind === "bare-series") return bareSeriesText(p, key);
|
|
623
|
+
return p.kind === "unsupported"
|
|
624
|
+
? `"${key}": "${p.spec}" — a preset is \`paperlint:<name>\` (shipped) or a path starting with ./ or ../ (your own); npm presets: not yet supported. Did you mean "${shippedSpec(p.spec)}"?`
|
|
625
|
+
: `"${key}": "${p.spec}" names no preset (${p.file}); shipped presets (${SHIPPED_PREFIX}<name>): ${p.shipped.join(", ")}${ruleSetHint(p.spec)}`;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/** The line for a bare series: the editions that ship, the latest offered. Pure. */
|
|
629
|
+
export const bareSeriesText = (
|
|
630
|
+
p: Extract<PresetProblem, { readonly kind: "bare-series" }>,
|
|
631
|
+
key: "extends" | "parent" | "--venue",
|
|
632
|
+
): string => {
|
|
633
|
+
const latest = p.editions.reduce((_, id) => id);
|
|
634
|
+
const said =
|
|
635
|
+
key === "--venue" ? `--venue ${p.spec}` : `"${key}": "${p.spec}"`;
|
|
636
|
+
return `${said} names a series, not an edition: a venue preset is one edition, so a new edition never changes a paper's rules unasked. Shipped editions: ${p.editions.map(shippedSpec).join(", ")} — did you mean ${shippedSpec(latest)}?`;
|
|
637
|
+
};
|
|
638
|
+
|
|
546
639
|
/** The line for a chain whose file extends a preset of a type it may not extend. Pure. */
|
|
547
640
|
const wrongParentText = (
|
|
548
641
|
p: Extract<PresetProblem, { readonly kind: "wrong-parent" }>,
|
|
@@ -48,7 +48,7 @@ const CORPUS = join(ROOT, "fixtures", "accepted-papers");
|
|
|
48
48
|
/** The AIDC preset, resolved as a paper extending it would resolve it. */
|
|
49
49
|
const aidc = (() => {
|
|
50
50
|
const r = resolvePreset(
|
|
51
|
-
"paperlint:aidc",
|
|
51
|
+
"paperlint:aidc-2026",
|
|
52
52
|
join(ROOT, "papers", "p", "paperlint.json"),
|
|
53
53
|
{ files: nodeFiles, venuesDir: presetsDir() },
|
|
54
54
|
);
|
|
@@ -356,7 +356,7 @@ describe("the rules, as ESLint calls them", () => {
|
|
|
356
356
|
file = "paper.tex",
|
|
357
357
|
): string[] => {
|
|
358
358
|
const dir = writeTree(useTempDir("paperlint-register-bands-"), {
|
|
359
|
-
"paperlint.json": JSON.stringify({ extends: "paperlint:aidc" }),
|
|
359
|
+
"paperlint.json": JSON.stringify({ extends: "paperlint:aidc-2026" }),
|
|
360
360
|
});
|
|
361
361
|
const seen: string[] = [];
|
|
362
362
|
const deps = {
|
package/src/rule-cases.test.ts
CHANGED
|
@@ -1158,6 +1158,28 @@ const CASES: Readonly<Record<string, RuleCases>> = {
|
|
|
1158
1158
|
...onBlindConf("papers/blindconf-2026"),
|
|
1159
1159
|
},
|
|
1160
1160
|
},
|
|
1161
|
+
// A paper on AIDC 2026, whose every deadline passed in 2026: the edition is over, and stays over.
|
|
1162
|
+
"paper/edition-over": {
|
|
1163
|
+
reports: {
|
|
1164
|
+
tree: {
|
|
1165
|
+
"papers/drift/PIPELINE-STATUS.md": STATUS,
|
|
1166
|
+
"papers/drift/paper.tex": tex("x"),
|
|
1167
|
+
"papers/drift/paperlint.json": JSON.stringify({
|
|
1168
|
+
extends: "paperlint:aidc-2026",
|
|
1169
|
+
kind: "regular",
|
|
1170
|
+
}),
|
|
1171
|
+
},
|
|
1172
|
+
file: "papers/drift/PIPELINE-STATUS.md",
|
|
1173
|
+
severity: 1,
|
|
1174
|
+
line: 1,
|
|
1175
|
+
},
|
|
1176
|
+
// A venue of one's own whose preset records no deadline: nothing says when it ends.
|
|
1177
|
+
silent: {
|
|
1178
|
+
"papers/drift/PIPELINE-STATUS.md": STATUS,
|
|
1179
|
+
"papers/drift/paper.tex": tex("x"),
|
|
1180
|
+
...onBlindConf("papers/drift"),
|
|
1181
|
+
},
|
|
1182
|
+
},
|
|
1161
1183
|
// A plan beside the paper: the root holds only paperlint's own files and folders.
|
|
1162
1184
|
"paper/allowed-files-only": {
|
|
1163
1185
|
reports: {
|
|
@@ -1311,10 +1333,10 @@ const CASES: Readonly<Record<string, RuleCases>> = {
|
|
|
1311
1333
|
}),
|
|
1312
1334
|
}),
|
|
1313
1335
|
},
|
|
1314
|
-
// EMNLP, a shipped venue
|
|
1336
|
+
// EMNLP 2026, a shipped venue (REALM's conference), named with its year in a BlindConf paper's text.
|
|
1315
1337
|
"tex/venue-leftover": {
|
|
1316
1338
|
reports: {
|
|
1317
|
-
tree: blind("First written for EMNLP."),
|
|
1339
|
+
tree: blind("First written for EMNLP 2026."),
|
|
1318
1340
|
file: TEX_FILE,
|
|
1319
1341
|
severity: 1,
|
|
1320
1342
|
line: 4,
|
|
@@ -1707,7 +1729,7 @@ describe("the writing set: off by default, one line turns it on", () => {
|
|
|
1707
1729
|
|
|
1708
1730
|
describe("the register bands are in the writing set, on AIDC too", () => {
|
|
1709
1731
|
/**
|
|
1710
|
-
* A body against AIDC's real anchors (presets/aidc.jsonc, per 10,000 words): five contrast
|
|
1732
|
+
* A body against AIDC's real anchors (presets/aidc-2026.jsonc, per 10,000 words): five contrast
|
|
1711
1733
|
* frames and six bold claims over about 2,900 words are above their bands (0–10.4, 0–17.8), and
|
|
1712
1734
|
* no relation marker is below 25.4.
|
|
1713
1735
|
*/
|
|
@@ -1722,7 +1744,7 @@ describe("the register bands are in the writing set, on AIDC too", () => {
|
|
|
1722
1744
|
];
|
|
1723
1745
|
const onAidc = (
|
|
1724
1746
|
rules: Record<string, string> | null,
|
|
1725
|
-
preset = "paperlint:aidc",
|
|
1747
|
+
preset = "paperlint:aidc-2026",
|
|
1726
1748
|
) =>
|
|
1727
1749
|
paper(tex(`\\section{Introduction}\n${BODY}\n${STATEMENT}`, IEEE), {
|
|
1728
1750
|
[`${P}/paperlint.json`]: JSON.stringify({
|
|
@@ -25,7 +25,7 @@ import { frozenText } from "../test/frozen-presets.ts";
|
|
|
25
25
|
|
|
26
26
|
/** msr FROZEN (test/frozen-presets.ts): the shipped file's deadlines are the scheduled refresh's output. */
|
|
27
27
|
const frozenMsr = {
|
|
28
|
-
[join(presetsDir(), "msr.jsonc")]: frozenText("msr.jsonc"),
|
|
28
|
+
[join(presetsDir(), "msr-2027.jsonc")]: frozenText("msr-2027.jsonc"),
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
test("show: the portal from the preset, the id from the paper, the token from the site's variable", async () => {
|
|
@@ -143,7 +143,7 @@ test("show prints the current attempt's deadlines in force: the preset's portal
|
|
|
143
143
|
cycles: [
|
|
144
144
|
{
|
|
145
145
|
id: "msr-2027",
|
|
146
|
-
venue: { kind: "preset", extends: "paperlint:msr" },
|
|
146
|
+
venue: { kind: "preset", extends: "paperlint:msr-2027" },
|
|
147
147
|
kind: "technical",
|
|
148
148
|
opened: "2026-10-05",
|
|
149
149
|
submission: { id: 7 },
|
|
@@ -199,7 +199,7 @@ test("show, in the flat form: the deadlines in force are the preset's readings a
|
|
|
199
199
|
...frozenMsr,
|
|
200
200
|
"/w/package.json": "{}",
|
|
201
201
|
[`${PAPER}/paperlint.json`]: JSON.stringify({
|
|
202
|
-
extends: "paperlint:msr",
|
|
202
|
+
extends: "paperlint:msr-2027",
|
|
203
203
|
kind: "technical",
|
|
204
204
|
submission: { id: 7 },
|
|
205
205
|
}),
|
|
@@ -173,7 +173,7 @@ test("update: no PDF to send, or no abstract file, is refused before the portal
|
|
|
173
173
|
|
|
174
174
|
/** A paper of kind `short` (6 body pages) at a venue over AIDC, not blind, built 8 body pages long. */
|
|
175
175
|
const OVER = files({
|
|
176
|
-
venue: { extends: "paperlint:aidc", blind: false },
|
|
176
|
+
venue: { extends: "paperlint:aidc-2026", blind: false },
|
|
177
177
|
paper: { extends: "../../venue.jsonc", kind: "short", submission: { id: 7 } },
|
|
178
178
|
facts: facts({ body: 8 }),
|
|
179
179
|
});
|
package/src/submission.test.ts
CHANGED
|
@@ -218,7 +218,7 @@ test("the shipped aidc preset declares its HotCRP portal", () => {
|
|
|
218
218
|
const fs = memoryFiles({
|
|
219
219
|
"/w/package.json": "{}",
|
|
220
220
|
[`${PAPER}/paperlint.json`]: JSON.stringify({
|
|
221
|
-
extends: "paperlint:aidc",
|
|
221
|
+
extends: "paperlint:aidc-2026",
|
|
222
222
|
submission: { id: 7 },
|
|
223
223
|
}),
|
|
224
224
|
});
|
package/src/talk-rules.test.ts
CHANGED
|
@@ -249,14 +249,14 @@ rmSync(tmp, { recursive: true, force: true });
|
|
|
249
249
|
// ── 5. the parser's tolerances: an optional block left out, and Ajv's optional fields ───
|
|
250
250
|
{
|
|
251
251
|
const bare = R.parsePreset(
|
|
252
|
-
'{ "type": "venue", "name": "X", "url": "https://x.org/", "extends": "paperlint:aisec" }',
|
|
252
|
+
'{ "type": "venue", "name": "X", "url": "https://x.org/", "extends": "paperlint:aisec-2026" }',
|
|
253
253
|
"bare.jsonc",
|
|
254
254
|
VENUES,
|
|
255
255
|
);
|
|
256
256
|
check(
|
|
257
257
|
"a preset that only extends another: no tex block, `rules` an empty object",
|
|
258
258
|
JSON.stringify([bare.extends, bare.tex, bare.rules]) ===
|
|
259
|
-
'["paperlint:aisec",null,{}]',
|
|
259
|
+
'["paperlint:aisec-2026",null,{}]',
|
|
260
260
|
bare,
|
|
261
261
|
);
|
|
262
262
|
// Guards: `packages` is read without a fallback because the schema refuses a tex block
|
package/src/tex-requirements.ts
CHANGED
|
@@ -215,8 +215,6 @@ export interface PresetFile {
|
|
|
215
215
|
readonly aliases: readonly string[];
|
|
216
216
|
/** Whether the venue reviews double-blind; null when the file does not say. */
|
|
217
217
|
readonly blind: boolean | null;
|
|
218
|
-
/** When the venue's names count as a mention in a paper's text; null when the file does not say. */
|
|
219
|
-
readonly mentions: "with-year" | null;
|
|
220
218
|
/** Sections the venue requires; null when the file names none (a child's list replaces its parent's). */
|
|
221
219
|
readonly requiredSections: readonly RequiredSection[] | null;
|
|
222
220
|
/** Null when the file declares no `tex` block (allowed only with `extends`). */
|
|
@@ -290,7 +288,8 @@ interface PresetBodyJson {
|
|
|
290
288
|
readonly template_forbids?: readonly string[];
|
|
291
289
|
readonly aliases?: readonly string[];
|
|
292
290
|
readonly blind?: boolean;
|
|
293
|
-
|
|
291
|
+
/** A workshop: the schema then requires `parent`, and refuses `parent` without it. */
|
|
292
|
+
readonly workshop?: true;
|
|
294
293
|
readonly required_sections?: readonly {
|
|
295
294
|
readonly title: string;
|
|
296
295
|
readonly position?: "last";
|
|
@@ -558,7 +557,6 @@ export function parsePreset(
|
|
|
558
557
|
templateForbids: j.template_forbids ?? [],
|
|
559
558
|
aliases: j.aliases ?? [],
|
|
560
559
|
blind: orNull(j.blind),
|
|
561
|
-
mentions: orNull(j.mentions),
|
|
562
560
|
requiredSections: sectionsOf(j.required_sections),
|
|
563
561
|
tex: texOf(j.tex),
|
|
564
562
|
format: formatOf(j.format),
|