paperlint 18.0.0 → 18.2.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 (130) hide show
  1. package/README.md +3 -3
  2. package/dist/adapters/hotcrp/index.d.ts +11 -1
  3. package/dist/adapters/hotcrp/index.d.ts.map +1 -1
  4. package/dist/adapters/hotcrp/index.js +11 -1
  5. package/dist/adapters/hotcrp/index.js.map +1 -1
  6. package/dist/adapters/hotcrp/site.d.ts.map +1 -1
  7. package/dist/adapters/hotcrp/site.js +3 -1
  8. package/dist/adapters/hotcrp/site.js.map +1 -1
  9. package/dist/adapters/hotcrp/token.d.ts +11 -0
  10. package/dist/adapters/hotcrp/token.d.ts.map +1 -1
  11. package/dist/adapters/hotcrp/token.js +34 -7
  12. package/dist/adapters/hotcrp/token.js.map +1 -1
  13. package/dist/adapters/latex/document-class.d.ts +28 -5
  14. package/dist/adapters/latex/document-class.d.ts.map +1 -1
  15. package/dist/adapters/latex/document-class.js +208 -21
  16. package/dist/adapters/latex/document-class.js.map +1 -1
  17. package/dist/adapters/latex/index.d.ts +4 -4
  18. package/dist/adapters/latex/index.d.ts.map +1 -1
  19. package/dist/adapters/latex/index.js +5 -2
  20. package/dist/adapters/latex/index.js.map +1 -1
  21. package/dist/adapters/latex/parse.d.ts.map +1 -1
  22. package/dist/adapters/latex/parse.js +5 -0
  23. package/dist/adapters/latex/parse.js.map +1 -1
  24. package/dist/cli.d.ts.map +1 -1
  25. package/dist/cli.js +4 -3
  26. package/dist/cli.js.map +1 -1
  27. package/dist/domain/body-pages.d.ts.map +1 -1
  28. package/dist/domain/body-pages.js +4 -2
  29. package/dist/domain/body-pages.js.map +1 -1
  30. package/dist/domain/portal-token.d.ts +26 -10
  31. package/dist/domain/portal-token.d.ts.map +1 -1
  32. package/dist/domain/portal-token.js +19 -12
  33. package/dist/domain/portal-token.js.map +1 -1
  34. package/dist/domain/tex-document.d.ts +52 -4
  35. package/dist/domain/tex-document.d.ts.map +1 -1
  36. package/dist/domain/tex-document.js +9 -0
  37. package/dist/domain/tex-document.js.map +1 -1
  38. package/dist/eslint-rules/latex-language.d.ts +10 -0
  39. package/dist/eslint-rules/latex-language.d.ts.map +1 -1
  40. package/dist/eslint-rules/latex-language.js +41 -2
  41. package/dist/eslint-rules/latex-language.js.map +1 -1
  42. package/dist/ports/latex.d.ts +13 -1
  43. package/dist/ports/latex.d.ts.map +1 -1
  44. package/dist/ports/submission-portal.d.ts +7 -0
  45. package/dist/ports/submission-portal.d.ts.map +1 -1
  46. package/dist/presets.d.ts +15 -0
  47. package/dist/presets.d.ts.map +1 -1
  48. package/dist/presets.js +9 -0
  49. package/dist/presets.js.map +1 -1
  50. package/dist/submission.d.ts +3 -2
  51. package/dist/submission.d.ts.map +1 -1
  52. package/dist/submission.js +24 -12
  53. package/dist/submission.js.map +1 -1
  54. package/dist/tex-requirements.d.ts +2 -0
  55. package/dist/tex-requirements.d.ts.map +1 -1
  56. package/dist/tex-requirements.js +7 -2
  57. package/dist/tex-requirements.js.map +1 -1
  58. package/dist/tex-venue-rules.d.ts +36 -3
  59. package/dist/tex-venue-rules.d.ts.map +1 -1
  60. package/dist/tex-venue-rules.js +181 -33
  61. package/dist/tex-venue-rules.js.map +1 -1
  62. package/docs/rules/cycle/port-done.md +3 -0
  63. package/docs/rules/tex/template.md +96 -1
  64. package/docs/rules.md +18 -13
  65. package/docs/submission.md +26 -9
  66. package/docs/venues.md +51 -12
  67. package/eslint-rules/latex-language.test.mjs +64 -1
  68. package/eslint-rules/latex-language.ts +44 -2
  69. package/eslint.config.mjs +1 -0
  70. package/fixtures/build-e2e/neurips/PIPELINE-STATUS.md +3 -0
  71. package/fixtures/build-e2e/neurips/expect.json +20 -0
  72. package/fixtures/build-e2e/neurips/paper.tex +60 -0
  73. package/fixtures/build-e2e/neurips/paperlint.json +1 -0
  74. package/fixtures/build-e2e/neurips-nostyle/PIPELINE-STATUS.md +3 -0
  75. package/fixtures/build-e2e/neurips-nostyle/expect.json +26 -0
  76. package/fixtures/build-e2e/neurips-nostyle/paper.tex +56 -0
  77. package/fixtures/build-e2e/neurips-nostyle/paperlint.json +1 -0
  78. package/fixtures/build-e2e/neurips-over/PIPELINE-STATUS.md +3 -0
  79. package/fixtures/build-e2e/neurips-over/expect.json +24 -0
  80. package/fixtures/build-e2e/neurips-over/paper.tex +56 -0
  81. package/fixtures/build-e2e/neurips-over/paperlint.json +1 -0
  82. package/fixtures/real-papers.test.ts +17 -6
  83. package/package.json +3 -1
  84. package/presets/aaai-2027.jsonc +126 -0
  85. package/presets/aaai-2027.md +127 -0
  86. package/presets/aaai-press.jsonc +167 -0
  87. package/presets/aaai-press.md +126 -0
  88. package/presets/icml-2027.jsonc +111 -0
  89. package/presets/icml-2027.md +130 -0
  90. package/presets/icml-style.jsonc +125 -0
  91. package/presets/icml-style.md +77 -0
  92. package/presets/neurips-2026.jsonc +123 -0
  93. package/presets/neurips-2026.md +137 -0
  94. package/presets/neurips-style.jsonc +113 -0
  95. package/presets/neurips-style.md +85 -0
  96. package/presets/venue-profile.schema.json +6 -0
  97. package/skills/build-label-page/scripts/label-page-browser.test.ts +275 -114
  98. package/src/adapters/hotcrp/cassette/README.md +1 -1
  99. package/src/adapters/hotcrp/index.ts +12 -0
  100. package/src/adapters/hotcrp/site.ts +4 -0
  101. package/src/adapters/hotcrp/token.test.ts +39 -1
  102. package/src/adapters/hotcrp/token.ts +40 -7
  103. package/src/adapters/latex/document-class.ts +292 -20
  104. package/src/adapters/latex/index.test.ts +263 -0
  105. package/src/adapters/latex/index.ts +12 -3
  106. package/src/adapters/latex/parse.ts +5 -0
  107. package/src/cli.test.ts +6 -1
  108. package/src/cli.ts +4 -3
  109. package/src/domain/body-pages.test.ts +22 -6
  110. package/src/domain/body-pages.ts +4 -2
  111. package/src/domain/portal-token.test.ts +121 -2
  112. package/src/domain/portal-token.ts +39 -15
  113. package/src/domain/tex-document.ts +64 -5
  114. package/src/folder-venue-rule.test.ts +51 -0
  115. package/src/new-paper.test.ts +2 -2
  116. package/src/paper-settings-commands.test.ts +1 -1
  117. package/src/ports/latex.ts +14 -0
  118. package/src/ports/submission-portal.ts +7 -0
  119. package/src/preset-card-rule.test.ts +44 -27
  120. package/src/presets.test.ts +177 -1
  121. package/src/presets.ts +27 -0
  122. package/src/rule-cases.test.ts +52 -0
  123. package/src/submission-show.test.ts +1 -1
  124. package/src/submission.test.ts +98 -7
  125. package/src/submission.ts +28 -11
  126. package/src/tex-requirements.harness.ts +17 -3
  127. package/src/tex-requirements.ts +13 -2
  128. package/src/tex-venue-rules.test.ts +1020 -0
  129. package/src/tex-venue-rules.ts +248 -38
  130. package/src/venue-rules.test.ts +369 -2
@@ -24,18 +24,56 @@ export interface DocumentClass {
24
24
  readonly options: readonly string[];
25
25
  }
26
26
 
27
- /** One `\documentclass` line: one that names no class, or a class with its options. */
27
+ /**
28
+ * Options given to a class before its line, by `\PassOptionsToClass{options}{class}`: in effect as
29
+ * if the line carried them. Each option as written; `unread` holds the ones built by a macro.
30
+ */
31
+ export interface PassedOptions {
32
+ readonly options: readonly string[];
33
+ readonly unread: readonly string[];
34
+ readonly place: Place;
35
+ }
36
+
37
+ /**
38
+ * One `\documentclass` line: one that names no class; one whose class is built by a macro
39
+ * (`\documentclass{\cls}`), which no macro is expanded to read; or a class with each option as
40
+ * written. Of those options, `unread` holds the ones built by a macro (`[\opts]`): what they carry
41
+ * is not known. `passed` are the options `\PassOptionsToClass` gave this class before the line.
42
+ */
28
43
  export type ClassCandidate =
29
44
  | { readonly kind: "empty"; readonly place: Place }
30
- | ({ readonly kind: "class"; readonly place: Place } & DocumentClass);
45
+ | { readonly kind: "unread"; readonly place: Place }
46
+ | ({
47
+ readonly kind: "class";
48
+ readonly place: Place;
49
+ readonly unread: readonly string[];
50
+ readonly passed: readonly PassedOptions[];
51
+ } & DocumentClass);
52
+
53
+ /** Every option a class line puts in effect: its own, then the ones passed to its class before it. */
54
+ export const optionsInEffect = (
55
+ line: Extract<ClassCandidate, { readonly kind: "class" }>,
56
+ ): DocumentClass => ({
57
+ cls: line.cls,
58
+ options: [...line.options, ...line.passed.flatMap((p) => p.options)],
59
+ });
60
+
61
+ /** Whether every option a class line puts in effect was read: none is built by a macro. */
62
+ export const readWhole = (
63
+ line: Extract<ClassCandidate, { readonly kind: "class" }>,
64
+ ): boolean =>
65
+ line.unread.length === 0 && line.passed.every((p) => p.unread.length === 0);
31
66
 
32
67
  /**
33
- * A paper's `\documentclass`: none, exactly one, or several — a source that picks its class behind
34
- * a TeX switch (`\if\venue1 \documentclass{article} \fi …`). Which branch builds is not
35
- * evaluated, so several lines are candidates, in source order, and none of them is THE class.
68
+ * A paper's `\documentclass`: none; none the reader can see, though one may stand where it does not
69
+ * look (`unseen`: inside another macro's argument, or in a file the preamble `\input`s that was not
70
+ * read); exactly one; or several — a source that picks its class behind a TeX switch
71
+ * (`\if\venue1 \documentclass{article} \fi …`). Which branch builds is not evaluated, so several
72
+ * lines are candidates, in source order, and none of them is THE class.
36
73
  */
