feat: add Phaser 4 rule pack - #340
Merged
Merged
Conversation
Ten AST rules for scene shutdown ownership, global emitter leaks, no Phaser factories in update/tick, branded scene/texture keys, and no ignoreDestroy. Analogous to the three.js pack.
Collaborator
Author
|
Template confinement: boringstack-xyz/Phaser-TypeScript-AI-First-Starter#37 |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a
phaserrule pack (analogous to the three.js pack) that auto-applies whenphaseris in package.json.Ten AST rules for Phaser 4 as a render substrate:
no-phaser-import-in-pure-layersimport "phaser"from domain/content/shared/featuresrequire-scene-shutdown-hook.on()withoutSHUTDOWN/DESTROYno-unmanaged-global-listenersno-phaser-alloc-in-updatethis.add.*/new Phaser.Math.*/setTextinupdate/tickno-physics-collider-in-updatephysics.add.overlap/colliderin the tickno-raw-scene-key-literalscene.start("World")/super("Boot")no-raw-texture-key-literalno-ignore-destroyignoreDestroy = trueno-loader-in-updatethis.load.*in the tickno-global-phaserPhaser/require("phaser")Not in this PR:
IStackAdapter, scaffold archetype, ManagedScene/ECS, typed asset manifest.Test plan
bun test packages/core/tests/rule-pack-phaser.test.ts(registry, each rule, phaser-starter fixture lints clean)bun test packages/core/tests/rule-docs-examples.test.ts(every pack doc example trips/satisfies)bun test packages/core/tests/stack-detection.test.ts(phaser: 4.2.1detects the pack)bun run ci:local(rules/arch check, typecheck, lint, format, 5755 tests, PTY e2e)