paperlint 18.2.1 → 18.3.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 (71) hide show
  1. package/.github/dependabot.yml +17 -0
  2. package/.github/workflows/ci.yml +30 -5
  3. package/CLAUDE.md +2 -1
  4. package/dist/domain/register.d.ts +1 -1
  5. package/dist/domain/register.d.ts.map +1 -1
  6. package/dist/domain/sentences.d.ts +3 -11
  7. package/dist/domain/sentences.d.ts.map +1 -1
  8. package/dist/domain/sentences.js +53 -8
  9. package/dist/domain/sentences.js.map +1 -1
  10. package/dist/eslint-rules/CLAUDE.md.spec.js +2 -2
  11. package/dist/eslint-rules/CLAUDE.md.spec.js.map +1 -1
  12. package/dist/folder-venue-rule.js +1 -1
  13. package/dist/readability.d.ts +12 -9
  14. package/dist/readability.d.ts.map +1 -1
  15. package/dist/readability.js +3 -3
  16. package/dist/readability.js.map +1 -1
  17. package/docs/design/paper-sources.md +1 -1
  18. package/docs/e2e.md +2 -2
  19. package/docs/optional-rules.md +2 -2
  20. package/docs/rules/pdf/body-size.md +1 -1
  21. package/docs/rules/tex/heading-case.md +2 -2
  22. package/docs/rules/tex/max-paragraph-numbers.md +13 -7
  23. package/docs/rules/tex/max-paragraph-words.md +17 -28
  24. package/docs/rules/tex/max-sentence-words.md +3 -2
  25. package/docs/rules/tex/negated-sentences.md +2 -2
  26. package/docs/rules/tex/register.md +1 -1
  27. package/docs/rules/tex/term-before-definition.md +1 -1
  28. package/docs/rules.md +3 -3
  29. package/docs/venues.md +1 -1
  30. package/docs/website.md +61 -5
  31. package/eslint-rules/CLAUDE.md +3 -3
  32. package/eslint-rules/CLAUDE.md.spec.ts +2 -2
  33. package/eslint.config.mjs +15 -4
  34. package/fixtures/real-papers.test.ts +24 -19
  35. package/package.json +4 -5
  36. package/presets/acm-sigconf.jsonc +1 -1
  37. package/presets/aidc-2026.jsonc +4 -4
  38. package/presets/aidc-2026.md +1 -1
  39. package/presets/ase-2026.md +1 -1
  40. package/presets/ieee-conference.jsonc +1 -1
  41. package/presets/msr-2027.jsonc +1 -1
  42. package/presets/neurips-style.jsonc +2 -2
  43. package/presets/neurips-style.md +1 -1
  44. package/presets/sp-2027.md +1 -1
  45. package/presets/venue-profile.schema.json +1 -1
  46. package/scripts/check.ts +9 -1
  47. package/scripts/coverage-config.test.ts +2 -0
  48. package/scripts/grow-real-papers/archive.test.ts +294 -0
  49. package/scripts/grow-real-papers/archive.ts +287 -0
  50. package/scripts/grow-real-papers/collect.test.ts +329 -0
  51. package/scripts/grow-real-papers/collect.ts +316 -0
  52. package/scripts/grow-real-papers/http.test.ts +95 -0
  53. package/scripts/grow-real-papers/http.ts +76 -0
  54. package/scripts/grow-real-papers/main.test.ts +295 -0
  55. package/scripts/grow-real-papers/main.ts +221 -0
  56. package/scripts/grow-real-papers/paper.test.ts +305 -0
  57. package/scripts/grow-real-papers/paper.ts +241 -0
  58. package/scripts/grow-real-papers/rules.test.ts +222 -0
  59. package/scripts/grow-real-papers/rules.ts +250 -0
  60. package/scripts/grow-real-papers/sources.test.ts +275 -0
  61. package/scripts/grow-real-papers/sources.ts +239 -0
  62. package/scripts/grow-real-papers/testkit.ts +79 -0
  63. package/src/domain/register.ts +1 -1
  64. package/src/domain/sentences.test.ts +128 -0
  65. package/src/domain/sentences.ts +60 -11
  66. package/src/folder-venue-rule.test.ts +1 -1
  67. package/src/folder-venue-rule.ts +1 -1
  68. package/src/readability.test.ts +82 -41
  69. package/src/readability.ts +12 -9
  70. package/src/register-bands.test.ts +4 -4
  71. package/src/rule-cases.test.ts +6 -6
