Skip to content

ci: lint with ESLint and fix what it surfaced - #25

Merged
nichinichisou0609 merged 4 commits into
mainfrom
chore/repo-quality
Oct 14, 2026
Merged

nichinichisou0609 merged 4 commits into
mainfrom
chore/repo-quality

Conversation

@nichinichisou0609

Copy link
Copy Markdown
Contributor

Lints the repository with ESLint in CI, fixes two story renderer behaviours the lint pass surfaced, and removes unused code.

  • Per-object lights follow each draw's layer. The story renderer counted the additional lights of every draw as if it were on the Camera1 layer. Each item of the field's draw list now uses its own layer (a character's stage slot, Default off the five slots; an effect renderer's own layer), so a light's culling mask decides what it lights. With additional vertex lights on (Best quality), effects on AdvBack/AdvFront and characters off the five slots no longer take lights their layer is masked out of.
  • Nested DOTween Sequences are refused. Sequence.ApplyInternalCycle places a nested Sequence by its multiCycleStep argument, which the player's cycle does not reproduce; inserting a Sequence into a Sequence now raises nested Sequences not implemented, as the DOTween Pro sequence component already does. Sequences of tweens and callbacks play as before.
  • Unused code removed. Imports, variables and a helper nothing reads, and the chart data page's lead texts the heading no longer shows. A failed asset decode keeps the decoder's error as cause.
  • ESLint. eslint.config.js (recommended rules; page globals of the Live2D and Spine runtimes; no-useless-assignment off so ports keep the statement order of the code they reproduce), npm run lint, and a lint step in CI and the release verification job. The published package is unchanged (278 files).

Validation: npm test (666 pass, 2 skipped, with new tests for the light layers and the nested Sequence refusal), npm run typecheck, npm run lint, node scripts/build.mjs --check and npm pack --dry-run pass locally on Node.js 22.

nichinichisou0609 and others added 4 commits October 14, 2026 16:00
The story renderer counted the additional lights of every draw
(unity_LightData.y) as if the renderer were on the Camera1 layer. Each
item of the field's draw list now uses its own layer: a Live2D character
the layer of its stage slot (Default when it stands off the five slots)
and an effect renderer its own, so a light's culling mask decides which
of them it lights, as the engine's per-object light culling does.

With additional vertex lights on (Best quality), effects on the AdvBack
and AdvFront layers and characters off the five slots no longer take
lights whose culling mask leaves out their layer. A unit test draws
items on several layers under two lights.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Removes imports, variables and a helper nothing reads (in the CRI Lips
pipeline, the live canvas, the story video feature, the UI renderer's
layout, the story author and data validator scripts, and four unit
tests), and the chart data page's lead texts, which the page heading no
longer shows. The story renderer's render-target setter no longer
returns a value, the video preload loop says what its empty body does,
and an asset that fails to decode keeps the decoder's error as the cause
of the error it raises.

No behaviour changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds ESLint with its recommended rules (eslint.config.js) as a
development dependency and `npm run lint`, which CI and the release
verification job run after the type check. The config knows the page
globals of the Live2D and Spine runtimes, ignores dist/, reports unused
variables other than arguments and caught errors, and leaves out
no-useless-assignment so ports keep the statement order of the code
they reproduce. The published package is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sequence.ApplyInternalCycle places a nested Sequence's position by its
multiCycleStep argument, which the player's Sequence cycle does not
reproduce. Inserting a Sequence into a Sequence now raises "nested
Sequences not implemented" (a StoryCommandError) instead of playing it
with positions the game would not reach, as the DOTween Pro sequence
component already does for its nested sequences. The unused argument is
removed from the cycle's callers.

Sequences of tweens and callbacks play as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nichinichisou0609
nichinichisou0609 merged commit 0ae93d8 into main Oct 14, 2026
4 checks passed
@nichinichisou0609
nichinichisou0609 deleted the chore/repo-quality branch October 14, 2026 08:21
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