Skip to content

Misc small stuff - #31

Merged
egon1024 merged 3 commits into
mainfrom
misc_small_stuff
Apr 12, 2026
Merged

egon1024 merged 3 commits into
mainfrom
misc_small_stuff

Conversation

@egon1024

Copy link
Copy Markdown
Owner

Summary

This branch improves ESLint hygiene, documents automation scope for contributors, and extracts testable pure helpers from several Foundry chat entry-point modules with Vitest coverage. Chat UX and runtime behavior are intended to stay the same; changes are refactor + tests + docs/config.

ESLint (eslint.config.js)

  • Document scripts/ as intentionally out of scope for the ESLint gate (maintainer policy: no CI lint on scripts/).
  • Add linterOptions.reportUnusedDisableDirectives: "warn" to surface stale disable comments.
  • Extend Foundry client globals with ActiveEffect and TokenDocument (readonly).
  • Add an explicit config slice for vitest.config.mjs (aligned with package.json lint).

Published docs (docs-site/)

  • development.md: Clarify make lint / npm run lint scope; document that scripts/ is not in Vitest or ESLint and is validated manually where the compendium guide describes script workflows.
  • future-plans.md: Align the linting bullet with the same policy and optional follow-ups (stricter rules / globals / CI split), without implying scripts/ will be added to the gate.

Pure helpers + chat wiring (module/logic/)

Helper module Role Entry file still owns hooks/DOM
spell-save-from-chat-helpers.mjs getSpellCastDataFromMessage from flags.thirdera.spellCast spell-save-from-chat.mjs
concentration-from-chat-helpers.mjs parseConcentrationOtherInputs for “Concentration (other)” damage vs custom DC (uses damageWhileCastingDc) concentration-from-chat.mjs (reads dialog fields, builds localized label)
spell-sr-from-chat-helpers.mjs getSpellPenetrationCastFlags from spellCast (SR key + caster level + targets) spell-sr-from-chat.mjs (speaker + permission checks)
apply-damage-healing-chat-helpers.mjs getApplyDataFromRollFields (isRoll, rolls, flavor — healing keyword, multi-roll sum, attack+damage last roll) apply-damage-healing-entry-points.mjs

Tests (test/unit/logic/)

  • spell-save-from-chat-helpers.test.mjs
  • concentration-from-chat-helpers.test.mjs
  • spell-sr-from-chat-helpers.test.mjs
  • apply-damage-healing-chat-helpers.test.mjs

Contributor matrix (test/README.md)

  • Rows for the new helper modules and their test files.
  • “Not covered” list updated so chat *-from-chat.mjs entry files remain Foundry/UI scope while the matching *-helpers.mjs (and apply chat helper) are covered in Node.

Migration / data

None. No changes to persisted actor/item/world shapes or compendium JSON; message flag shapes used by the helpers are unchanged.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Version Preview

Version
Current Release 0.30.0
Bump Type minor
Next Version 0.31.0

⚠️ No version tag found in PR description — defaulting to #minor. Add #major, #minor, or #patch at the start of a line in the PR body to specify.

@egon1024
egon1024 merged commit d45ee3c into main Apr 12, 2026
5 checks passed
@egon1024
egon1024 deleted the misc_small_stuff branch April 12, 2026 02:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant