paperlint 2.0.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +6 -1
- package/CONTRIBUTING.md +21 -0
- package/README.md +231 -180
- package/action.yml +4 -6
- package/dist/adapters/references/index.d.ts +13 -0
- package/dist/adapters/references/index.d.ts.map +1 -0
- package/dist/adapters/references/index.js +55 -0
- package/dist/adapters/references/index.js.map +1 -0
- package/dist/adapters/references/reach.io.d.ts +3 -0
- package/dist/adapters/references/reach.io.d.ts.map +1 -0
- package/dist/adapters/references/reach.io.js +14 -0
- package/dist/adapters/references/reach.io.js.map +1 -0
- package/dist/build-engine.d.ts.map +1 -1
- package/dist/build-engine.js +5 -2
- package/dist/build-engine.js.map +1 -1
- package/dist/build.d.ts +16 -1
- package/dist/build.d.ts.map +1 -1
- package/dist/build.js +40 -5
- package/dist/build.js.map +1 -1
- package/dist/cli.d.ts +37 -20
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +377 -251
- package/dist/cli.js.map +1 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +37 -52
- package/dist/doctor.js.map +1 -1
- package/dist/facts-file.d.ts +33 -9
- package/dist/facts-file.d.ts.map +1 -1
- package/dist/facts-file.js +117 -17
- package/dist/facts-file.js.map +1 -1
- package/dist/hooks-settings.d.ts +0 -21
- package/dist/hooks-settings.d.ts.map +1 -1
- package/dist/hooks-settings.js +17 -135
- package/dist/hooks-settings.js.map +1 -1
- package/dist/init.d.ts +40 -19
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +144 -109
- package/dist/init.js.map +1 -1
- package/dist/link-skills.d.ts +1 -1
- package/dist/link-skills.d.ts.map +1 -1
- package/dist/link-skills.js +11 -29
- package/dist/link-skills.js.map +1 -1
- package/dist/new-paper.d.ts +2 -2
- package/dist/new-paper.d.ts.map +1 -1
- package/dist/new-paper.js +6 -2
- package/dist/new-paper.js.map +1 -1
- package/dist/paper-files.d.ts +63 -0
- package/dist/paper-files.d.ts.map +1 -0
- package/dist/paper-files.js +69 -0
- package/dist/paper-files.js.map +1 -0
- package/dist/paper-settings.d.ts +40 -0
- package/dist/paper-settings.d.ts.map +1 -0
- package/dist/paper-settings.js +144 -0
- package/dist/paper-settings.js.map +1 -0
- package/dist/ports/check-references.d.ts +31 -0
- package/dist/ports/check-references.d.ts.map +1 -0
- package/dist/ports/check-references.js +7 -0
- package/dist/ports/check-references.js.map +1 -0
- package/dist/presets.d.ts +84 -0
- package/dist/presets.d.ts.map +1 -0
- package/dist/presets.js +184 -0
- package/dist/presets.js.map +1 -0
- package/dist/reference-rules.d.ts +47 -0
- package/dist/reference-rules.d.ts.map +1 -0
- package/dist/reference-rules.js +156 -0
- package/dist/reference-rules.js.map +1 -0
- package/dist/references.d.ts +36 -0
- package/dist/references.d.ts.map +1 -0
- package/dist/references.js +91 -0
- package/dist/references.js.map +1 -0
- package/dist/rules-config.d.ts +11 -2
- package/dist/rules-config.d.ts.map +1 -1
- package/dist/rules-config.js +25 -11
- package/dist/rules-config.js.map +1 -1
- package/dist/structure.d.ts.map +1 -1
- package/dist/structure.js +3 -2
- package/dist/structure.js.map +1 -1
- package/dist/tex-requirements.d.ts +63 -7
- package/dist/tex-requirements.d.ts.map +1 -1
- package/dist/tex-requirements.js +91 -24
- package/dist/tex-requirements.js.map +1 -1
- package/dist/types.d.ts +20 -18
- package/dist/types.d.ts.map +1 -1
- package/dist/venue-rules.d.ts +109 -0
- package/dist/venue-rules.d.ts.map +1 -0
- package/dist/venue-rules.js +389 -0
- package/dist/venue-rules.js.map +1 -0
- package/docs/configuration.md +152 -77
- package/docs/e2e.md +1 -1
- package/docs/install.md +25 -40
- package/docs/optional-rules.md +26 -24
- package/docs/rules.md +181 -15
- package/eslint-rules/bib-reachable-entry.mjs +75 -0
- package/eslint-rules/latex-language.mjs +29 -1
- package/eslint-rules/paper-stages.harness.mjs +1 -117
- package/eslint-rules/paper-stages.mjs +0 -120
- package/eslint-rules/paper-stages.mutations.mjs +0 -76
- package/eslint-rules/paper-typography.mjs +267 -192
- package/eslint-rules/paper-typography.test.mjs +297 -0
- package/eslint-rules/papers.harness.mjs +8 -12
- package/eslint-rules/papers.mjs +17 -27
- package/eslint-rules/pdf-last-page-balance.mjs +23 -5
- package/eslint-rules/review-frontmatter.mjs +118 -0
- package/eslint-rules/review-frontmatter.schema.json +36 -0
- package/eslint-rules/review-frontmatter.test.mjs +118 -0
- package/eslint-rules/sibling-frontmatter.mjs +19 -0
- package/eslint-rules/sibling-frontmatter.schema.json +14 -0
- package/eslint.config.mjs +0 -15
- package/fixtures/build-e2e/acmart/paperlint.json +1 -0
- package/fixtures/real-markdown-paper/baseline.json +6 -7
- package/hooks/hooks.harness.mjs +39 -98
- package/hooks/hooks.mutations.mjs +6 -6
- package/hooks/paper-edit-guard.hook.d.mts +2 -3
- package/hooks/paper-edit-guard.hook.mjs +31 -42
- package/hooks/paper-skills-nudge.hook.mjs +21 -19
- package/hooks/paper-status-gates.hook.mjs +21 -19
- package/hooks/paper-status-gates.sh +8 -13
- package/lib/paper-config.d.mts +15 -18
- package/lib/paper-config.harness.mjs +18 -35
- package/lib/paper-config.mjs +90 -81
- package/lib/paper-config.mutations.mjs +2 -2
- package/lib/skill-checks.mjs +1 -1
- package/lib/skill-trigger-cases.harness.mjs +9 -8
- package/lib/skill-trigger-cases.mjs +7 -15
- package/package.json +1 -1
- package/scripts/eslint-report-guard.mjs +1 -1
- package/scripts/harness-api.frozen.json +0 -3
- package/scripts/mutation-batteries.frozen.json +4 -13
- package/skills/analyze-sibling-paper/SKILL.md +16 -12
- package/skills/analyze-sibling-paper/SKILL.md.spec.ts +15 -11
- package/skills/cold-read-diff/SKILL.md +20 -1
- package/skills/cold-read-diff/SKILL.md.spec.ts +19 -0
- package/skills/find-venue/SKILL.md +5 -1
- package/skills/find-venue/SKILL.md.spec.ts +4 -0
- package/skills/grade-paper-writing/SKILL.md +20 -1
- package/skills/grade-paper-writing/SKILL.md.spec.ts +19 -0
- package/skills/paper-pipeline/PIPELINE-MAP.md +14 -4
- package/skills/paper-pipeline/SKILL.md +4 -3
- package/skills/paper-pipeline/SKILL.md.spec.ts +3 -2
- package/skills/paper-pipeline/scripts/consumer.d.mts +0 -1
- package/skills/paper-pipeline/scripts/consumer.harness.mjs +8 -12
- package/skills/paper-pipeline/scripts/consumer.mjs +19 -33
- package/skills/paper-pipeline/scripts/extract-ref-facts.harness.mjs +6 -4
- package/skills/paper-pipeline/scripts/run-mechanical.mjs +2 -11
- package/skills/plan-paper-timeline/SKILL.md +2 -2
- package/skills/plan-paper-timeline/SKILL.md.spec.ts +1 -1
- package/skills/plan-paper-timeline/plan-paper-timeline.effects.harness.mjs +1 -1
- package/skills/plan-paper-timeline/plan-paper-timeline.effects.mutations.mjs +2 -2
- package/skills/render-paper/check-render.sh +2 -3
- package/skills/render-paper/extract-pdf-facts.harness.mjs +5 -5
- package/skills/render-paper/extract-pdf-facts.mjs +4 -4
- package/skills/render-paper/render-paper.harness.mjs +2 -2
- package/skills/study-accepted-papers/SKILL.md +2 -1
- package/skills/study-accepted-papers/SKILL.md.spec.ts +1 -0
- package/skills/submit-paper/SKILL.md +9 -1
- package/skills/submit-paper/SKILL.md.spec.ts +8 -0
- package/skills/submit-paper/references/venues/acm-sigconf.jsonc +86 -0
- package/skills/submit-paper/references/venues/agenticdev.jsonc +34 -102
- package/skills/submit-paper/references/venues/aisec.jsonc +21 -82
- package/skills/submit-paper/references/venues/realm.jsonc +45 -43
- package/skills/submit-paper/references/venues/tex-base.jsonc +1 -1
- package/skills/submit-paper/references/venues/venue-profile.schema.json +119 -29
- package/skills/verify-citations/SKILL.md +10 -1
- package/skills/verify-citations/SKILL.md.spec.ts +9 -0
- package/skills/verify-citations/scripts/bib-authors.mjs +48 -26
- package/src/adapters/references/index.ts +102 -0
- package/src/adapters/references/reach.io.ts +12 -0
- package/src/build-engine.ts +10 -2
- package/src/build.harness.mjs +31 -22
- package/src/build.ts +65 -8
- package/src/cli.harness.mjs +151 -294
- package/src/cli.mutations.mjs +35 -44
- package/src/cli.ts +457 -288
- package/src/doctor.harness.mjs +41 -84
- package/src/doctor.mutations.mjs +9 -9
- package/src/doctor.ts +41 -61
- package/src/facts-file.test.ts +47 -7
- package/src/facts-file.ts +145 -24
- package/src/hooks-settings.harness.mjs +7 -92
- package/src/hooks-settings.mutations.mjs +2 -17
- package/src/hooks-settings.ts +18 -162
- package/src/init.test.ts +206 -0
- package/src/init.ts +193 -159
- package/src/link-skills.harness.mjs +1 -38
- package/src/link-skills.mutations.mjs +9 -5
- package/src/link-skills.ts +10 -34
- package/src/lint-fix.test.ts +120 -0
- package/src/new-paper.harness.mjs +9 -6
- package/src/new-paper.test.ts +133 -0
- package/src/new-paper.ts +7 -2
- package/src/paper-files.test.ts +290 -0
- package/src/paper-files.ts +144 -0
- package/src/paper-settings-commands.test.ts +274 -0
- package/src/paper-settings.test.ts +249 -0
- package/src/paper-settings.ts +208 -0
- package/src/ports/check-references.ts +28 -0
- package/src/presets.test.ts +236 -0
- package/src/presets.ts +297 -0
- package/src/reference-rules.ts +229 -0
- package/src/references.test.ts +209 -0
- package/src/references.ts +138 -0
- package/src/rules-config.harness.mjs +24 -8
- package/src/rules-config.ts +30 -13
- package/src/structure.harness.mjs +6 -4
- package/src/structure.ts +3 -2
- package/src/tex-requirements.harness.mjs +11 -17
- package/src/tex-requirements.ts +179 -29
- package/src/types.ts +30 -18
- package/src/venue-rules.test.ts +554 -0
- package/src/venue-rules.ts +571 -0
- package/templates/paper/paperlint.json +4 -0
- package/eslint-rules/doc-fields.harness.mjs +0 -336
- package/eslint-rules/doc-fields.mjs +0 -186
- package/eslint-rules/doc-fields.mutations.mjs +0 -96
- package/eslint-rules/paper-typography.harness.mjs +0 -291
- package/eslint-rules/paper-typography.mutations.mjs +0 -131
- package/eslint-rules/review-findings-cause.harness.mjs +0 -228
- package/eslint-rules/review-findings-cause.mjs +0 -135
- package/eslint-rules/review-findings-cause.mutations.mjs +0 -72
- package/fixtures/build-e2e/acmart/venue.json +0 -1
- package/fixtures/paper-stages/authors-ran/PIPELINE-STATUS.md +0 -16
- package/fixtures/paper-stages/marker-in-prose/PIPELINE-STATUS.md +0 -17
- package/fixtures/review-findings-cause/clean.md +0 -17
- package/fixtures/review-findings-cause/defect.md +0 -14
- package/fixtures/review-findings-cause/old-debt.md +0 -14
- package/fixtures/review-findings-cause/quiet-in-fence.md +0 -16
package/src/cli.mutations.mjs
CHANGED
|
@@ -73,14 +73,15 @@ process.exit(
|
|
|
73
73
|
edits: [[CLI, " if (a.missingValue) {", " if (false) {"]],
|
|
74
74
|
},
|
|
75
75
|
{
|
|
76
|
-
name: "
|
|
76
|
+
name: "no papers where the config points reads as a clean run",
|
|
77
77
|
harness: HARNESS,
|
|
78
78
|
expect:
|
|
79
|
-
"`lint` with NO path
|
|
79
|
+
"`lint` with NO path, no config and no papers/ refuses and names BOTH ways out",
|
|
80
80
|
disables:
|
|
81
|
-
|
|
82
|
-
"
|
|
83
|
-
|
|
81
|
+
"the guard that makes the `papers` default safe. Without it, a project whose papers " +
|
|
82
|
+
"live elsewhere gets a run over an empty or missing directory instead of the sentence " +
|
|
83
|
+
"naming both ways out",
|
|
84
|
+
edits: [[CLI, " if (empty !== undefined) {", " if (false) {"]],
|
|
84
85
|
},
|
|
85
86
|
{
|
|
86
87
|
name: "the GUARD AGAINST A GREEN ZERO is removed",
|
|
@@ -103,26 +104,26 @@ process.exit(
|
|
|
103
104
|
edits: [
|
|
104
105
|
[
|
|
105
106
|
CLI,
|
|
106
|
-
|
|
107
|
+
" if (isEmptySet(e)) results = [];\n else throw e;",
|
|
107
108
|
" throw e;",
|
|
108
109
|
],
|
|
109
110
|
],
|
|
110
111
|
},
|
|
111
112
|
{
|
|
112
|
-
name: "the declaration stops reaching
|
|
113
|
+
name: "the declaration stops reaching paperlint.json again",
|
|
113
114
|
harness: HARNESS,
|
|
114
115
|
expect:
|
|
115
|
-
"🔴 THE DECLARATION SHOWS UP IN
|
|
116
|
+
"🔴 THE DECLARATION SHOWS UP IN paperlint.json — the file the hooks read",
|
|
116
117
|
disables:
|
|
117
118
|
"the whole reason this command was rewritten (#33). A hook does not import code and " +
|
|
118
|
-
"cannot walk up the tree — it reads a path it is able to name, and that path is " +
|
|
119
|
-
"
|
|
120
|
-
"`paper-edit-guard` guards the default",
|
|
119
|
+
"cannot walk up the tree — it reads a path it is able to name, and that path is the " +
|
|
120
|
+
"root paperlint.json. Without writing there, the install looks like it succeeded, " +
|
|
121
|
+
"while `paper-edit-guard` guards the default",
|
|
121
122
|
edits: [
|
|
122
123
|
[
|
|
123
124
|
INIT,
|
|
124
|
-
|
|
125
|
-
"
|
|
125
|
+
" writeFileSync(\n path,\n JSON.stringify(\n { ...settings, [PAPERS_DIR_FIELD]: choice.papers },",
|
|
126
|
+
" (() => {})(\n path,\n JSON.stringify(\n { ...settings, [PAPERS_DIR_FIELD]: choice.papers },",
|
|
126
127
|
],
|
|
127
128
|
],
|
|
128
129
|
},
|
|
@@ -130,7 +131,7 @@ process.exit(
|
|
|
130
131
|
name: "the papers directory is GUESSED again instead of measured",
|
|
131
132
|
harness: HARNESS,
|
|
132
133
|
expect:
|
|
133
|
-
"
|
|
134
|
+
"and it says HOW it was measured — otherwise a guess reads as a fact",
|
|
134
135
|
disables:
|
|
135
136
|
"measuring instead of guessing. The declaration still gets WRITTEN — i.e. the failure " +
|
|
136
137
|
"is one-sided and points toward a confident wrong answer: the file says `papers`, the " +
|
|
@@ -151,7 +152,13 @@ process.exit(
|
|
|
151
152
|
disables:
|
|
152
153
|
"the ban on silently replacing a consumer's setting. They keep trusting the old " +
|
|
153
154
|
"value, because nobody told them it changed",
|
|
154
|
-
edits: [
|
|
155
|
+
edits: [
|
|
156
|
+
[
|
|
157
|
+
INIT,
|
|
158
|
+
' if (existing !== undefined)\n return { status: "kept"',
|
|
159
|
+
' if (false)\n return { status: "kept"',
|
|
160
|
+
],
|
|
161
|
+
],
|
|
155
162
|
},
|
|
156
163
|
{
|
|
157
164
|
name: "the default that was taken stops being named",
|
|
@@ -221,18 +228,18 @@ process.exit(
|
|
|
221
228
|
],
|
|
222
229
|
},
|
|
223
230
|
{
|
|
224
|
-
name: "a
|
|
231
|
+
name: "a paperlint.json is written for the default again",
|
|
225
232
|
harness: HARNESS,
|
|
226
233
|
expect:
|
|
227
|
-
"
|
|
234
|
+
"🔴 nothing to measure — the default is taken, and NO paperlint.json is written for it",
|
|
228
235
|
disables:
|
|
229
|
-
"the
|
|
230
|
-
"
|
|
236
|
+
"the rule that a project on the defaults needs no config file. Every init would leave " +
|
|
237
|
+
"a file restating the default, and a reader could no longer tell a choice from a default",
|
|
231
238
|
edits: [
|
|
232
239
|
[
|
|
233
240
|
INIT,
|
|
234
|
-
|
|
235
|
-
|
|
241
|
+
' if (choice.papers === DEFAULT_PAPERS_ROOT)\n return { status: "default"',
|
|
242
|
+
' if (false)\n return { status: "default"',
|
|
236
243
|
],
|
|
237
244
|
],
|
|
238
245
|
},
|
|
@@ -270,35 +277,19 @@ process.exit(
|
|
|
270
277
|
],
|
|
271
278
|
},
|
|
272
279
|
{
|
|
273
|
-
name: "the utility stops reading
|
|
280
|
+
name: "the utility stops reading paperlint.json",
|
|
274
281
|
harness: HARNESS,
|
|
275
282
|
expect:
|
|
276
|
-
"🔴 THE UTILITY READS THE DECLARATION FROM
|
|
277
|
-
disables:
|
|
278
|
-
"the link between the install command and the check command. `init` writes one " +
|
|
279
|
-
"declaration into package.json, while `lint` looks for it somewhere else — right after " +
|
|
280
|
-
'install the run answers "nothing to lint" over a corpus that is right there',
|
|
281
|
-
edits: [
|
|
282
|
-
[
|
|
283
|
-
CLI,
|
|
284
|
-
" if (existsSync(pkg) && declaresSettings(pkg)) return pkg;",
|
|
285
|
-
" if (false) return pkg;",
|
|
286
|
-
],
|
|
287
|
-
],
|
|
288
|
-
},
|
|
289
|
-
{
|
|
290
|
-
name: "consumer data stops reaching the rule",
|
|
291
|
-
harness: HARNESS,
|
|
292
|
-
expect: "the command from options gets through to the rule",
|
|
283
|
+
"🔴 THE UTILITY READS THE DECLARATION FROM paperlint.json — the file `paperlint init` writes and the hooks read",
|
|
293
284
|
disables:
|
|
294
|
-
|
|
295
|
-
"
|
|
296
|
-
"
|
|
285
|
+
"the link between the install command and the check command. `init` writes the " +
|
|
286
|
+
"declaration into paperlint.json, while `lint` would run on the default — right after " +
|
|
287
|
+
"install it reports on a directory the papers are not in",
|
|
297
288
|
edits: [
|
|
298
289
|
[
|
|
299
290
|
CLI,
|
|
300
|
-
"
|
|
301
|
-
"
|
|
291
|
+
" const configPath = existsSync(found) ? found : null;",
|
|
292
|
+
" const configPath = existsSync(found) ? null : null;",
|
|
302
293
|
],
|
|
303
294
|
],
|
|
304
295
|
},
|