37
74
  export type ClassLine =
38
75
  | { readonly kind: "missing" }
76
+ | { readonly kind: "unseen" }
39
77
  | ClassCandidate
40
78
  | {
41
79
  readonly kind: "ambiguous";
@@ -78,6 +116,27 @@ export function venueClass(
78
116
  export const documentClassLine = (d: DocumentClass): string =>
79
117
  `\\documentclass${d.options.length > 0 ? `[${d.options.join(",")}]` : ""}{${d.cls}}`;
80
118
 
119
+ /** A style package as a template names it: the package and the options it requires. */
120
+ export interface StylePackage {
121
+ readonly name: string;
122
+ readonly options: readonly string[];
123
+ }
124
+
125
+ /**
126
+ * One package a `\usepackage`, `\RequirePackage` or `\RequirePackageWithOptions` of the paper
127
+ * loads, with every option LaTeX hands it, as written (whitespace collapsed): the class line's, those
128
+ * passed to it before the load, the load's own. Of those, `unread` holds the ones built by a macro,
129
+ * whose content is not known. A line loading several packages (`\usepackage{a,b}`) gives one each.
130
+ */
131
+ export interface PackageLoad extends StylePackage {
132
+ readonly unread: readonly string[];
133
+ readonly place: Place;
134
+ }
135
+
136
+ /** A style package as a `\usepackage` line, for a message. */
137
+ export const usepackageLine = (s: StylePackage): string =>
138
+ `\\usepackage${s.options.length > 0 ? `[${s.options.join(",")}]` : ""}{${s.name}}`;
139
+
81
140
  /** One `\section` or `\section*`, its title's text with whitespace collapsed. */
82
141
  export interface Heading {
83
142
  readonly title: string;
@@ -159,6 +159,57 @@ describe("paper/folder-venue-leftover — a venue is named by its edition", () =
159
159
  });
160
160
  });
161
161
 
