Skip to content

refactor(errors): rename the JSX-free modules in src/errors from .tsx to .ts - #2958

Open
MaxonT wants to merge 1 commit into
aws:v1.xfrom
MaxonT:contrib/1755-auto
Open

MaxonT wants to merge 1 commit into
aws:v1.xfrom
MaxonT:contrib/1755-auto

Conversation

@MaxonT

@MaxonT MaxonT commented Nov 29, 2026

Copy link
Copy Markdown

Hi, thanks for keeping this issue open; here is a patch that addresses it.

Description

This is a first, deliberately small step on #1755. It renames the four files in src/errors from .tsx to .ts: errors, index, types and errors.test. None of them contains JSX, and the content of each file is unchanged (git diff -M shows 4 renames with no content change, plus one word in AGENTS.md).

Imports of this directory are written without an extension (for example from "../errors" and from "../errors/errors"), so no import had to change. The one place that named a file by path was AGENTS.md (src/errors/errors.tsx), which now says errors.ts; I grepped the text-complete checkout and found no config or script that names them.

I kept it to one directory on purpose. There are a few hundred more .tsx files without JSX, and since the contributing guide asks to discuss larger changes first, I did not want to send a very large rename unasked. If you prefer the rest of #1755 as one PR, or one directory at a time like this, I can do it either way.

Related Issue

Refs #1755

The open dependency PR #2677 also contains "#1755", but that is secretlint's own issue number in its release notes and has nothing to do with this one.

Documentation PR

Not applicable, no behavior or documentation changes.

Type of Change

  • Other: refactor, file extension only

Testing

Run in a fresh checkout of main with the change applied:

  • bun test src/errors passes (14 tests, same as before the rename)
  • bun test (whole suite): 5269 pass, 6 skip, 3 fail. The 3 failures are in the feedback screenshot tests (feedback (fixture-backed) and feedback (request contract)). With the four renames reverted on the same commit the whole suite also gives 5269 pass, 6 skip, 3 fail, so I read them as already failing on main (I compared the counts, not each test name).
  • bun run typecheck
  • bun run lint:check
  • bun run format:check
  • bun run audit
  • bun run secrets:check
  • bun run build
  • End-to-end tests (bun run test:e2e) not run: the change touches no deployment or AWS code.

… to .ts

Signed-off-by: Ym <173550318+MaxonT@users.noreply.github.com>
@MaxonT
MaxonT requested a review from a team November 29, 2026 22:09
@github-actions github-actions Bot added the size/xs PR size: XS label Nov 29, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/xs PR size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant