paperlint 3.0.0 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +179 -180
- package/dist/build-engine.d.ts.map +1 -1
- package/dist/build-engine.js +6 -2
- package/dist/build-engine.js.map +1 -1
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +22 -3
- package/dist/build.js.map +1 -1
- package/dist/cli.d.ts +66 -5
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +230 -30
- package/dist/cli.js.map +1 -1
- package/dist/engine.d.ts +9 -0
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +27 -0
- package/dist/engine.js.map +1 -1
- package/dist/init.js +1 -1
- package/dist/init.js.map +1 -1
- package/dist/new-paper.d.ts +8 -1
- package/dist/new-paper.d.ts.map +1 -1
- package/dist/new-paper.js +50 -15
- package/dist/new-paper.js.map +1 -1
- package/dist/paper-files.d.ts +30 -8
- package/dist/paper-files.d.ts.map +1 -1
- package/dist/paper-files.js +56 -29
- package/dist/paper-files.js.map +1 -1
- package/dist/structure.js +1 -1
- package/dist/structure.js.map +1 -1
- package/dist/toolchain.d.ts +5 -1
- package/dist/toolchain.d.ts.map +1 -1
- package/dist/toolchain.js +22 -5
- package/dist/toolchain.js.map +1 -1
- package/dist/types.d.ts +6 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/venue-rules.js +1 -1
- package/dist/venue-rules.js.map +1 -1
- package/docs/configuration.md +48 -4
- package/docs/rules.md +29 -25
- package/docs/skills.md +80 -0
- package/eslint-rules/paper-typography.mjs +47 -7
- package/eslint-rules/paper-typography.test.mjs +40 -0
- package/eslint-rules/review-frontmatter.schema.json +1 -1
- package/fixtures/toolchain-mirror/catalog.txt +1 -0
- package/fixtures/toolchain-mirror/install-tl +4 -1
- package/fixtures/toolchain-mirror/stub-fmtutil-sys +4 -0
- package/fixtures/toolchain-mirror/stub-tlmgr +15 -0
- package/package.json +1 -1
- package/scripts/mutation-batteries.frozen.json +1 -1
- package/src/build-engine.ts +6 -1
- package/src/build.harness.mjs +46 -2
- package/src/build.ts +27 -5
- package/src/cli.harness.mjs +2 -2
- package/src/cli.ts +301 -32
- package/src/engine.harness.mjs +50 -0
- package/src/engine.ts +35 -0
- package/src/init.ts +1 -1
- package/src/linted-set.test.ts +118 -0
- package/src/new-paper.harness.mjs +2 -0
- package/src/new-paper.mutations.mjs +0 -14
- package/src/new-paper.test.ts +172 -1
- package/src/new-paper.ts +84 -17
- package/src/paper-files.test.ts +110 -5
- package/src/paper-files.ts +93 -37
- package/src/paper-settings-commands.test.ts +41 -5
- package/src/parse-args.test.ts +48 -0
- package/src/rules-off.test.ts +111 -0
- package/src/structure.harness.mjs +2 -2
- package/src/structure.ts +1 -1
- package/src/toolchain.harness.mjs +41 -6
- package/src/toolchain.ts +29 -5
- package/src/types.ts +6 -0
- package/src/venue-rules.test.ts +3 -0
- package/src/venue-rules.ts +1 -1
- package/templates/paper/paperlint.json +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,8 @@ README style — keep it scannable, not a wall of text:
|
|
|
8
8
|
- Mechanics and edge cases live in docs/, linked — not inline.
|
|
9
9
|
- A reader must be able to answer "what is it, which venues, how do I start" from the first screen.
|
|
10
10
|
- Sparse emoji are fine where they help rhythm and scanning (e.g. one per section heading or feature bullet); never decorative, never several in a row.
|
|
11
|
+
- One name per thing, everywhere (lint, build, venue preset, kind, skill, papersDir), each explained once, before it is used.
|
|
12
|
+
- Editing this file: re-read all of it first, and change it so it still reads as one document — the opening, the diagram, the order and the names your change touches. Remove or merge what it makes redundant. Never bolt on a section or patch one paragraph in isolation.
|
|
11
13
|
-->
|
|
12
14
|
|
|
13
15
|
# paperlint
|
|
@@ -15,81 +17,72 @@ README style — keep it scannable, not a wall of text:
|
|
|
15
17
|
[](https://www.npmjs.com/package/paperlint)
|
|
16
18
|

|
|
17
19
|
|
|
18
|
-
**
|
|
19
|
-
|
|
20
|
+
**Write a research paper in LaTeX from idea to camera-ready, and catch what gets it sent back
|
|
21
|
+
before you submit.** It comes in two parts:
|
|
20
22
|
|
|
21
|
-
A
|
|
22
|
-
|
|
23
|
-
|
|
23
|
+
- ✅ **A linter** — a command-line tool, no AI needed. Its headline catches:
|
|
24
|
+
- 📏 a paper over the page limit for its kind at your venue;
|
|
25
|
+
- 🔤 the wrong font — LaTeX silently fell back to Computer Modern because a package was missing;
|
|
26
|
+
- 🔗 a bad reference — a cited work that does not exist, or lists the preprint's authors.
|
|
24
27
|
|
|
25
|
-
|
|
26
|
-
as the call for papers sets them.
|
|
27
|
-
- 🧱 **Builds the same PDF everywhere.** `paperlint toolchain` installs TeX Live with exactly the
|
|
28
|
-
packages your venue's template needs.
|
|
29
|
-
- 📌 **Keeps what you submitted.** Record the PDF you sent, and paperlint fails if it changes or
|
|
30
|
-
disappears, or its LaTeX source was not kept.
|
|
31
|
-
- 🔗 **Checks your references online.** At build time: each cited work exists, and its author list
|
|
32
|
-
is the published version's.
|
|
33
|
-
- ✏️ **Knows the classic slips.** `§` instead of "Section", `.05` instead of `0.05`.
|
|
34
|
-
`paperlint lint --fix` fixes them.
|
|
28
|
+
Smaller slips too: `§` for "Section", `.05` for `0.05` — fixed for you.
|
|
35
29
|
|
|
36
|
-
|
|
37
|
-
|
|
30
|
+
- 🧠 **Skills for [Claude Code](https://claude.com/claude-code)** — optional, 24 of them, covering the
|
|
31
|
+
whole pipeline: the idea, the venue, the study, the draft, the reviews, submission.
|
|
38
32
|
|
|
39
33
|
## Contents
|
|
40
34
|
|
|
35
|
+
- [The pipeline](#-the-pipeline)
|
|
41
36
|
- [Supported venues](#-supported-venues)
|
|
42
|
-
- [Skills](#-skills)
|
|
43
37
|
- [Getting started](#-getting-started)
|
|
38
|
+
- [A new paper](#a-new-paper)
|
|
39
|
+
- [A paper you already have](#a-paper-you-already-have)
|
|
44
40
|
- [Commands](#-commands)
|
|
41
|
+
- [Skills](#-skills)
|
|
42
|
+
- [Lint and build](#-lint-and-build)
|
|
45
43
|
- [Configuration](#-configuration)
|
|
44
|
+
- [Add a venue that isn't listed](#-add-a-venue-that-isnt-listed)
|
|
46
45
|
- [Run it in CI](#-run-it-in-ci)
|
|
47
46
|
- [FAQ](#-faq)
|
|
48
47
|
- [Docs](#-docs)
|
|
49
48
|
|
|
50
|
-
##
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
## 🧭 The pipeline
|
|
50
|
+
|
|
51
|
+
```text
|
|
52
|
+
stage what you get skills linter
|
|
53
|
+
1 idea a go / no-go, with the reason yes
|
|
54
|
+
2 venue venues ranked, deadlines planned yes
|
|
55
|
+
3 study a study design, honest statistics yes
|
|
56
|
+
4 draft a first draft, then a tighter one yes lint
|
|
57
|
+
5 review the objections, before the reviewers yes lint
|
|
58
|
+
6 submit a PDF within the limit, recorded yes build, lint
|
|
59
|
+
7 camera-ready the final, de-anonymised PDF yes build, lint
|
|
60
|
+
8 extend a plan for the next paper yes
|
|
61
|
+
|
|
62
|
+
skills: optional, with Claude Code
|
|
63
|
+
lint: every edit and every CI run, once the paper exists (paperlint new)
|
|
64
|
+
build: compiles and measures the PDF; lint then checks pages, fonts, references
|
|
65
|
+
```
|
|
54
66
|
|
|
55
|
-
|
|
56
|
-
| ----------------------- | ------------------ | -------------------------------- | -------------------------------------------------------------- |
|
|
57
|
-
| `paperlint:acm-sigconf` | any ACM conference | ACM two-column conference format | not checked: the family sets no kinds |
|
|
58
|
-
| `paperlint:agenticdev` | AgenticDev @ ASE | ACM two-column conference format | `short` 5, `full` 10, `demo` 5 body pages, + 2 of references |
|
|
59
|
-
| `paperlint:aisec` | AISec @ ACM CCS | ACM two-column conference format | 10 body pages + 2 (`research`, `benchmark`, `position`, `sok`) |
|
|
60
|
-
| `paperlint:realm` | REALM @ EMNLP | ACL two-column format, A4 | `long` 8, `short` 4 — recorded, not checked (below) |
|
|
67
|
+
## 🎯 Supported venues
|
|
61
68
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
would fail.
|
|
69
|
+
A **venue preset** holds a venue's format and page limits. A paper's **kind** picks which limit
|
|
70
|
+
applies: at AgenticDev a `short` paper gets 5 pages and a `full` one 10. You choose it once per paper.
|
|
65
71
|
|
|
66
|
-
|
|
72
|
+
| preset | venue | format | kinds and page limits |
|
|
73
|
+
| ----------------------- | ------------------ | ------------------ | ------------------------------------------------------------------------------------------- |
|
|
74
|
+
| `paperlint:acm-sigconf` | any ACM conference | ACM two-column | no kinds: the format only, no page limit |
|
|
75
|
+
| `paperlint:agenticdev` | AgenticDev @ ASE | ACM two-column | `short` 5, `full` 10, `demo` 5 pages, + 2 pages of references |
|
|
76
|
+
| `paperlint:aisec` | AISec @ ACM CCS | ACM two-column | `research`, `benchmark`, `position`, `sok`: 10 pages + 2 pages of references |
|
|
77
|
+
| `paperlint:realm` | REALM @ EMNLP | ACL two-column, A4 | `long` 8, `short` 4 — recorded, not checked ([why](docs/rules.md#checks-against-the-venue)) |
|
|
67
78
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
paperlint has two halves:
|
|
71
|
-
|
|
72
|
-
1. **The linter** — `lint` and `build` — is deterministic: the same paper gives the same verdict,
|
|
73
|
-
so it belongs in CI.
|
|
74
|
-
2. **The skills** help with the work itself, where the answer is a judgment call. They are
|
|
75
|
-
optional; `paperlint init` installs them for [Claude Code](https://claude.com/claude-code).
|
|
76
|
-
|
|
77
|
-
- **Start here** — run the whole process step by step (`paper-pipeline`), or ask where the paper
|
|
78
|
-
stands (`paper-status`).
|
|
79
|
-
- **Judge the idea** — is it worth doing (`research-ideate`), who else works on it
|
|
80
|
-
(`map-prior-work`), read a close competitor in depth (`analyze-sibling-paper`).
|
|
81
|
-
- **Pick a venue** — find where to send it (`find-venue`), see what gets accepted there
|
|
82
|
-
(`study-accepted-papers`), put the deadlines in your calendar (`plan-paper-timeline`).
|
|
83
|
-
- **Do the study and write** — design the study and its artifact (`build-benchmark`), write the
|
|
84
|
-
draft (`draft-paper`), fix the outline (`argument-arc`), cut it down (`tighten-paper`).
|
|
85
|
-
- **Review before you submit** — a reader with no context (`cold-read-diff`), the prose
|
|
86
|
-
(`grade-paper-writing`), a hostile reviewer (`paper-adversarial-review`), a simulated committee
|
|
87
|
-
(`pc-panel-review`), the references (`verify-citations`), the final check (`harden-paper`).
|
|
88
|
-
- **Submit and after** — render pages to images (`render-paper`), submit (`submit-paper`), upload
|
|
89
|
-
the artifact (`osf-artifact-upload`), camera-ready (`camera-ready`), the next paper (`extend-paper`).
|
|
79
|
+
Not shipped yet: IEEE, USENIX, NeurIPS, Springer, and ACL venues other than REALM.
|
|
80
|
+
[Add yours](#-add-a-venue-that-isnt-listed) in one small file.
|
|
90
81
|
|
|
91
82
|
## 🚀 Getting started
|
|
92
83
|
|
|
84
|
+
### A new paper
|
|
85
|
+
|
|
93
86
|
<!-- `vigiles:symbol src/init.ts#init` — `npm run check` fails if this function is renamed or removed. -->
|
|
94
87
|
|
|
95
88
|
1. Install (Node 22.13 or newer):
|
|
@@ -98,112 +91,107 @@ paperlint has two halves:
|
|
|
98
91
|
npm i -D paperlint
|
|
99
92
|
```
|
|
100
93
|
|
|
101
|
-
2. Set up
|
|
102
|
-
Claude Code
|
|
94
|
+
2. Set up. `init` asks three questions: where your papers live (default `papers/`), whether to
|
|
95
|
+
install TeX Live now, and whether to add a CI workflow. With Claude Code it also installs the
|
|
96
|
+
skills and three hooks ([what they do](docs/install.md)).
|
|
103
97
|
|
|
104
98
|
```sh
|
|
105
99
|
npx paperlint init
|
|
106
100
|
```
|
|
107
101
|
|
|
108
|
-
3.
|
|
109
|
-
|
|
110
|
-
```sh
|
|
111
|
-
npx paperlint toolchain # ~270 MB, ~3 min, once
|
|
112
|
-
```
|
|
113
|
-
|
|
114
|
-
4. Create a paper:
|
|
102
|
+
3. Create a paper. `--venue` names its venue preset from the table above, `--kind` which of its page
|
|
103
|
+
limits applies:
|
|
115
104
|
|
|
116
105
|
<!-- `vigiles:symbol src/new-paper.ts#newPaper` — `npm run check` fails if this function is renamed or removed. -->
|
|
117
106
|
|
|
118
107
|
```sh
|
|
119
|
-
npx paperlint new my-paper
|
|
108
|
+
npx paperlint new my-paper --venue agenticdev --kind short
|
|
120
109
|
```
|
|
121
110
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
+ paperlint.json (from the package template)
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
5. Pick the venue ([the table above](#-supported-venues)) in `papers/my-paper/paperlint.json`:
|
|
111
|
+
It writes `papers/my-paper/` (in the folder you gave `init`) with three files:
|
|
112
|
+
- `paper.tex` — your paper;
|
|
113
|
+
- `paperlint.json` — its venue preset and kind;
|
|
114
|
+
- `PIPELINE-STATUS.md` — which stage the paper is at; the skills read and update it.
|
|
130
115
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
6. Build the PDF:
|
|
116
|
+
4. Build the PDF. **This needs TeX Live, a ~270 MB download (~3 min, once).** If you said no in
|
|
117
|
+
`init`, run `npx paperlint toolchain` first.
|
|
136
118
|
|
|
137
119
|
```sh
|
|
138
120
|
npx paperlint build papers/my-paper
|
|
139
121
|
```
|
|
140
122
|
|
|
141
|
-
|
|
123
|
+
5. Check it:
|
|
142
124
|
|
|
143
125
|
```sh
|
|
144
126
|
npx paperlint lint
|
|
145
127
|
```
|
|
146
128
|
|
|
147
|
-
|
|
129
|
+
On the stub from step 3 the first run already catches something (output shortened):
|
|
148
130
|
|
|
149
|
-
```
|
|
150
|
-
papers/
|
|
151
|
-
error
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
3:19 warning `.05` has no leading zero — write `0.05` (IEEE / ISO 80000-1); `paperlint lint --fix` inserts it paper/leading-zero
|
|
155
|
-
|
|
156
|
-
✖ 2 problems (0 errors, 2 warnings)
|
|
157
|
-
0 errors and 2 warnings potentially fixable with the `--fix` option.
|
|
131
|
+
```text
|
|
132
|
+
papers/my-paper/paper.tex
|
|
133
|
+
1:1 error 1 column(s), agenticdev requires 2 — the wrong document class or class option pdf/geometry
|
|
134
|
+
1:1 error no font starts with `LinLibertine` (body text of agenticdev); the PDF has: CMR10, … pdf/fonts
|
|
135
|
+
8:4 warning `§` instead of the word «Section» — `paperlint lint --fix` writes it paper/section-word
|
|
158
136
|
```
|
|
159
137
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
`% eslint-disable-next-line paper/leading-zero -- quoted from the reviewer`.
|
|
138
|
+
`new` writes a format-neutral stub in plain `article`, and AgenticDev wants ACM's class. Make
|
|
139
|
+
the first line `\documentclass[sigconf]{acmart}`, build again, and the errors are gone.
|
|
163
140
|
|
|
164
|
-
###
|
|
141
|
+
### A paper you already have
|
|
165
142
|
|
|
166
|
-
|
|
167
|
-
`PIPELINE-STATUS.md`. You write the sizes yourself (`wc -c < file`):
|
|
143
|
+
paperlint finds a paper by its folder: `<papersDir>/<name>/`, with the main file named `paper.tex`.
|
|
168
144
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
bytes: 305412
|
|
175
|
-
source: versions/2026-07-22-submitted.tex
|
|
176
|
-
sourceBytes: 57210
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
From then on `paperlint lint` fails if that PDF goes missing or changes size
|
|
180
|
-
([`docs/rules.md`](docs/rules.md#the-scorecards-bytes-and-sourcebytes)).
|
|
145
|
+
1. Put the paper there — for example `papers/my-paper/paper.tex`, the rest of its files beside it. If
|
|
146
|
+
your paper folders already live elsewhere, say `thesis/`, [set `papersDir`](#-configuration) instead.
|
|
147
|
+
2. Run `npx paperlint new my-paper --venue <preset> --kind <kind>`. On an existing folder it only
|
|
148
|
+
adds the missing `paperlint.json` and `PIPELINE-STATUS.md`; it never touches `paper.tex`.
|
|
149
|
+
3. Build and lint, as above.
|
|
181
150
|
|
|
182
151
|
## 🧰 Commands
|
|
183
152
|
|
|
184
|
-
| command
|
|
185
|
-
|
|
|
186
|
-
| `npx paperlint init`
|
|
187
|
-
| `npx paperlint new my-paper
|
|
188
|
-
| `npx paperlint
|
|
189
|
-
| `npx paperlint
|
|
190
|
-
| `npx paperlint toolchain`
|
|
191
|
-
| `npx paperlint doctor`
|
|
192
|
-
| `npx paperlint --help`
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
153
|
+
| command | what it does |
|
|
154
|
+
| ----------------------------------------------------------- | ------------------------------------------------------------------------------ |
|
|
155
|
+
| `npx paperlint init` | sets the project up |
|
|
156
|
+
| `npx paperlint new my-paper --venue <preset> --kind <kind>` | creates a paper folder for that venue, or completes an existing one |
|
|
157
|
+
| `npx paperlint build <paper>` | compiles `paper.tex` to `paper.pdf`, measures it, checks the references online |
|
|
158
|
+
| `npx paperlint lint` | runs every check over your papers; `--fix` fixes what can be fixed |
|
|
159
|
+
| `npx paperlint toolchain` | installs TeX Live with the packages your venues need (~270 MB, ~3 min, once) |
|
|
160
|
+
| `npx paperlint doctor` | checks the setup and exits non-zero if something is miswired |
|
|
161
|
+
| `npx paperlint --help` | every command and flag |
|
|
162
|
+
|
|
163
|
+
## 🧠 Skills
|
|
164
|
+
|
|
165
|
+
You do not need to learn the skills' names: you ask Claude Code, and the matching skill starts.
|
|
166
|
+
`paper-pipeline` walks you through the stages; any skill also starts on its own when you ask for
|
|
167
|
+
what it does — "is this idea worth a paper?", "find me a venue for this". `init` installs them.
|
|
168
|
+
|
|
169
|
+
- **A go / no-go on your idea, with the reason.** `research-ideate`
|
|
170
|
+
- **A ranked list of venues that fit** — deadline, page limit, indexing. `find-venue`
|
|
171
|
+
- **A first draft from your results.** `draft-paper`
|
|
172
|
+
- **A hostile review before the real one.** `paper-adversarial-review`
|
|
173
|
+
- **A ready / not ready verdict before you submit**, worst problem first. `harden-paper`
|
|
174
|
+
- **Where your paper stands**, measured from the real build. `paper-status`
|
|
175
|
+
|
|
176
|
+
All 24, by stage: [`docs/skills.md`](docs/skills.md).
|
|
177
|
+
|
|
178
|
+
## 🔍 Lint and build
|
|
179
|
+
|
|
180
|
+
| | `paperlint build` | `paperlint lint` |
|
|
181
|
+
| ------ | -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
182
|
+
| needs | Node, TeX Live, the network | Node |
|
|
183
|
+
| does | compiles `paper.tex`, measures the PDF, checks each reference online (exists, right authors) | checks the source, and judges what build recorded: page limit, fonts, the reference results — offline |
|
|
184
|
+
| writes | `paper.pdf`, and in `_build/` the measurements and the reference results | nothing (`--fix`: the three fixable slips) |
|
|
185
|
+
|
|
186
|
+
- If `paper.pdf` or the bibliography changed since the last build, lint fails and tells you to rebuild.
|
|
187
|
+
- Lint also checks the pipeline's own records: `PIPELINE-STATUS.md`, reviews, notes on related
|
|
188
|
+
papers ([`docs/rules.md`](docs/rules.md)).
|
|
189
|
+
- The rules run on ESLint, so a deliberate exception is a comment on the line above:
|
|
190
|
+
`% eslint-disable-next-line paper/leading-zero -- quoted from the reviewer`.
|
|
191
|
+
- Errors fail the run; warnings only print, unless you pass `--max-warnings <n>`.
|
|
192
|
+
|
|
193
|
+
Every check: [`docs/rules.md`](docs/rules.md). How build compiles:
|
|
194
|
+
[`docs/configuration.md`](docs/configuration.md#how-paperlint-build-compiles-a-paper).
|
|
207
195
|
|
|
208
196
|
## 🧩 Configuration
|
|
209
197
|
|
|
@@ -211,81 +199,91 @@ Two levels, one file name, both optional:
|
|
|
211
199
|
|
|
212
200
|
```
|
|
213
201
|
paperlint.json the project: papersDir, rules, defaults for every paper
|
|
214
|
-
papers/my-paper/paperlint.json one paper: its venue, its kind, its own rules
|
|
202
|
+
papers/my-paper/paperlint.json one paper: its venue preset ("extends"), its kind, its own rules
|
|
215
203
|
```
|
|
216
204
|
|
|
217
|
-
`papersDir`
|
|
218
|
-
|
|
205
|
+
- `papersDir` is the folder that holds your paper folders; it defaults to `papers`.
|
|
206
|
+
- The paper's venue preset is its `"extends"` key — the one `new --venue` writes.
|
|
207
|
+
- A paper's `paperlint.json` overrides the project's, key by key.
|
|
208
|
+
- **An unknown key is an error**, so a typo cannot silently turn a setting off.
|
|
219
209
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
- A paper's file merges over the root's: its `extends` and `kind` win, its `rules` apply last.
|
|
225
|
-
- Only the paper files under `papersDir` are linted, never a `repro/` script beside a paper.
|
|
226
|
-
- An unknown key is an error, so a typo cannot silently turn a setting off.
|
|
227
|
-
|
|
228
|
-
Every key: [`docs/configuration.md`](docs/configuration.md).
|
|
210
|
+
Every key: [`docs/configuration.md`](docs/configuration.md). Already use ESLint for other files? See
|
|
211
|
+
[`docs/configuration.md`](docs/configuration.md#using-the-rules-from-an-existing-eslint-config).
|
|
229
212
|
|
|
230
|
-
###
|
|
213
|
+
### ➕ Add a venue that isn't listed
|
|
231
214
|
|
|
232
|
-
|
|
233
|
-
|
|
215
|
+
A venue preset is a small JSONC file: the preset it builds on, and the page limit of each kind of
|
|
216
|
+
paper. For an ACM workshop with a 4-page limit for short papers, `venues/my-workshop.jsonc`:
|
|
234
217
|
|
|
235
218
|
```jsonc
|
|
236
219
|
{
|
|
220
|
+
// page size, columns and fonts of the ACM two-column format
|
|
237
221
|
"extends": "paperlint:acm-sigconf",
|
|
238
|
-
"format": {
|
|
222
|
+
"format": {
|
|
223
|
+
// one entry per kind of paper the call for papers names
|
|
224
|
+
"kinds": {
|
|
225
|
+
// the limit from the call for papers, in pages, references not counted
|
|
226
|
+
"short": { "body_pages_max": 4 },
|
|
227
|
+
},
|
|
228
|
+
},
|
|
239
229
|
}
|
|
240
230
|
```
|
|
241
231
|
|
|
242
|
-
|
|
232
|
+
```sh
|
|
233
|
+
npx paperlint new my-paper --venue ./venues/my-workshop.jsonc --kind short
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
Give the path from where you run the command; `new` rewrites it relative to the paper's own
|
|
237
|
+
`paperlint.json`. A venue in another format: [`docs/rules.md`](docs/rules.md#writing-your-own-venue-preset).
|
|
243
238
|
|
|
244
239
|
## 🤖 Run it in CI
|
|
245
240
|
|
|
246
|
-
|
|
247
|
-
|
|
241
|
+
Two options:
|
|
242
|
+
|
|
243
|
+
| job | time | checks |
|
|
244
|
+
| -------------------------- | ----------------------------- | ------------------------------------------ |
|
|
245
|
+
| build, then lint | ~3 min first run, then cached | everything |
|
|
246
|
+
| lint only (`init` adds it) | seconds | the source; not pages, fonts or references |
|
|
247
|
+
|
|
248
|
+
Lint judges pages, fonts and references from what build measured, so the full job builds first:
|
|
249
|
+
|
|
250
|
+
```yaml
|
|
251
|
+
name: papers
|
|
252
|
+
on: [push, pull_request]
|
|
253
|
+
jobs:
|
|
254
|
+
papers:
|
|
255
|
+
runs-on: ubuntu-latest
|
|
256
|
+
steps:
|
|
257
|
+
- uses: actions/checkout@v4
|
|
258
|
+
- uses: actions/setup-node@v4
|
|
259
|
+
with:
|
|
260
|
+
node-version: 22
|
|
261
|
+
- run: npm ci
|
|
262
|
+
- uses: actions/cache@v4
|
|
263
|
+
with:
|
|
264
|
+
path: ~/.cache/paperlint/texlive
|
|
265
|
+
key: texlive-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
|
|
266
|
+
- run: npx paperlint toolchain
|
|
267
|
+
- run: npx paperlint build --all
|
|
268
|
+
- run: npx paperlint lint
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
Lint only — each paper then gets one warning that it was not built:
|
|
248
272
|
|
|
249
273
|
```yaml
|
|
250
274
|
- uses: zernie/paperlint@v3.0.0
|
|
251
275
|
with:
|
|
252
|
-
paths: papers
|
|
276
|
+
paths: papers # your papersDir
|
|
253
277
|
```
|
|
254
278
|
|
|
255
|
-
- Pin the tag of the version you installed: `npm ls paperlint` prints it.
|
|
256
|
-
- The step runs `paperlint lint`. It does not build, so CI needs no TeX Live.
|
|
257
|
-
|
|
258
279
|
## ❓ FAQ
|
|
259
280
|
|
|
260
281
|
**Does it install anything without asking?**
|
|
261
282
|
No. TeX Live comes only from `paperlint toolchain`, or when you say yes in `init` or `build`. On
|
|
262
283
|
Windows, install TeX Live yourself.
|
|
263
284
|
|
|
264
|
-
**Will `new` or `init` overwrite my files?**
|
|
265
|
-
No. They only add what is missing, and `init` keeps a `papersDir` you already declared.
|
|
266
|
-
|
|
267
|
-
**My venue isn't listed — what now?**
|
|
268
|
-
Write [a four-line preset](#another-venue) that extends the closest template family. For any ACM
|
|
269
|
-
venue, `paperlint:acm-sigconf` already checks the format, without a page limit.
|
|
270
|
-
|
|
271
|
-
**Do I need TeX Live just to lint?**
|
|
272
|
-
No. `paperlint lint` needs only Node. `paperlint build` needs TeX Live.
|
|
273
|
-
|
|
274
|
-
**What does a CI failure look like?**
|
|
275
|
-
The step fails, and its log lists each finding with file, line, check and message. It also fails
|
|
276
|
-
when it checked zero files, so a wrong `paths` shows up red.
|
|
277
|
-
|
|
278
285
|
**Several papers for different venues in one repo?**
|
|
279
|
-
Yes. Each paper names its own venue in its own `paperlint.json`.
|
|
280
|
-
|
|
281
|
-
**Where does my configuration live?**
|
|
282
|
-
In `paperlint.json` — at the project root (optional) and in each paper. Nothing goes into
|
|
283
|
-
`package.json`.
|
|
284
|
-
|
|
285
|
-
**Do I need Claude Code?**
|
|
286
|
-
No. The linter needs only Node. With Claude Code, `init` also links the skills and wires three
|
|
287
|
-
hooks into `.claude/settings.json`: one stops a shell command from writing to a paper file, two
|
|
288
|
-
remind the agent what is left after a paper edit ([`docs/install.md`](docs/install.md)).
|
|
286
|
+
Yes. Each paper names its own venue preset in its own `paperlint.json`.
|
|
289
287
|
|
|
290
288
|
**Does it change my paper?**
|
|
291
289
|
Only `paperlint lint --fix`, and only three rules: `paper/section-word` (`§` → Section),
|
|
@@ -293,12 +291,13 @@ Only `paperlint lint --fix`, and only three rules: `paper/section-word` (`§`
|
|
|
293
291
|
|
|
294
292
|
## 📚 Docs
|
|
295
293
|
|
|
296
|
-
- [`docs/
|
|
297
|
-
- [`docs/
|
|
298
|
-
- [`docs/
|
|
294
|
+
- [`docs/skills.md`](docs/skills.md) — every skill, by stage
|
|
295
|
+
- [`docs/install.md`](docs/install.md) — what `init` does, the hooks, package managers, troubleshooting
|
|
296
|
+
- [`docs/configuration.md`](docs/configuration.md) — every setting, how `build` compiles, using your own ESLint
|
|
297
|
+
- [`docs/rules.md`](docs/rules.md) — every check, venue presets, recording a submitted PDF
|
|
299
298
|
- [`docs/optional-rules.md`](docs/optional-rules.md) — checks only some venues need
|
|
300
299
|
- [`docs/toolchain.md`](docs/toolchain.md) — TeX Live, and Banal (HotCRP's page-geometry checker, GPL)
|
|
301
|
-
- [`CONTRIBUTING.md`](CONTRIBUTING.md) — how the package is tested and released
|
|
300
|
+
- [`CONTRIBUTING.md`](CONTRIBUTING.md) — how the package is tested and released, and adding a venue to it
|
|
302
301
|
|
|
303
302
|
## License
|
|
304
303
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-engine.d.ts","sourceRoot":"","sources":["../src/build-engine.ts"],"names":[],"mappings":"AAaA,OAAO,
|
|
1
|
+
{"version":3,"file":"build-engine.d.ts","sourceRoot":"","sources":["../src/build-engine.ts"],"names":[],"mappings":"AAaA,OAAO,EAML,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,KAAK,MAAM,EAEZ,MAAM,aAAa,CAAC;AACrB,OAAO,EAML,KAAK,aAAa,EACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,uBAAuB,CAAC;AAE/B,MAAM,WAAW,aAAa;IAC5B,2EAA2E;IAC3E,QAAQ,CAAC,GAAG,EAAE,eAAe,CAAC;IAC9B,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,QAAQ,EAA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AACpG,eAAO,MAAM,KAAK,GAAI,QAAQ,MAAM,GAAG,IAAI,KAAG,OAC6B,CAAC;AAkD5E;;;GAGG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,aAAa,CAAC,CAoBxB"}
|
package/dist/build-engine.js
CHANGED
|
@@ -11,7 +11,7 @@ import { spawnSync } from "node:child_process";
|
|
|
11
11
|
// eslint-disable-next-line boundaries/dependencies -- legacy I/O, moves behind a port in #76
|
|
12
12
|
import { homedir } from "node:os";
|
|
13
13
|
import { delimiter, join } from "node:path";
|
|
14
|
-
import { resolveEngine, probeTree, supportedPlatform, whichOnPath, } from "./engine.js";
|
|
14
|
+
import { resolveEngine, missingDependencies, probeTree, supportedPlatform, whichOnPath, } from "./engine.js";
|
|
15
15
|
import { UNSUPPORTED, cacheRoot, cachedTrees, ensureTexLive, usableTree, } from "./toolchain.js";
|
|
16
16
|
import { declaredUnion, mergeRequirements, } from "./tex-requirements.js";
|
|
17
17
|
/** The options a caller actually set — `undefined` must still get its default, so no plain spread. */
|
|
@@ -50,7 +50,11 @@ export function gatherFacts(o) {
|
|
|
50
50
|
const probes = cachedTrees(cacheRoot(o.env, o.home)).map((tree) => ({
|
|
51
51
|
label: `TeX Live ${tree.year} — paperlint cache (${tree.dir})`,
|
|
52
52
|
bin: tree.bin,
|
|
53
|
-
|
|
53
|
+
// Only a cache tree is asked for its dependencies: its tlmgr writes where we own.
|
|
54
|
+
missing: [
|
|
55
|
+
...probeTree(tree.bin, o.tex.packages, o.run),
|
|
56
|
+
...missingDependencies(tree.bin, o.run),
|
|
57
|
+
],
|
|
54
58
|
}));
|
|
55
59
|
const cache = usableTree(probes, (p) => p.missing.length === 0);
|
|
56
60
|
const dir = whichOnPath("pdflatex", o.env["PATH"]);
|
package/dist/build-engine.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-engine.js","sourceRoot":"","sources":["../src/build-engine.ts"],"names":[],"mappings":"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CHANGED
|
@@ -224,7 +224,8 @@ function latexPass(ctx, final, opts) {
|
|
|
224
224
|
if (r.error)
|
|
225
225
|
return null;
|
|
226
226
|
const exitCode = r.status ?? 1;
|
|
227
|
-
const
|
|
227
|
+
const written = readOr(join(ctx.paperDir, `${JOB}.log`), "latin1");
|
|
228
|
+
const log = unwrapLog(written ?? "");
|
|
228
229
|
return {
|
|
229
230
|
step: "latex",
|
|
230
231
|
final,
|
|
@@ -233,9 +234,24 @@ function latexPass(ctx, final, opts) {
|
|
|
233
234
|
after: hashes(ctx.paperDir),
|
|
234
235
|
markers: logMarkers(log),
|
|
235
236
|
bib: bibInput(ctx.paperDir),
|
|
236
|
-
errorLines: exitCode === 0
|
|
237
|
+
errorLines: exitCode === 0
|
|
238
|
+
? []
|
|
239
|
+
: written === null
|
|
240
|
+
? printed(r)
|
|
241
|
+
: errorExcerpt(log).map(fromLatin1),
|
|
237
242
|
};
|
|
238
243
|
}
|
|
244
|
+
/**
|
|
245
|
+
* The last lines pdflatex printed, for the run that wrote no log — it died before opening one (a
|
|
246
|
+
* format it cannot load, a missing TeX Live file). Marked by NO_LOG, which the report keys on.
|
|
247
|
+
*/
|
|
248
|
+
function printed(r) {
|
|
249
|
+
const lines = fromLatin1(`${String(r.stdout ?? "")}\n${String(r.stderr ?? "")}`)
|
|
250
|
+
.split("\n")
|
|
251
|
+
.filter((l) => l.trim());
|
|
252
|
+
return [NO_LOG, ...lines.slice(-8).map((l) => ` ${l}`)];
|
|
253
|
+
}
|
|
254
|
+
const NO_LOG = `pdflatex wrote no ${JOB}.log — the last lines it printed:`;
|
|
239
255
|
/** One bibtex run, on the input the `.aux` names BEFORE it runs, or null when it could not start. */
|
|
240
256
|
function bibtexPass(ctx, opts) {
|
|
241
257
|
const before = hashes(ctx.paperDir);
|
|
@@ -257,6 +273,9 @@ function bibtexPass(ctx, opts) {
|
|
|
257
273
|
export function compile(ctx) {
|
|
258
274
|
const history = [];
|
|
259
275
|
const opts = spawnOptions(ctx);
|
|
276
|
+
// Every log this loop reads is one its own pdflatex wrote. A pdflatex that dies before opening
|
|
277
|
+
// paper.log would otherwise have an earlier build's error quoted as this one's.
|
|
278
|
+
rmSync(join(ctx.paperDir, `${JOB}.log`), { force: true });
|
|
260
279
|
const runs = { latex: 0, bibtex: 0 };
|
|
261
280
|
for (;;) {
|
|
262
281
|
const step = nextStep(summarize(history));
|
|
@@ -304,7 +323,7 @@ export const compileStep = {
|
|
|
304
323
|
...(end.lines.length
|
|
305
324
|
? end.lines
|
|
306
325
|
: ["(no error line found in the log)"]),
|
|
307
|
-
`full log: ${log}
|
|
326
|
+
...(end.lines[0] === NO_LOG ? [] : [`full log: ${log}`]),
|
|
308
327
|
],
|
|
309
328
|
};
|
|
310
329
|
}
|