@@ -10,6 +10,7 @@ A sentence of the body longer than `max` words (default 55, so a 56th word fires
10
10
 
11
11
  - Words are counted as [`tex/register`](register.md) counts them: a citation, a cross-reference or inline math is one word.
12
12
  - A sentence is cut by the one splitter every rule over the body uses (`src/domain/sentences.ts`): the sentence boundaries of `Intl.Segmenter`, with a break after an abbreviation undone. The abbreviations are `e.g.`, `i.e.`, `cf.`, `vs.`, `et al.`, `Fig.`, `Figs.`, `Sec.`, `Secs.`, `Tab.`, `Eq.`, `Eqs.`, `No.`, `App.`, `approx.`, `resp.`. A decimal (`2.5`) does not end a sentence.
13
+ - `Intl.Segmenter` never breaks before a lowercase word (rule SB8 of Unicode's UAX #29), so the splitter puts that break back: `16 GB. fp16 is …` is two sentences, and so is a sentence that opens with a `\citet`, a `\cref` or a macro that prints nothing, followed by a lowercase verb. A citation that opens a sentence this way counts in the sentence it opens. Before a lowercase word, a full stop also ends no sentence after a dotted abbreviation (`i.i.d.`, `w.r.t.`, `Ph.D.`), an initial (`Y.`), an ellipsis, `etc.`, `Appx.`, `Art.`, `Def.`, `Thm.`, `Lem.`, `Prop.`, `Alg.`, `Ch.`, `Vol.`, `pp.`, `Ref.`, `Refs.`, `refs.`, `Eqn.`, `Eqns.`, `eqn.`, `eq.`, `eqs.`, `Co.`, `Inc.`, `Ltd.`, `Corp.`, `avg.`, `func.` and `dim.`, or when a bracket follows it (`(Disp.) is`).
13
14
  - A sentence never crosses a paragraph, a list item or a footnote.
14
15
  - Scope: the body's prose, as for [`tex/max-paragraph-words`](max-paragraph-words.md).
15
16
 
@@ -31,7 +32,7 @@ See [optional rules](../../optional-rules.md).
31
32
  A very long sentence loses its subject before its verb, and a skimming reviewer stops reading it.
32
33
 
33
34
  The default is a general one, not measured per venue. It has not been checked against the accepted
34
- papers of `fixtures/accepted-papers/` in this version; the earlier draft of the issue recorded that
35
+ papers of `fixtures/real-papers/accepted/` in this version; the earlier draft of the issue recorded that
35
36
  every accepted paper fires at least one of the two sibling ceilings, which is why both are off.
36
37
 
37
38
  ## Examples
@@ -46,7 +47,7 @@ One sentence of sixty words that never reaches its full stop ... % fires: o
46
47
 
47
48
  ## What it does not check
48
49
 
49
- An abbreviation outside the list above, such as `etc.` or `Dr.`, followed by a capital letter, ends a sentence early, so a long sentence may be seen as two. A `\num…` macro leaves no word in the parsed prose, so it is not counted as a word.
50
+ An abbreviation outside the lists above, such as `etc.` or `Dr.` followed by a capital letter, or a paper's own truncation (`Comp.`, `Det.`) followed by a lowercase word, ends a sentence early, so a long sentence may be seen as two. A `\num…` macro leaves no word in the parsed prose, so it is not counted as a word.
50
51
 
51
52
  ## How to fix
52
53
 
@@ -52,7 +52,7 @@ spliced from its recorded build (2026-11-19):
52
52
  | `llm-splained-acsac25` (ACSAC 2025) | 454 | 81 | 17.8% |
53
53
  | `agenticdev-acm26` (ours, ACM) | 171 | 63 | 36.8% |
54
54
 
55
- Over the 106 arXiv preprints of `fixtures/arxiv-papers/` with more than 2 000 words of body, the
55
+ Over the 106 arXiv preprints of `fixtures/real-papers/preprints/` with more than 2 000 words of body, the
56
56
  share runs from 2.6% to 38.7%, median 13.3%, and 26 of them stand above AIDC's band. The measure
57
57
  separates a paper that argues by negation from the venue's accepted ones; whether a given paper
58
58
  should change is the author's call.
@@ -80,7 +80,7 @@ No rule options. The band is the preset's: each anchor in `register.anchors` rec
80
80
 
81
81
  The band is the anchors' range of shares widened at each end by two Poisson standard deviations of
82
82
  the anchor standing there, as for the other band rules. For `paperlint:aidc-2026` the anchors are the five
83
- accepted ACSAC papers above: their shares run **5.2–17.8%**, and the band is **2.9–21.8%**.
83
+ accepted ACSAC papers above: their shares run **5.2–17.8%**, and the band is **2.9–21.7%**.
84
84
  `src/register-bands.test.ts` re-measures every anchor that has a fixture. An anchor without the two
85
85
  fields sets no band, so a preset written before this rule leaves it silent.
86
86
 
@@ -35,7 +35,7 @@ to a post's register, not one a little above the median. Mean sentence length di
35
35
  two groups. The share of sentences under eight words did not either, once measured on the parse
36
36
  tree: 3.3–7.3% on the two accepted papers in this repository's corpus, 5.1–7.0% on three of ours.
37
37
 
38
- On the corpus (`fixtures/accepted-papers/`) the rule measures:
38
+ On the corpus (`fixtures/real-papers/accepted/`) the rule measures:
39
39
 
40
40
  | paper | per 1000 words |
41
41
  | ----------------------------------- | -------------: |
@@ -54,7 +54,7 @@ the findings are italics used for stress. See [optional rules](../../optional-ru
54
54
  ## Why it is off by default
55
55
 
56
56
  The rule is right only for a paper that marks its definitions with the commands it reads. On the
57
- real-papers corpus (`fixtures/accepted-papers/`, `fixtures/arxiv-papers/`; 114 papers, each with the
57
+ real-papers corpus (`fixtures/real-papers/accepted/`, `fixtures/real-papers/preprints/`; 114 papers, each with the
58
58
  files its build recorded spliced in), with the default options, measured 2026-11-19:
59
59
 
60
60
  | | papers | findings |
package/docs/rules.md CHANGED
@@ -48,9 +48,9 @@ reads and when it fails. Errors fail `paperlint lint`; warnings print and do not
48
48
  | [`tex/contrast-frames`](rules/tex/contrast-frames.md) | opt-in: `paperlint:writing` | `paper.tex` and the files it includes → `paperlint.json` | contrast frames (_X, not Y_, _not X but Y_, _rather than_, _instead of_, _as opposed to_) per 10,000 words fall outside the band the venue preset's anchors set (AIDC: 0–10.4, from five accepted ACSAC papers); above it, each frame is reported too — [page](rules/tex/contrast-frames.md) |
49
49
  | [`tex/claim-emphasis`](rules/tex/claim-emphasis.md) | opt-in: `paperlint:writing` | `paper.tex` and the files it includes → `paperlint.json` | claims set in bold inside a sentence (six words or more, or holding a number; not a term, not a label opening a paragraph) per 10,000 words fall outside the preset's band (AIDC: 0–17.8); above it, each is reported too — [page](rules/tex/claim-emphasis.md) |
50
50
  | [`tex/relation-markers`](rules/tex/relation-markers.md) | opt-in: `paperlint:writing` | `paper.tex` and the files it includes → `paperlint.json` | words that name how a sentence relates to the one before (_because_, _therefore_, _however_, _for example_ …) per 10,000 words fall outside the preset's band (AIDC: 25.4–135.0) — the floor that catches relations left to infer — [page](rules/tex/relation-markers.md) |
51
- | [`tex/negated-sentences`](rules/tex/negated-sentences.md) | opt-in: `paperlint:writing` | `paper.tex` and the files it includes → `paperlint.json` | the share of body sentences holding a negator (_not_, _no_, _never_, _without_ …) falls outside the preset's band (AIDC: 2.9–21.8%, from five accepted ACSAC papers); _X, not Y_ is counted here and by `tex/contrast-frames` — [page](rules/tex/negated-sentences.md) |
52
- | [`tex/max-paragraph-words`](rules/tex/max-paragraph-words.md) | opt-in: `paperlint:writing` | `paper.tex` and the files it includes | a paragraph of the body runs past `max` words (default 150) — a wall of text; no call for papers states a limit — [page](rules/tex/max-paragraph-words.md) |
53
- | [`tex/max-paragraph-numbers`](rules/tex/max-paragraph-numbers.md) | opt-in: `paperlint:writing` | `paper.tex` and the files it includes | a paragraph of the body holds more than `max` numbers (default 8) — a table written in prose — [page](rules/tex/max-paragraph-numbers.md) |
51
+ | [`tex/negated-sentences`](rules/tex/negated-sentences.md) | opt-in: `paperlint:writing` | `paper.tex` and the files it includes → `paperlint.json` | the share of body sentences holding a negator (_not_, _no_, _never_, _without_ …) falls outside the preset's band (AIDC: 2.9–21.7%, from five accepted ACSAC papers); _X, not Y_ is counted here and by `tex/contrast-frames` — [page](rules/tex/negated-sentences.md) |
52
+ | [`tex/max-paragraph-words`](rules/tex/max-paragraph-words.md) | opt-in: `paperlint:writing` | `paper.tex` and the files it includes | a paragraph of the body runs past `max` words (default 250, the accepted papers' 99th percentile) — a wall of text; no call for papers states a limit — [page](rules/tex/max-paragraph-words.md) |
53
+ | [`tex/max-paragraph-numbers`](rules/tex/max-paragraph-numbers.md) | opt-in: `paperlint:writing` | `paper.tex` and the files it includes | a paragraph of the body holds more than `max` numbers (default 10, the accepted papers' 99th percentile) — a table written in prose — [page](rules/tex/max-paragraph-numbers.md) |
54
54
  | [`tex/max-sentence-words`](rules/tex/max-sentence-words.md) | opt-in: `paperlint:writing` | `paper.tex` and the files it includes | a sentence of the body runs past `max` words (default 55) — [page](rules/tex/max-sentence-words.md) |
55
55
  | [`tex/max-caption-words`](rules/tex/max-caption-words.md) | opt-in: `paperlint:writing` | `paper.tex` and the files it includes | a caption runs past `max` words (default 100), or one of its sentences past `maxSentence` (default 40) — [page](rules/tex/max-caption-words.md) |
56
56
  | [`tex/term-before-definition`](rules/tex/term-before-definition.md) | optional; off until a project turns it on | `paper.tex` and the files it includes | a term the body defines (an `\emph` phrase of 1–4 words, by default) is used before that definition; reported once, at the first earlier use — [page](rules/tex/term-before-definition.md) |
package/docs/venues.md CHANGED
@@ -109,7 +109,7 @@ Venues we have come across in this repository's work and not added: each has a s
109
109
  | ICLR 2027 | — | measured from its call and author kit | statements its call keeps out of the page limit stand before the references and count as body (`body_ends_before`, #544) |
110
110
  | IJCAI 2027 | — | measured from its call and author kit | the same as ICLR (#544) |
111
111
  | NeurIPS 2026, its Evaluations & Datasets and Position Paper tracks | — | the 2026 call page, beside the main track (`neurips-2026.md`) | their own calls, not read: on request |
112
- | NeurIPS 2026 workshops: «Who Verifies the Agents?», Interp4Discovery, TAE (Trust-AI-Eval) | NeurIPS 2026 | `fixtures/arxiv-papers/2611.08666v1`, `2611.09818v1`, `2611.09147v1` | on request; they load NeurIPS's style file, whose kit has workshop options (`dblblindworkshop`, `sglblindworkshop`) |
112
+ | NeurIPS 2026 workshops: «Who Verifies the Agents?», Interp4Discovery, TAE (Trust-AI-Eval) | NeurIPS 2026 | `fixtures/real-papers/preprints/2611.08666v1`, `2611.09818v1`, `2611.09147v1` | on request; they load NeurIPS's style file, whose kit has workshop options (`dblblindworkshop`, `sglblindworkshop`) |
113
113
  | ICML 2027, its position paper track | — | the ICML 2027 call (`icml-2027.md`) | its call is not published |
114
114
  | AAAI-27, its AI Alignment track | — | the AAAI-27 call (`aaai-2027.md`) | on request: the main track's page limit, its own dates |
115
115
 
package/docs/website.md CHANGED
@@ -1,10 +1,66 @@
1
1
  # Website
2
2
 
3
3
  The project's domain is **[paperlint.dev](https://paperlint.dev)**, registered in November 2026
4
- through Vercel. No site is deployed on it yet: the first version is
5
- [#342](https://github.com/zernie/paperlint/issues/342).
4
+ through Vercel. The site is `site/`: a static Next.js export, built from this repository
5
+ ([#342](https://github.com/zernie/paperlint/issues/342)). The design and what the page may claim are in
6
+ [`site/CLAUDE.md`](../site/CLAUDE.md).
6
7
 
7
8
  - `.dev` is on the HSTS preload list, so browsers only open it over HTTPS: the site needs a
8
- certificate from its first deploy.
9
- - Until the site exists, the npm page links to the GitHub README: `package.json` sets no
10
- `homepage`, only `repository`.
9
+ certificate from its first deploy. Vercel issues one for a domain it serves.
10
+ - Until the site is live, the npm page links to the GitHub README: `package.json` sets no
11
+ `homepage`, only `repository`. Add `"homepage": "https://paperlint.dev"` once the domain serves the
12
+ page.
13
+
14
+ ## Where its content comes from
15
+
16
+ `npm run site:build` installs `site/`'s own dependencies, runs its gates (Steiger and ESLint, `tsc`,
17
+ vitest with 100% coverage of the pure logic) and then `next build`, which writes plain HTML to
18
+ `site/out/`. Vercel runs only `next build`; the gates run in the `site` CI job. At build time the page
19
+ reads:
20
+
21
+ | what the page shows | read from |
22
+ | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ |
23
+ | the install commands, in "How do I start?" | the first `sh` block under "A new paper" in `README.md` |
24
+ | the first two findings of checkpoint 01 | the `text` block after "the first run already catches something" in `README.md`, explained in `site/src/entities/finding/model/explain.ts` |
25
+ | the headline's venue names | the "Supported venues" table in `README.md` |
26
+ | the venue grid, one column per field | "Editions, by field" and "Families" in `docs/venues.md`, each series' `"name"` in `presets/`, the README's table for format and limits |
27
+ | "An aid, not a guarantee" | the README's quote of that name |
28
+ | the paper folder in the journey | the generated tree in `docs/layout.md` |
29
+ | every other finding in the journey | quoted in `site/src/entities/finding/model/findings.ts` from the file it names |
30
+
31
+ When one of these is gone or reshaped, the build throws and names it, so the `site` CI job fails
32
+ rather than the page losing a section. `findings.test.ts` beside it fails when a quoted finding is no
33
+ longer in its source file.
34
+
35
+ ## Deploying on Vercel
36
+
37
+ The project and the domain are the maintainer's Vercel account. Once:
38
+
39
+ 1. **Add New → Project**, import `zernie/paperlint`.
40
+ 2. **Root Directory**: `site`. Framework Preset: Next.js (detected). Leave the build and output
41
+ commands at their defaults: `next.config.ts` sets `output: "export"`.
42
+ 3. The build reads `../README.md` and `../docs/`: keep **Include files outside the Root Directory in
43
+ the Build Step** on, if the settings show it.
44
+ 4. **Deploy**, then **Settings → Domains → Add** `paperlint.dev` (and `www.paperlint.dev`, redirecting
45
+ to it). The domain was bought through Vercel, so its DNS is already there.
46
+ 5. Open `https://paperlint.dev` and check the certificate.
47
+
48
+ ## Production on every push to `main`; previews only on request
49
+
50
+ `site/vercel.json` sets `git.deploymentEnabled` to `{ "**": false, "main": true }`: a push to `main`
51
+ deploys production, and a push to any other branch, or a pull request, deploys nothing. Vercel's
52
+ Git configuration docs: «If a branch matches multiple rules and at least one rule is true, a
53
+ deployment will occur», so `main` deploys and nothing else does. The pattern is `**`, not `*`:
54
+ minimatch's `*` does not match a `/`, so a branch such as `feat/site-landing` would match no rule.
55
+ The maintainer decided this on 2026-11-19. The Hobby plan has no project-level switch: Vercel's
56
+ deployment policies need Pro (`pro_plan_required`, measured), so the switch lives in the repository.
57
+
58
+ On the maintainer's request only:
59
+
60
+ - **A preview of a branch**: `vercel deploy` from `site/` on that branch, or the Vercel API's
61
+ create-deployment with the branch as its git source (an agent uses the Vercel MCP tool).
62
+ - **Production without a push to `main`**: the same with `--prod`, or `target: "production"`.
63
+
64
+ A branch cut before `site/` reached `main` has no `site/vercel.json`, so Vercel still tries it and
65
+ fails with «The specified Root Directory "site" does not exist»; that status is not the pull
66
+ request's.
@@ -1,4 +1,4 @@
1
- <!-- vigiles:sha256:e0c35e8beaa0bd9b compiled from eslint-rules/CLAUDE.md.spec.ts -->
1
+ <!-- vigiles:sha256:75393007efd6bb96 compiled from eslint-rules/CLAUDE.md.spec.ts -->
2
2
 
3
3
  # CLAUDE.md
4
4
 
@@ -14,8 +14,8 @@ that file's header.
14
14
  | --- | --- |
15
15
  | **Both halves** (root `CLAUDE.md`), for every registered rule | `src/rule-cases.test.ts` fails on a registered rule with no cases |
16
16
  | **One rule, one requirement**: two checks with different reasons to switch them off are two rules | review |
17
- | **A venue requirement is validated on real accepted papers** of that venue, built to PDF, with the ground truth established independently | review; the papers are in `fixtures/accepted-papers/README.md` |
18
- | **Quiet on correct real papers**: every rule runs over the 6 accepted papers and the 108 arXiv preprints of `fixtures/arxiv-papers/README.md`, and a finding not in a paper's baseline fails the test. Read each new finding and decide: a real defect in the paper → re-record the baseline and say so in the PR; a false alarm → fix the rule, never the baseline. | `fixtures/real-papers.test.ts` |
17
+ | **A venue requirement is validated on real accepted papers** of that venue, built to PDF, with the ground truth established independently | review; the papers are in `fixtures/real-papers/accepted/README.md` |
18
+ | **Quiet on correct real papers**: every rule runs over the 6 accepted papers and the 108 arXiv preprints of `fixtures/real-papers/preprints/README.md`, and a finding not in a paper's baseline fails the test. Read each new finding and decide: a real defect in the paper → re-record the baseline and say so in the PR; a false alarm → fix the rule, never the baseline. | `fixtures/real-papers.test.ts` |
19
19
  | **Its page**, `docs/rules/<group>/<rule>.md`, and `meta.docs.url` pointing at it | `src/rule-docs.test.ts`; its `AWAITING_PAGE` list only shrinks |
20
20
  | **Loud on an empty input set**: a rule that matched no files must not report like one that passed | `scripts/rules-see-files.mjs`, per rule and not per glob, in `npm run check` |
21
21
 
@@ -14,8 +14,8 @@ that file's header.`,
14
14
  | --- | --- |
15
15
  | **Both halves** (root \`CLAUDE.md\`), for every registered rule | ${file("src/rule-cases.test.ts")} fails on a registered rule with no cases |
16
16
  | **One rule, one requirement**: two checks with different reasons to switch them off are two rules | review |
17
- | **A venue requirement is validated on real accepted papers** of that venue, built to PDF, with the ground truth established independently | review; the papers are in ${file("fixtures/accepted-papers/README.md")} |
18
- | **Quiet on correct real papers**: every rule runs over the 6 accepted papers and the 108 arXiv preprints of ${file("fixtures/arxiv-papers/README.md")}, and a finding not in a paper's baseline fails the test. Read each new finding and decide: a real defect in the paper → re-record the baseline and say so in the PR; a false alarm → fix the rule, never the baseline. | ${file("fixtures/real-papers.test.ts")} |
17
+ | **A venue requirement is validated on real accepted papers** of that venue, built to PDF, with the ground truth established independently | review; the papers are in ${file("fixtures/real-papers/accepted/README.md")} |
18
+ | **Quiet on correct real papers**: every rule runs over the 6 accepted papers and the 108 arXiv preprints of ${file("fixtures/real-papers/preprints/README.md")}, and a finding not in a paper's baseline fails the test. Read each new finding and decide: a real defect in the paper → re-record the baseline and say so in the PR; a false alarm → fix the rule, never the baseline. | ${file("fixtures/real-papers.test.ts")} |
19
19
  | **Its page**, \`docs/rules/<group>/<rule>.md\`, and \`meta.docs.url\` pointing at it | ${file("src/rule-docs.test.ts")}; its \`AWAITING_PAGE\` list only shrinks |
20
20
  | **Loud on an empty input set**: a rule that matched no files must not report like one that passed | ${file("scripts/rules-see-files.mjs")}, per rule and not per glob, in \`npm run check\` |
21
21
 
package/eslint.config.mjs CHANGED
@@ -575,7 +575,7 @@ const TYPESCRIPT_ONLY = [
575
575
  "test/*.{js,mjs,cjs}",
576
576
  "test/e2e/**/*.{js,mjs,cjs}",
577
577
  "test/fixtures/layers/src/**/*.{js,mjs,cjs}",
578
- "fixtures/accepted-papers/**/*.{js,mjs,cjs}",
578
+ "fixtures/real-papers/accepted/**/*.{js,mjs,cjs}",
579
579
  "skills/paper-pipeline/scripts/fixtures/**/*.{js,mjs,cjs}",
580
580
  "skills/plan-paper-timeline/fixtures/**/*.{js,mjs,cjs}",
581
581
  ];
@@ -601,13 +601,19 @@ export default [
601
601
  ignores: [
602
602
  ".tmp-stages-src-*/",
603
603
  "fixtures/.tmp-*/",
604
- // Other people's papers (fixtures/arxiv-papers/README.md): judged by the real-papers test against a
604
+ // Other people's papers (fixtures/real-papers/preprints/README.md): judged by the real-papers test against a
605
605
  // baseline, not by this repository's own lint.
606
- "fixtures/arxiv-papers/",
607
- "fixtures/venue-papers/",
606
+ "fixtures/real-papers/preprints/",
607
+ // The camera-ready papers are arXiv ids; the six older accepted papers (names, not ids) stay linted.
608
+ "fixtures/real-papers/accepted/[0-9]*/",
608
609
  "docs/prior-art/repro/",
609
610
  "dist/",
610
611
  "skills/*/scripts/*.js",
612
+ // paperlint.dev (site/CLAUDE.md) is its own project with its own install and its own lint
613
+ // (site/eslint.config.mjs: typed TypeScript, Tailwind tokens, Steiger), run by the `site` CI
614
+ // job. ESLint 10 judges a file by the config nearest to it, so a file under site/ named on
615
+ // this command line is judged by site's config, CLAUDE.md.spec.ts included.
616
+ "site/",
611
617
  ],
612
618
  },
613
619
  // 🔴 THE PACKAGE'S TYPESCRIPT, and before 2026-09-24 no block matched it — the same silent
@@ -980,6 +986,11 @@ export default [
980
986
  // sets that rule for JavaScript today; being last keeps it that way).
981
987
  {
982
988
  files: TYPESCRIPT_ONLY,
989
+ // The collector that chose the accepted papers' second batch, committed as the record of that
990
+ // run (fixtures/real-papers/accepted/README.md, «Growing this set without bias»): JavaScript
991
+ // because it is evidence, and it says so at its top for local/js-needs-reason. Rewriting it in
992
+ // TypeScript, tested, is a change of its own; every other rule still lints it.
993
+ ignores: ["fixtures/real-papers/accepted/sampling/*.mjs"],
983
994
  rules: {
984
995
  "no-restricted-syntax": [
985
996
  "error",
@@ -1,13 +1,13 @@
1
1
  /**
2
- * Every rule, on every real paper of the corpus, in ONE run of the CLI: the six accepted papers of
3
- * `accepted-papers/`, the arXiv preprints of `arxiv-papers/` (its README says what they are, and
4
- * why all of them run) and the accepted camera-ready papers of `venue-papers/`, each linted against
5
- * the venue that accepted it. The subject is the corpus as one object: each directory of those
6
- * folders is a paper with its own `baseline.json`, so a paper added without a baseline fails here.
2
+ * Every rule, on every real paper of the corpus, in ONE run of the CLI: the accepted papers of
3
+ * `real-papers/accepted/` (published; the calibration yardstick) and the arXiv preprints of
4
+ * `real-papers/preprints/` (drafts; `real-papers/README.md` says what each folder answers). The
5
+ * subject is the corpus as one object: each directory of those folders is a paper with its own
6
+ * `baseline.json`, so a paper added without a baseline fails here.
7
7
  *
8
8
  * A rule that says MORE about a real paper than recorded has gained a false positive until shown
9
9
  * otherwise; a rule that goes fully quiet without the recording being updated has died. A partial
10
- * drop is what a fix looks like. The comparison is `accepted-papers/baseline.ts`, the one the install
10
+ * drop is what a fix looks like. The comparison is `real-papers/baseline.ts`, the one the install
11
11
  * e2e uses too, not a second copy.
12
12
  *
13
13
  * One `paperlint lint --json` over a temporary project holding every paper under `papers/`, not one
@@ -36,21 +36,22 @@ import {
36
36
  countByPaper,
37
37
  RECORDED_OPT_IN,
38
38
  recordedFindings,
39
- } from "./accepted-papers/baseline.ts";
39
+ } from "./real-papers/baseline.ts";
40
40
 
41
41
  const HERE = dirname(fileURLToPath(import.meta.url));
42
- /** The accepted papers, by name: the ones whose register is recorded below. */
43
- const ACCEPTED = readdirSync(join(HERE, "accepted-papers")).filter((name) =>
44
- statSync(join(HERE, "accepted-papers", name)).isDirectory(),
45
- );
46
- const FOLDERS = ["accepted-papers", "arxiv-papers", "venue-papers"].map((f) =>
47
- join(HERE, f),
48
- );
42
+ const ACCEPTED_DIR = join(HERE, "real-papers", "accepted");
43
+ const FOLDERS = [ACCEPTED_DIR, join(HERE, "real-papers", "preprints")];
44
+
45
+ /** The directories of a folder that are not papers: the record of how `accepted/` was sampled. */
46
+ const NOT_PAPERS: ReadonlySet<string> = new Set(["sampling"]);
49
47
 
50
48
  /** Every paper: its directory name (unique across the folders) and where it is. */
51
49
  const PAPERS = FOLDERS.flatMap((root) =>
52
50
  readdirSync(root)
53
- .filter((name) => statSync(join(root, name)).isDirectory())
51
+ .filter(
52
+ (name) =>
53
+ !NOT_PAPERS.has(name) && statSync(join(root, name)).isDirectory(),
54
+ )
54
55
  .map((name) => ({ name, dir: join(root, name) })),
55
56
  );
56
57
 
@@ -93,7 +94,8 @@ const MEASURED_ON = "2026-11-19T12:00:00Z";
93
94
  describe("every real paper, in one run", () => {
94
95
  it(
95
96
  "says no more than recorded, and no recorded rule has gone quiet",
96
- { timeout: 10 * 60_000 },
97
+ // 206 papers linted in 582.7 s on 2026-11-19, in one run: 10 minutes was no longer enough.
98
+ { timeout: 20 * 60_000 },
97
99
  async () => {
98
100
  vi.setSystemTime(MEASURED_ON);
99
101
  const found = await lintAll().finally(() => vi.useRealTimers());
@@ -121,12 +123,15 @@ const CONJUNCTION_STARTS_PER_1000: Readonly<Record<string, string>> = {
121
123
  "secure-acsac24": "0.00",
122
124
  };
123
125
 
124
- describe.each(ACCEPTED)("tex/register on the accepted paper %s", (name) => {
125
- const file = join(HERE, "accepted-papers", name, "paper.tex");
126
+ /** The six papers whose register is recorded, named: the other papers of `accepted/` are not among them. */
127
+ const ACCEPTED_REGISTER_PAPERS = Object.keys(CONJUNCTION_STARTS_PER_1000);
128
+
129
+ describe.each(ACCEPTED_REGISTER_PAPERS)("tex/register on the accepted paper %s", (name) => {
130
+ const file = join(ACCEPTED_DIR, name, "paper.tex");
126
131
  const m = measureRegister(
127
132
  latexReader.bodyProse(
128
133
  readPaper(file, readFileSync(file, "utf8"), {
129
- files: withRecord(nodeFiles, join(HERE, "accepted-papers", name)),
134
+ files: withRecord(nodeFiles, join(ACCEPTED_DIR, name)),
130
135
  latex: latexReader,
131
136
  codec: sourcesCodec,
132
137
  }).text,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "paperlint",
3
- "version": "18.2.1",
3
+ "version": "18.3.0",
4
4
  "description": "A linter for scientific papers written in LaTeX: catches mistakes before you submit to a conference or journal.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -19,7 +19,8 @@
19
19
  "pipeline": "node scripts/pipeline.ts",
20
20
  "refresh-deadlines": "node --conditions=paperlint-source scripts/refresh-deadlines/main.ts",
21
21
  "fmt": "prettier --write .",
22
- "fmt:check": "prettier --check ."
22
+ "fmt:check": "prettier --check .",
23
+ "site:build": "npm ci --prefix site && npm run lint --prefix site && npm run typecheck --prefix site && npm run test --prefix site && npm run build --prefix site"
23
24
  },
24
25
  "dependencies": {
25
26
  "@eslint/markdown": "^8.0.3",
@@ -123,11 +124,9 @@
123
124
  "eslint-rules",
124
125
  "eslint.config.mjs",
125
126
  "fixtures",
126
- "!fixtures/accepted-papers",
127
- "!fixtures/arxiv-papers",
127
+ "!fixtures/real-papers",
128
128
  "!fixtures/arxiv-manifest.json",
129
129
  "!fixtures/arxiv-fetch.ts",
130
- "!fixtures/venue-papers",
131
130
  "!fixtures/venue-manifest.json",
132
131
  "hooks",
133
132
  "lib",
@@ -80,7 +80,7 @@
80
80
  "body_pt": 9,
81
81
  // banal measures the MODE of the rendered text, not the declared size (measured 08-26: 9.30 at
82
82
  // acmart's declared 9). Hence the tolerance: banal reads 0.3 pt high on every template measured
83
- // (fixtures/accepted-papers/body-size.json), and 0.5 absorbs that while a paper one size off is
83
+ // (fixtures/real-papers/accepted/body-size.json), and 0.5 absorbs that while a paper one size off is
84
84
  // still reported.
85
85
  "body_pt_tol": 0.5,
86
86
 
@@ -86,7 +86,7 @@
86
86
 
87
87
  // THE REGISTER OF THE BODY IS JUDGED AGAINST ACSAC, AIDC'S PARENT CONFERENCE: AIDC 2026 is the
88
88
  // workshop's first edition, so it has no accepted papers yet, and it uses ACSAC's template. The
89
- // anchors are the five accepted ACSAC papers in fixtures/accepted-papers/, measured by paperlint's
89
+ // anchors are the five accepted ACSAC papers in fixtures/real-papers/accepted/, measured by paperlint's
90
90
  // own counters on their LaTeX source (tex/contrast-frames, tex/claim-emphasis, tex/relation-markers,
91
91
  // tex/negated-sentences).
92
92
  // src/register-bands.test.ts re-measures every anchor that has a fixture and requires these exact
@@ -97,7 +97,7 @@
97
97
  // relation markers anchors 39.4–112.8 band 25.4–135.0
98
98
  // and, as a percent of the body's sentences (tex/negated-sentences). All four rules are off by
99
99
  // default and judge these bands only when a paper turns on the set paperlint:writing:
100
- // negated sentences anchors 5.2–17.8% band 2.9–21.8%
100
+ // negated sentences anchors 5.2–17.8% band 2.9–21.7%
101
101
  "register": {
102
102
  "anchors": [
103
103
  {
@@ -106,7 +106,7 @@
106
106
  "contrast_frames": 1,
107
107
  "claim_emphasis": 8,
108
108
  "relation_markers": 31,
109
- "sentences": 402,
109
+ "sentences": 405,
110
110
  "negated_sentences": 21,
111
111
  },
112
112
  {
@@ -124,7 +124,7 @@
124
124
  "contrast_frames": 4,
125
125
  "claim_emphasis": 1,
126
126
  "relation_markers": 84,
127
- "sentences": 460,
127
+ "sentences": 461,
128
128
  "negated_sentences": 82,
129
129
  },
130
130
  {
@@ -67,7 +67,7 @@ See `docs/rules/format/page-limit.md`.
67
67
  - **The register of the body** (`register`): the workshop's first edition has no accepted papers,
68
68
  so the bands of `tex/contrast-frames`, `tex/claim-emphasis`, `tex/relation-markers` and
69
69
  `tex/negated-sentences` are set by five accepted ACSAC papers on the same template, in
70
- `fixtures/accepted-papers/`. The four rules are off by default, here too; the opt-in set
70
+ `fixtures/real-papers/accepted/`. The four rules are off by default, here too; the opt-in set
71
71
  `paperlint:writing` turns them on ([optional rules](../docs/optional-rules.md)).
72
72
 
73
73
  ## What the preset resolves to
@@ -142,7 +142,7 @@ Statement}`, the title exactly, after the last section of the body (`tex/require
142
142
  things. The year is the id's: this preset is the 2026 edition. AgenticDev names this preset as its `parent`, so an
143
143
  AgenticDev paper may say «ASE 2026».
144
144
  - **Not encoded**: the register of the body (no accepted ASE paper is in
145
- `fixtures/accepted-papers/` to anchor `tex/contrast-frames` and its siblings), the «experience
145
+ `fixtures/real-papers/accepted/` to anchor `tex/contrast-frames` and its siblings), the «experience
146
146
  paper» phrase, and the submission form's fields (no logged-in read of the form was made).
147
147
 
148
148
  ## Not verified
@@ -66,7 +66,7 @@
66
66
 
67
67
  // The class sets the bibliography in \footnotesize, 8 pt at 10pt and at 9pt (IEEEtran.cls,
68
68
  // \thebibliography). Measured 2026-09-29 on the four built ACSAC papers in
69
- // fixtures/accepted-papers (body-size.json): pdf.js reads the reference glyphs at 8.00 pt
69
+ // fixtures/real-papers/accepted (body-size.json): pdf.js reads the reference glyphs at 8.00 pt
70
70
  // (7.97 without compsoc), banal gives 8.3 on all four. body_pt_tol widens it to 7.5-8.5, so a
71
71
  // bibliography shrunk to \scriptsize (7.3) or grown to \small (9.3) is reported.
72
72
  "ref_pt_min": 8,
@@ -136,7 +136,7 @@
136
136
  // What the venue is called in a paper's text (tex/venue-leftover), which counts it in prose only
137
137
  // beside a recent year («MSR 2027», «MSR'27»): «MSR» is also Microsoft Research, and an acronym
138
138
  // papers define for themselves («Manual Speech Recognition (MSR)», in an accepted ACSAC paper of
139
- // fixtures/accepted-papers/, warned six times when any whole word counted).
139
+ // fixtures/real-papers/accepted/, warned six times when any whole word counted).
140
140
  "aliases": ["MSR"],
141
141
 
142
142
  // The class line the call names, with the two options it forbids (tex/template). The family's
@@ -23,7 +23,7 @@
23
23
  // 🔴 THE NUMBERS ARE MEASURED, NOT COPIED. Built on 2026-11-19 with `paperlint build` on paperlint's
24
24
  // TeX Live 2026 (pdfTeX 1.40.29) and banal: the kit's own neurips_2026.tex with its style
25
25
  // (`\ProvidesPackage{neurips_2026}[2026-01-29 …]`, sha256 c3fc2894…a7ec4555a, the same bytes as
26
- // fixtures/arxiv-papers/2611.08971v1/neurips_2026.sty), and the e2e fixture
26
+ // fixtures/real-papers/preprints/2611.08971v1/neurips_2026.sty), and the e2e fixture
27
27
  // fixtures/build-e2e/neurips. The style's dimensions were written to the log by a `\typeout` run at
28
28
  // \begin{document}, after the style's own:
29
29
  //
@@ -40,7 +40,7 @@
40
40
  //
41
41
  // The planted defects, measured on the same fixture: without `\usepackage{neurips_2026}` the text is
42
42
  // Computer Modern (SFRM1000, SFBX1440, …), and so is it with the 1990s «NIPS Macros» saved under the
43
- // name neurips_2026.sty (as fixtures/arxiv-papers/2611.09818v1 ships it): pdf/fonts, no
43
+ // name neurips_2026.sty (as fixtures/real-papers/preprints/2611.09818v1 ships it): pdf/fonts, no
44
44
  // NimbusRomNo9L; in the source, tex/template (no `\usepackage{neurips_2026}`). A bibliography in
45
45
  // \footnotesize (banal 8.3): pdf/body-size. `\newgeometry{textwidth=6.5in,textheight=9.5in,top=0.75in}`
46
46
  // after \begin{document} built a page with the same size, column, fonts and body size, one page
@@ -67,7 +67,7 @@ TeX Live's scheme-basic, the base set, this family's list, or a dependency of on
67
67
  | the 1990s «NIPS Macros» saved as `neurips_2026.sty` | cm-super: `pdf/fonts` |
68
68
  | `\newgeometry{textwidth=6.5in,textheight=9.5in,top=0.75in}` | `format/layout-override`; the PDF: same page, fonts, sizes |
69
69
 
70
- The «NIPS Macros» case is real: one preprint in `fixtures/arxiv-papers` ships that file under the
70
+ The «NIPS Macros» case is real: one preprint in `fixtures/real-papers/preprints` ships that file under the
71
71
  name `neurips_2026.sty`. Of the 16 NeurIPS-style preprints there, 7 carry the kit's file byte for
72
72
  byte and 6 an earlier one with the same version line (2026-01-29) and no `education` option.
73
73
 
@@ -144,7 +144,7 @@ banal's count of reference pages, and the 18 pages on the PDF's page count.
144
144
  presentation (e.g., 5-7 minutes, length determined based on the number of accepted papers) and
145
145
  (b) a poster presentation»; it does not say whether a remote presentation is allowed. No `talk`.
146
146
  - **Heading case and the register of the body**: not encoded (no accepted S&P paper is in
147
- `fixtures/accepted-papers/`).
147
+ `fixtures/real-papers/accepted/`).
148
148
 
149
149
  ## What the preset resolves to
150
150
 
@@ -347,7 +347,7 @@
347
347
  ],
348
348
  "properties": {
349
349
  "paper": {
350
- "description": "The anchor: a directory under fixtures/accepted-papers/ when the paper is there, or how to find it.",
350
+ "description": "The anchor: a directory under fixtures/real-papers/accepted/ when the paper is there, or how to find it.",
351
351
  "type": "string",
352
352
  "minLength": 1
353
353
  },
package/scripts/check.ts CHANGED
@@ -182,11 +182,19 @@ export const GATES: readonly Gate[] = [
182
182
  {
183
183
  // Every real paper (the accepted ones and the arXiv preprints) in one run of the CLI, against its
184
184
  // baseline. Its own vitest project, outside `unit`, so the macOS shards and coverage do not repeat
185
- // it; no npm script, one more step of e2e-node (fixtures/arxiv-papers/README.md).
185
+ // it; no npm script, one more step of e2e-node (fixtures/real-papers/preprints/README.md).
186
186
  name: "real papers — every rule over every real paper in one run, against its baseline",
187
187
  job: "e2e-node",
188
188
  run: ["vitest", "run", "--project", "real-papers"],
189
189
  },
190
+ {
191
+ // paperlint.dev (site/): its own package.json and lock, so the npm package does not carry Next.js.
192
+ // The build reads README.md and docs/ and fails when what it reads is gone
193
+ // (site/src/shared/lib/readme/content.ts); before it, site/'s own lint, tsc and tests.
194
+ name: "the website builds from README.md and docs/ (site/)",
195
+ job: "site",
196
+ script: "site:build",
197
+ },
190
198
  {
191
199
  name: "TeX e2e — real TeX Live: paperlint toolchain, a real pdflatex build of every fixture, the real banal",
192
200
  job: "build-e2e",
@@ -430,6 +430,8 @@ test("the exclude list is exactly the justified set", () => {
430
430
  "skills/*/scripts/*.js",
431
431
  // the test runner's own configuration, read by vitest, not code the package runs
432
432
  "vitest.config.ts",
433
+ // paperlint.dev: its own project, with its own tests and coverage gate (site/vitest.config.ts)
434
+ "site/**",
433
435
  ]);
434
436
  assert.deepEqual(CONFIG.include, [
435
437
  "bin/**",