162
+ describe("paper/folder-venue-leftover — NeurIPS, named by its edition", () => {
163
+ it("🔴 «neurips-2026-…» is reported in another venue's paper; «neurips-…» without the year is not, nor under neurips-2026", () => {
164
+ expect(
165
+ lint("neurips-2026-diffusion", AIDC).map(
166
+ (r) => /names the venue (.*?), and/u.exec(r.message)?.[1],
167
+ ),
168
+ ).toEqual(["NeurIPS 2026"]);
169
+ expect(lint("neurips-diffusion", AIDC)).toEqual([]);
170
+ expect(
171
+ lint("neurips-2026-diffusion", {
172
+ extends: "paperlint:neurips-2026",
173
+ kind: "main",
174
+ }),
175
+ ).toEqual([]);
176
+ });
177
+ });
178
+
179
+ describe("paper/folder-venue-leftover — AAAI, named by its edition", () => {
180
+ it("🔴 «aaai-2027-…» is reported in another venue's paper; «aaai-…» without the year is not, nor under aaai-2027", () => {
181
+ expect(
182
+ lint("aaai-2027-planning", AIDC).map(
183
+ (r) => /names the venue (.*?), and/u.exec(r.message)?.[1],
184
+ ),
185
+ ).toEqual(["AAAI 2027"]);
186
+ expect(lint("aaai-planning", AIDC)).toEqual([]);
187
+ expect(
188
+ lint("aaai-2027-planning", {
189
+ extends: "paperlint:aaai-2027",
190
+ kind: "main",
191
+ }),
192
+ ).toEqual([]);
193
+ });
194
+ });
195
+
196
+ describe("paper/folder-venue-leftover — ICML, named by its edition", () => {
197
+ it("🔴 «icml-2027-…» is reported in another venue's paper; «icml-…» without the year is not, nor under icml-2027", () => {
198
+ expect(
199
+ lint("icml-2027-diffusion", AIDC).map(
200
+ (r) => /names the venue (.*?), and/u.exec(r.message)?.[1],
201
+ ),
202
+ ).toEqual(["ICML 2027"]);
203
+ expect(lint("icml-diffusion", AIDC)).toEqual([]);
204
+ expect(
205
+ lint("icml-2027-diffusion", {
206
+ extends: "paperlint:icml-2027",
207
+ kind: "main",
208
+ }),
209
+ ).toEqual([]);
210
+ });
211
+ });
212
+
162
213
  describe("paper/folder-venue-leftover — a workshop's parent conference", () => {
163
214
  it("🔴 in another venue's paper it is reported once, as itself", () => {
164
215
  const named = (folder: string) =>
@@ -297,11 +297,11 @@ describe("paperlint new --venue msr", () => {
297
297
 
298
298
  describe("paperlint new --venue — a venue it cannot use", () => {
299
299
  it("an unknown venue exits 2, lists the shipped presets, and creates nothing", async () => {
300
- const r = await newIn(["--venue", "neurips"]);
300
+ const r = await newIn(["--venue", "usenix"]);
301
301
  expect(r.code).toBe(2);
302
302
  // Guards: the list is read from the shipped presets, the same list lint prints.
303
303
  expect(r.err).toContain(shippedPresets(presetsDir()).join(", "));
304
- expect(r.err).toMatch(/--venue neurips: no such venue preset/);
304
+ expect(r.err).toMatch(/--venue usenix: no such venue preset/);
305
305
  expect(existsSync(r.dir)).toBe(false);
306
306
  });
307
307
 
@@ -302,7 +302,7 @@ describe("paperlint lint — the paper over its preset, and the project's own pr
302
302
  const r = await lint(root);
303
303
  expect(r.code).toBe(1);
304
304
  expect(r.out).toMatch(
305
- /acl-latex, acm-acmsmall, acm-sigconf, acsac-2026, agent-2027, agenticdev-2026, agentverify-2027, aidc-2026, aisec-2026, ase-2026, ccs-2026, emnlp-2026, fse-2027, icse-2027, icse-2028, ieee-conference, msr-2027, nlbse-2027, realm-2026, sp-2027/,
305
+ /aaai-2027, aaai-press, acl-latex, acm-acmsmall, acm-sigconf, acsac-2026, agent-2027, agenticdev-2026, agentverify-2027, aidc-2026, aisec-2026, ase-2026, ccs-2026, emnlp-2026, fse-2027, icml-2027, icml-style, icse-2027, icse-2028, ieee-conference, msr-2027, neurips-2026, neurips-style, nlbse-2027, realm-2026, sp-2027/,
306
306
  );
307
307
  });
308
308
  });
@@ -11,6 +11,8 @@ import type {
11
11
  Emphasis,
12
12
  LayoutOverride,
13
13
  Outline,
14
+ PackageLoad,
15
+ StylePackage,
14
16
  Passage,
15
17
  Place,
16
18
  Span,
@@ -89,6 +91,18 @@ export interface LatexReader {
89
91
  * class name (no option). Null for anything else.
90
92
  */
91
93
  readonly template: (text: string) => DocumentClass | null;
94
+ /** Every package the preamble's `\usepackage` and `\RequirePackage` lines load, in source order. */
95
+ readonly packages: (src: string) => readonly PackageLoad[];
96
+ /**
97
+ * Whether the preamble may load a package `packages` does not see: an unread `\input`, a package
98
+ * line inside a macro, or one whose name a macro builds.
99
+ */
100
+ readonly packagesUnseen: (src: string) => boolean;
101
+ /**
102
+ * A preset's `template_style` → the package it names and the options it requires: one whole
103
+ * `\usepackage[…]{…}` line naming one package. Null for anything else.
104
+ */
105
+ readonly templateStyle: (text: string) => StylePackage | null;
92
106
  /**
93
107
  * `src` with its `\documentclass` set to `want` — unless it already is `want`'s class with every
94
108
  * option `want` names (the author's own options stay), or it has none.
@@ -57,6 +57,13 @@ export interface CredentialHelp {
57
57
  export interface PortalSite {
58
58
  /** The environment variable this site's token is read from. */
59
59
  readonly tokenVariable: string;
60
+ /**
61
+ * The variable read when `tokenVariable` is not set, for a portal whose sites share one account
62
+ * system and so one token; null: this site's token is its own.
63
+ */
64
+ readonly sharedVariable: string | null;
65
+ /** Whether a token works on one site only, so is refused in the shared variable. */
66
+ readonly isSiteOnlyToken: (token: string) => boolean;
60
67
  /** The site-less variable no longer read: named when still set, never used. */
61
68
  readonly siteLessVariable: string;
62
69
  /** The shape of a site's variable, for a message about another site's. */
@@ -81,37 +81,54 @@ const sectionOf = (text: string): string =>
81
81
  const STALE =
82
82
  "preset/card-rules: the rules section does not match the preset beside this card — run `npx eslint --fix` on this file to rewrite it from the preset";
83
83
 
84
- describe("the shipped cards", () => {
84
+ /**
85
+ * The first test lints every card in presets/, and that grows with each venue. Measured in CI's
86
+ * coverage job with 19 cards: 2.0 s and 3.5 s (run 44507805064, attempts 1 and 2); 1.4 s here with
87
+ * 17. At that rate it passes vitest's 5 s default at about 27 cards; 21 cards took 5.0 s under
88
+ * `npm run test:changed` (2026-11-19), past vitest's default.
89
+ */
90
+ const ALL_CARDS_MS = 30_000;
91
+
92
+ /** Every card in presets/, by file name: a new preset adds its card here. */
93
+ const SHIPPED_CARDS = [
94
+ "aaai-2027.md",
95
+ "aaai-press.md",
96
+ "acl-latex.md",
97
+ "acm-acmsmall.md",
98
+ "acm-sigconf.md",
99
+ "acsac-2026.md",
100
+ "agent-2027.md",
101
+ "agenticdev-2026.md",
102
+ "agentverify-2027.md",
103
+ "aidc-2026.md",
104
+ "aisec-2026.md",
105
+ "ase-2026.md",
106
+ "ccs-2026.md",
107
+ "emnlp-2026.md",
108
+ "fse-2027.md",
109
+ "icml-2027.md",
110
+ "icml-style.md",
111
+ "icse-2027.md",
112
+ "icse-2028.md",
113
+ "ieee-conference.md",
114
+ "msr-2027.md",
115
+ "neurips-2026.md",
116
+ "neurips-style.md",
117
+ "nlbse-2027.md",
118
+ "realm-2026.md",
119
+ "sp-2027.md",
120
+ "tex-base.md",
121
+ ];
122
+
123
+ describe("the shipped cards", { timeout: ALL_CARDS_MS }, () => {
85
124
  it("every shipped card holds the section its preset resolves to", async () => {
86
125
  const results = await eslint().lintFiles([join(P, "*.md")]);
87
126
  // Guards: a glob that matched nothing lints nothing and reports clean.
88
- expect(results.map((r) => r.filePath.slice(P.length + 1)).sort()).toEqual([
89
- "acl-latex.md",
90
- "acm-acmsmall.md",
91
- "acm-sigconf.md",
92
- "acsac-2026.md",
93
- "agent-2027.md",
94
- "agenticdev-2026.md",
95
- "agentverify-2027.md",
96
- "aidc-2026.md",
97
- "aisec-2026.md",
98
- "ase-2026.md",
99
- "ccs-2026.md",
100
- "emnlp-2026.md",
101
- "fse-2027.md",
102
- "icse-2027.md",
103
- "icse-2028.md",
104
- "ieee-conference.md",
105
- "msr-2027.md",
106
- "nlbse-2027.md",
107
- "realm-2026.md",
108
- "sp-2027.md",
109
- "tex-base.md",
110
- ]);
127
+ expect(results.map((r) => r.filePath.slice(P.length + 1)).sort()).toEqual(
128
+ SHIPPED_CARDS,
129
+ );
111
130
  expect(results.flatMap((r) => r.messages)).toEqual([]);
112
- // Every card resolves its preset's whole chain: 21 cards took 5.0 s under `npm run test:changed`
113
- // (2026-11-19), past vitest's default of 5 s.
114
- }, 20_000);
131
+ });
115
132
 
116
133
  it("agenticdev: its own rules, linked to their page or to the index, and what it extends", async () => {
117
134
  const text = readFileSync(join(P, "agenticdev-2026.md"), "utf8");
@@ -186,6 +186,149 @@ describe("shipped presets: paperlint:fse-2027", () => {
186
186
  });
187
187
  });
188
188
 
189
+ describe("shipped presets: paperlint:neurips-2026", () => {
190
+ it("paperlint:neurips-2026 → neurips over neurips-style: article + the style file, the style's page and fonts, two kinds, the checklist, both readings of each deadline", () => {
191
+ const r = resolve("paperlint:neurips-2026");
192
+ expect(r.ok).toBe(true);
193
+ if (!r.ok) return;
194
+ expect(r.value.chain.map((f) => f.split("/").pop())).toEqual([
195
+ "neurips-style.jsonc",
196
+ "neurips-2026.jsonc",
197
+ ]);
198
+ // The template is the class AND the style the kit loads into it, both from the family.
199
+ expect(r.value.template).toEqual({
200
+ text: "\\documentclass{article}",
201
+ file: join(VENUES, "neurips-style.jsonc"),
202
+ forbids: [],
203
+ });
204
+ expect(r.value.templateStyle).toEqual({
205
+ text: "\\usepackage{neurips_2026}",
206
+ file: join(VENUES, "neurips-style.jsonc"),
207
+ });
208
+ expect(r.value.format.columns).toBe(1);
209
+ expect(r.value.format.pageWidthIn).toBe(8.5);
210
+ expect(r.value.format.pageHeightIn).toBe(11);
211
+ expect(r.value.format.fontsText).toBe("NimbusRomNo9L");
212
+ expect(r.value.format.fontsTitle).toBeNull();
213
+ // banal's count: the line numbers of the submission defeat the heading `body_ends_at` looks for.
214
+ expect(r.value.format.bodyEndsAt).toBeNull();
215
+ expect([...r.value.format.kinds]).toEqual([
216
+ ["main", { pagesMax: null, bodyPagesMax: 9, refPagesMax: null }],
217
+ ["camera-ready", { pagesMax: null, bodyPagesMax: 10, refPagesMax: null }],
218
+ ]);
219
+ expect(Object.keys(r.value.tex.packages)).toEqual(
220
+ expect.arrayContaining(["environ", "lineno", "times", "helvetic"]),
221
+ );
222
+ expect(r.value.blind).toBe(true);
223
+ expect(r.value.portal).toBeNull();
224
+ expect(r.value.requiredSections).toEqual([
225
+ { title: "NeurIPS Paper Checklist", position: null },
226
+ ]);
227
+ expect(r.value.deadlines.map((d) => [d.what, d.source])).toEqual([
228
+ ["registration", "portal"],
229
+ ["registration", "call"],
230
+ ["submission", "portal"],
231
+ ["submission", "call"],
232
+ ["notification", "call"],
233
+ ["camera-ready", "call"],
234
+ ]);
235
+ expect(r.value.label).toBe("NeurIPS");
236
+ expect(r.value.aliases).toEqual(["NeurIPS"]);
237
+ expect(r.value.rules).toEqual({});
238
+ });
239
+ });
240
+
241
+ describe("shipped presets: paperlint:aaai-2027", () => {
242
+ it("paperlint:aaai-2027 → aaai-2027 over aaai-press: the kit's two lines, letter and two columns in newtxtext, 7 + 2 pages, both readings of each deadline", () => {
243
+ const r = resolve("paperlint:aaai-2027");
244
+ expect(r.ok).toBe(true);
245
+ if (!r.ok) return;
246
+ expect(r.value.chain.map((f) => f.split("/").pop())).toEqual([
247
+ "aaai-press.jsonc",
248
+ "aaai-2027.jsonc",
249
+ ]);
250
+ expect(r.value.template?.text).toBe(
251
+ "\\documentclass[letterpaper]{article}",
252
+ );
253
+ expect(r.value.format.columns).toBe(2);
254
+ expect(r.value.format.pageWidthIn).toBe(8.5);
255
+ expect(r.value.format.pageHeightIn).toBe(11);
256
+ expect(r.value.format.bodyPt).toBe(10);
257
+ expect([r.value.format.refPtMin, r.value.format.refPtMax]).toEqual([9, 10]);
258
+ // newtxtext's Times, not the URW Times of the AAAI-26 kit (NimbusRomNo9L).
259
+ expect(r.value.format.fontsText).toBe("TeXGyreTermesX");
260
+ expect(r.value.format.fontsTitle).toBeNull();
261
+ expect(r.value.format.bodyEndsAt).toBeNull();
262
+ expect([...r.value.format.kinds]).toEqual([
263
+ ["main", { pagesMax: 9, bodyPagesMax: 7, refPagesMax: 2 }],
264
+ ]);
265
+ expect(Object.keys(r.value.tex.packages)).toEqual(
266
+ expect.arrayContaining(["newtx", "kastrup", "tex-gyre", "placeins"]),
267
+ );
268
+ expect(r.value.blind).toBe(true);
269
+ expect(r.value.portal).toBeNull();
270
+ expect(r.value.requiredSections).toEqual([]);
271
+ expect(r.value.deadlines.map((d) => [d.what, d.source, d.at])).toEqual([
272
+ ["registration", "call", "2026-07-22T11:59:00Z"],
273
+ ["registration", "portal", "2026-07-22T11:59:00Z"],
274
+ ["submission", "call", "2026-07-29T11:59:00Z"],
275
+ ["submission", "portal", "2026-07-29T11:59:00Z"],
276
+ ["camera-ready", "call", "2026-12-15T11:59:59Z"],
277
+ ]);
278
+ expect(r.value.label).toBe("AAAI");
279
+ expect(r.value.aliases).toEqual(["AAAI"]);
280
+ expect(r.value.rules).toEqual({});
281
+ });
282
+ });
283
+
284
+ describe("shipped presets: paperlint:icml-2027", () => {
285
+ it("paperlint:icml-2027 → icml over icml-style: article + the style file, the style's page and fonts, two kinds counted by banal, the Impact Statement, the call's deadlines", () => {
286
+ const r = resolve("paperlint:icml-2027");
287
+ expect(r.ok).toBe(true);
288
+ if (!r.ok) return;
289
+ expect(r.value.chain.map((f) => f.split("/").pop())).toEqual([
290
+ "icml-style.jsonc",
291
+ "icml-2027.jsonc",
292
+ ]);
293
+ // The template is the class AND the style the kit loads into it, both from the family.
294
+ expect(r.value.template?.text).toBe("\\documentclass{article}");
295
+ expect(r.value.templateStyle).toEqual({
296
+ text: "\\usepackage{icml2027}",
297
+ file: join(VENUES, "icml-style.jsonc"),
298
+ });
299
+ expect(r.value.format.columns).toBe(2);
300
+ expect(r.value.format.pageWidthIn).toBe(8.5);
301
+ expect(r.value.format.pageHeightIn).toBe(11);
302
+ expect(r.value.format.bodyPt).toBe(10);
303
+ expect([r.value.format.refPtMin, r.value.format.refPtMax]).toEqual([
304
+ 10, 10,
305
+ ]);
306
+ expect(r.value.format.fontsText).toBe("NimbusRomNo9L");
307
+ expect(r.value.format.fontsTitle).toBeNull();
308
+ // banal's count: ICML's appendix headings («A. …») defeat the heading `body_ends_at` looks for.
309
+ expect(r.value.format.bodyEndsAt).toBeNull();
310
+ expect([...r.value.format.kinds]).toEqual([
311
+ ["main", { pagesMax: null, bodyPagesMax: 8, refPagesMax: null }],
312
+ ["camera-ready", { pagesMax: null, bodyPagesMax: 9, refPagesMax: null }],
313
+ ]);
314
+ expect(Object.keys(r.value.tex.packages)).toEqual(
315
+ expect.arrayContaining(["eso-pic", "forloop", "times", "courier"]),
316
+ );
317
+ expect(r.value.blind).toBe(true);
318
+ expect(r.value.portal).toBeNull();
319
+ expect(r.value.requiredSections).toEqual([
320
+ { title: "Impact Statement", position: null },
321
+ ]);
322
+ expect(r.value.deadlines.map((d) => [d.what, d.source, d.at])).toEqual([
323
+ ["registration", "call", "2027-01-15T11:59:59Z"],
324
+ ["submission", "call", "2027-01-23T11:59:59Z"],
325
+ ]);
326
+ expect(r.value.label).toBe("ICML");
327
+ expect(r.value.aliases).toEqual(["ICML"]);
328
+ expect(r.value.rules).toEqual({});
329
+ });
330
+ });
331
+
189
332
  describe("shipped presets: a family, and a venue that stands alone", () => {
190
333
  it("a paper may extend a family directly: format and fonts, and no kinds", () => {
191
334
  const r = resolve("paperlint:acm-sigconf");
@@ -229,6 +372,12 @@ const FAMILIES = PARSED.filter((p) =>
229
372
 
230
373
  // What each shipped preset declares itself to be; a new preset adds its row here.
231
374
  const DECLARED = {
375
+ "aaai-press.jsonc": { type: "family" },
376
+ "aaai-2027.jsonc": {
377
+ type: "venue",
378
+ name: "AAAI",
379
+ url: "https://aaai.org/conference/aaai/aaai-27/main-technical-track-call/",
380
+ },
232
381
  "acl-latex.jsonc": { type: "family" },
233
382
  "acm-acmsmall.jsonc": { type: "family" },
234
383
  "acm-sigconf.jsonc": { type: "family" },
@@ -282,6 +431,12 @@ const DECLARED = {
282
431
  name: "FSE",
283
432
  url: "https://conf.researchr.org/track/fse-2027/fse-2027-papers",
284
433
  },
434
+ "icml-style.jsonc": { type: "family" },
435
+ "icml-2027.jsonc": {
436
+ type: "venue",
437
+ name: "ICML",
438
+ url: "https://icml.cc/Conferences/2027/CallForPapers",
439
+ },
285
440
  "icse-2027.jsonc": {
286
441
  type: "venue",
287
442
  name: "ICSE",
@@ -298,6 +453,12 @@ const DECLARED = {
298
453
  name: "MSR",
299
454
  url: "https://2027.msrconf.org/track/msr-2027-technical-papers",
300
455
  },
456
+ "neurips-style.jsonc": { type: "family" },
457
+ "neurips-2026.jsonc": {
458
+ type: "venue",
459
+ name: "NeurIPS",
460
+ url: "https://neurips.cc/Conferences/2026/CallForPapers",
461
+ },
301
462
  "nlbse-2027.jsonc": {
302
463
  type: "venue",
303
464
  name: "NLBSE",
@@ -349,10 +510,13 @@ describe("the naming convention of shipped presets (docs/rules.md)", () => {
349
510
 
350
511
  it("there are families to check (else the checks below see nothing)", () => {
351
512
  expect(families.map((f) => f.name).sort()).toEqual([
513
+ "aaai-press",
352
514
  "acl-latex",
353
515
  "acm-acmsmall",
354
516
  "acm-sigconf",
517
+ "icml-style",
355
518
  "ieee-conference",
519
+ "neurips-style",
356
520
  ]);
357
521
  });
358
522
 
@@ -580,7 +744,7 @@ describe("what does not resolve, and says why", () => {
580
744
  "a shipped name with a typo",
581
745
  "paperlint:agenticdve",
582
746
  "not-found",
583
- /acl-latex, acm-acmsmall, acm-sigconf, acsac-2026, agent-2027, agenticdev-2026, agentverify-2027, aidc-2026, aisec-2026, ase-2026, ccs-2026, emnlp-2026, fse-2027, icse-2027, icse-2028, ieee-conference, msr-2027, nlbse-2027, realm-2026, sp-2027/,
747
+ /aaai-2027, aaai-press, acl-latex, acm-acmsmall, acm-sigconf, acsac-2026, agent-2027, agenticdev-2026, agentverify-2027, aidc-2026, aisec-2026, ase-2026, ccs-2026, emnlp-2026, fse-2027, icml-2027, icml-style, icse-2027, icse-2028, ieee-conference, msr-2027, neurips-2026, neurips-style, nlbse-2027, realm-2026, sp-2027/,
584
748
  ],
585
749
  ["the base TeX set", "paperlint:tex-base", "not-found", /agenticdev/],
586
750
  [
@@ -876,6 +1040,8 @@ describe("shippedVenueNames — what each shipped venue is called", () => {
876
1040
  const names = shippedVenueNames(deps());
877
1041
  // A venue is labelled by its `name`, a family by its file name.
878
1042
  expect(names.map((n) => n.label)).toEqual([
1043
+ "AAAI",
1044
+ "aaai-press",
879
1045
  "acl-latex",
880
1046
  "acm-acmsmall",
881
1047
  "acm-sigconf",
@@ -889,10 +1055,14 @@ describe("shippedVenueNames — what each shipped venue is called", () => {
889
1055
  "ACM CCS",
890
1056
  "EMNLP",
891
1057
  "FSE",
1058
+ "ICML",
1059
+ "icml-style",
892
1060
  "ICSE",
893
1061
  "ICSE",
894
1062
  "ieee-conference",
895
1063
  "MSR",
1064
+ "NeurIPS",
1065
+ "neurips-style",
896
1066
  "NLBSE",
897
1067
  "REALM",
898
1068
  "IEEE S&P",
@@ -921,6 +1091,8 @@ describe("shippedVenueNames — what does not resolve", () => {
921
1091
  expect(
922
1092
  shippedVenueNames({ files, venuesDir: VENUES }).map((n) => n.label),
923
1093
  ).toEqual([
1094
+ "AAAI",
1095
+ "aaai-press",
924
1096
  "acl-latex",
925
1097
  "acm-acmsmall",
926
1098
  "acm-sigconf",
@@ -934,10 +1106,14 @@ describe("shippedVenueNames — what does not resolve", () => {
934
1106
  "ACM CCS",
935
1107
  "EMNLP",
936
1108
  "FSE",
1109
+ "ICML",
1110
+ "icml-style",
937
1111
  "ICSE",
938
1112
  "ICSE",
939
1113
  "ieee-conference",
940
1114
  "MSR",
1115
+ "NeurIPS",
1116
+ "neurips-style",
941
1117
  "NLBSE",
942
1118
  "IEEE S&P",
943
1119
  ]);
package/src/presets.ts CHANGED
@@ -104,6 +104,12 @@ export interface PresetTemplate {
104
104
  readonly forbids: readonly string[];
105
105
  }
106
106
 
107
+ /** A preset's `template_style`, as its file spells it. */
108
+ export interface PresetStyle {
109
+ readonly text: string;
110
+ readonly file: string;
111
+ }
112
+
107
113
  /** A resolved chain, merged. */
108
114
  export interface Preset {
109
115
  /**
@@ -123,6 +129,11 @@ export interface Preset {
123
129
  * through the LaTeX reader.
124
130
  */
125
131
  readonly template: PresetTemplate | null;
132
+ /**
133
+ * The style package the template loads into its class (`template_style`, a `\\usepackage` line),
134
+ * as the preset spells it, and the file that spells it; null when no file of the chain names one.
135
+ */
136
+ readonly templateStyle: PresetStyle | null;
126
137
  /** Every `name` and `aliases` along the chain: what this venue is called in a paper's text. */
127
138
  readonly aliases: readonly string[];
128
139
  /** The `aliases` the chain's files declare, without any `name`: what a folder name is matched against beside the edition. */
@@ -335,6 +346,7 @@ const NOTHING_MERGED: Merging = {
335
346
  name: null,
336
347
  parent: null,
337
348
  template: null,
349
+ templateStyle: null,
338
350
  aliases: [],
339
351
  declaredAliases: [],
340
352
  blind: false,
@@ -382,6 +394,10 @@ const mergeOne = (
382
394
  p.template === null
383
395
  ? acc.template
384
396
  : { text: p.template, file, forbids: p.templateForbids },
397
+ templateStyle:
398
+ p.templateStyle === null
399
+ ? acc.templateStyle
400
+ : { text: p.templateStyle, file },
385
401
  aliases: [...new Set([...acc.aliases, ...namesOf(p.identity), ...p.aliases])],
386
402
  declaredAliases: [...new Set([...acc.declaredAliases, ...p.aliases])],
387
403
  blind: p.blind ?? acc.blind,
@@ -528,6 +544,17 @@ export function resolveShipped(deps: PresetDeps): readonly Preset[] {
528
544
  .map((r) => r.value);
529
545
  }
530
546
 
547
+ /**
548
+ * The `template_style` of every shipped preset that resolves and names one, with its chain: the
549
+ * styles a paper of another venue may have loaded instead of its own (`tex/template`).
550
+ */
551
+ export const shippedStyles = (
552
+ deps: PresetDeps,
553
+ ): readonly (PresetStyle & Pick<Preset, "chain">)[] =>
554
+ resolveShipped(deps).flatMap((p) =>
555
+ p.templateStyle === null ? [] : [{ ...p.templateStyle, chain: p.chain }],
556
+ );
557
+
531
558
  /** A shipped venue as a name knows it, and the files of its chain: what tells it from a paper's own. */
532
559
  export type ShippedVenue = Pick<
533
560
  Preset,
@@ -1776,6 +1776,58 @@ describe("the register bands are in the writing set, on AIDC too", () => {
1776
1776
  });
1777
1777
  });
1778
1778
 
1779
+ describe("tex/template — an author silences a finding they dispute, with the reason", () => {
1780
+ const template = async (tree: Record<string, string>) =>
1781
+ (await lintTree(tree))
1782
+ .filter((m) => m.ruleId === "tex/template")
1783
+ .map((m) => `${String(m.line)} ${m.message}`);
1784
+ const missing = "\\documentclass[conference]{IEEEtran}";
1785
+
1786
+ it("🔴 the finding the directive silences is there without it", async () => {
1787
+ expect(await template(blind("Text.", missing))).toEqual([
1788
+ "1 the class option `compsoc` is missing: BlindConf requires `\\documentclass[conference,compsoc]{IEEEtran}`",
1789
+ ]);
1790
+ });
1791
+
1792
+ it("a disable-next-line comment above the class line, with its reason after `--`, silences it", async () => {
1793
+ const cls = `% eslint-disable-next-line tex/template -- the venue's chair allowed this class by email\n${missing}`;
1794
+ expect(await template(blind("Text.", cls))).toEqual([]);
1795
+ });
1796
+
1797
+ it("a disable comment on the first line silences a finding reported at the top of the file", async () => {
1798
+ const tree = paper(
1799
+ "% eslint-disable tex/template -- the class line is written by the build script\n\\begin{document}\nText.\n\\section*{LLM Usage Statement}\nNone.\n\\end{document}\n",
1800
+ BLIND_PAPER,
1801
+ );
1802
+ expect(await template(tree)).toEqual([]);
1803
+ // The other half: without the comment, the missing class is reported there.
1804
+ const bare = paper(
1805
+ "\\begin{document}\nText.\n\\section*{LLM Usage Statement}\nNone.\n\\end{document}\n",
1806
+ BLIND_PAPER,
1807
+ );
1808
+ expect(await template(bare)).toEqual([
1809
+ "1 paper.tex has no \\documentclass; BlindConf requires `\\documentclass[conference,compsoc]{IEEEtran}`",
1810
+ ]);
1811
+ });
1812
+
1813
+ it("🔴 the same holds for format/layout-override, the other rule that reports in the preamble", async () => {
1814
+ const layout = async (directive: string) =>
1815
+ (
1816
+ await lintTree(
1817
+ blind("Text.", `${IEEE}\n${directive}\\usepackage{geometry}`),
1818
+ )
1819
+ )
1820
+ .filter((m) => m.ruleId === "format/layout-override")
1821
+ .map((m) => m.line);
1822
+ expect(await layout("")).toEqual([2]);
1823
+ expect(
1824
+ await layout(
1825
+ "% eslint-disable-next-line format/layout-override -- the venue's call allows A4 margins\n",
1826
+ ),
1827
+ ).toEqual([]);
1828
+ });
1829
+ });
1830
+
1779
1831
  describe("tex/max-paragraph-words is off by default", () => {
1780
1832
  it("a 300-word paragraph produces nothing under the default config, and fires once the paper turns the rule on", async () => {
1781
1833
  const ids = async (tree: Record<string, string>) =>