Repository navigation
fix(devex): resolve JSON enum imports for editor autocomplete - #1394
Merged
itsalaidbacklife merged 1 commit intoOct 6, 2026
Merged
Conversation
Enable resolveJsonModule in jsconfig.json and add the missing .json extension to the three extensionless enum imports so MoveType, Transitions, etc. get autocomplete and typo detection. Resolves cuttle-cards#1393
Haviles04
approved these changes
Oct 6, 2026
Haviles04
left a comment
Contributor
There was a problem hiding this comment.
LGTM but I'll leave it up to @itsalaidbacklife
Contributor
This was referenced Oct 6, 2026
1 of 21 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.

Issue number
Relevant issue number
Please check the following
(No new tests/docs: this is editor-tooling config only,
checkJsstays off so nothing changes in CI or the build.)Please describe additional details for testing this change
Implements the two fixes proposed in #1393:
jsconfig.json: add"resolveJsonModule": true..jsonto the three extensionless enum imports (GameView.vue,GameCard.vue,ScrapPile.vue).How I checked it: ran the TypeScript language service (
tsc --noEmit,allowJs+checkJs, extending the repo'sjsconfig.json) over a small throwaway probe file.import MoveType from '_/utils/MoveType.json'givesTS2732 ... Consider using '--resolveJsonModule'.MoveType.TOTALLY_FAKE_KEYis flagged (a// @ts-expect-erroron that line is satisfied).'_/utils/MoveType'still fails withTS2307even with the flag on, which confirms the three import edits are needed too.Also ran
npx eslinton the changed.vuefiles (clean),npm run test:unit:client(passes), andvite build(succeeds). I did not run the sails unit tests or Cypress e2e locally; nothing server-side changed.Side note, left out to keep this scoped to the issue: a few backend
require()calls also omit the extension (e.g.require('../../utils/GameStatus')inapi/helpers/is-game-full.js, andMoveType/TargetTypeunderapi/helpers/game-states/ai/), so they miss out on the same typing. Happy to follow up on those if you'd like.Prepared with AI assistance; I reviewed and verified the change as described above.