Skip to content

Convert tidier.js to TypeScript && test coverage of tidier.ts#3899

Open
kashish00208 wants to merge 1 commit intoprocessing:develop-codemirror-v6from
kashish00208:develop-codemirror-v6
Open

Convert tidier.js to TypeScript && test coverage of tidier.ts#3899
kashish00208 wants to merge 1 commit intoprocessing:develop-codemirror-v6from
kashish00208:develop-codemirror-v6

Conversation

@kashish00208
Copy link

@kashish00208 kashish00208 commented Feb 16, 2026

Fixes #3815 #3816

Changes:
This PR implements the following changes based on issue #3816 #3815:

  1. Rename and TypeScript conversion:
    1. Renamed tidier.js → tidier.ts.
    2. Added TypeScript types for the CodeMirror view, the mode argument, and other values flagged during conversion.
    3. Updated necessary imports/exports.
  2. Functionality verification:
    1. Manually verified that Tidy and Format works correctly for JavaScript, HTML, and CSS files.
    2. Ensured that when formatting the editor content, the cursor remains stable and does not jump unexpectedly.
  3. Integration tests:
    1. Added tests for tidier.ts
    2. Using “Tidy Code” updates the editor document with Prettier formatting.
    3. Cursor position remains stable and predictable after formatting.
    4. Formatting works for HTML, JavaScript, and CSS files.
    5. Tests focus only on integration behavior, not Prettier internals.

I have verified that this pull request:

  • has no linting errors (npm run lint)
  • has no test errors (npm run test)
  • has no typecheck errors (npm run typecheck)
  • is from a uniquely-named feature branch and is up to date with the develop branch.
  • is descriptively named and links to an issue number, i.e. Fixes #123
  • meets the standards outlined in the accessibility guidelines

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