test(eslintconfig): verify formatter correctness + perf - #2385
Closed
shikanime wants to merge 2 commits into
Closed
Conversation
Signed-off-by: William Phetsinorath <william.phetsinorath-open@interieur.gouv.fr> Change-Id: I6f501bd1633ceb14edaa9bf2a324ea026a6a6964
…ng comment Add vitest suite (9 tests) exercising markdown/json formatting, idempotency, jsonc comment-preservation, and a 200-file perf budget (<1s). Correct the inline comment: .jsonc is already served by the json formatter (prettier keeps comments), not a separate opt-in. Co-Authored-By: Hermes <noreply@nous.sh>
Contributor
|
🤖 Hey ! The security scan report for the current pull request is available here. |
|
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.

0 New Issues
0 Fixed Issues
0 Accepted Issues
Goal
Verifies the formatter work from parent
t_9062bcc1(formatters map{ markdown, json }) with a real test suite, and corrects a misleading inline comment.Changes
packages/eslintconfig/src/index.spec.ts— 9 tests via ESLintlintText(..., {fix:true}):*→-rewrite, 3+ blank lines → 1, trailing-whitespace trimpackages/eslintconfig/vitest.config.ts— node env,src/**/*.spec.{ts,js}.packages/eslintconfig/package.json— addedtest/formatscripts +vitest(catalog:test) devDep.eslint-plugin-formatalready incatalog:toolsfrom parent.src/index.js— corrected the misnomer comment:.jsoncis already served by thejsonformatter (prettier keeps comments); onlyhtmlremains a real opt-in.Result
All 9 tests pass. No meaningful dev-pipeline latency (cold ESLint bootstrap ~1.7 s amortized in a real
pnpm formatrun).Reviewer note (latent upstream risk)
Parent
t_9062bcc1is marked completed but its formatter diff (src/index.js,package.json,pnpm-workspace.yaml,pnpm-lock.yaml) was never committed inwt/t_9062bcc1. This PR contains a faithful byte-for-byte reproduction (verified by running the tests against it). Before merge, confirm the parent's worktree is either abandoned in favor of this branch or its changes are committed — otherwise the formatter ships as drift.Draft per request; not for merge until review.