Skip to content

fix(eslint-plugin-internal): check formatting in suggestion output fields #11261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

azat-io
Copy link
Contributor

@azat-io azat-io commented May 31, 2025

Fixes the @typescript-eslint/internal/plugin-test-formatting rule to also check formatting of output fields within errors[].suggestions[] arrays in test cases.

PR Checklist

Overview

Previously, the rule only checked code field at the top level of test objects, but ignored output fields inside suggestion objects. This led to inconsistent formatting in test files where suggestion outputs could contain improperly formatted code.

Before:

suggestions: [
  {
    messageId: 'suggestNullish',
    output: "bad formatting here", // ❌ Not checked
  },
]

After

suggestions: [
  {
    messageId: 'suggestNullish', 
    output: "properly formatted code", // ✅ Now checked and auto-fixed
  },
]

@typescript-eslint
Copy link
Contributor

Thanks for the PR, @azat-io!

typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community.

The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately.

Thanks again!


🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint.

Copy link

netlify bot commented May 31, 2025

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit fa29ac1
🔍 Latest deploy log https://app.netlify.com/projects/typescript-eslint/deploys/683ab41da3e579000814a27a
😎 Deploy Preview https://deploy-preview-11261--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 98 (🟢 up 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 98 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

nx-cloud bot commented May 31, 2025

View your CI Pipeline Execution ↗ for commit fa29ac1.

Command Status Duration Result
nx test eslint-plugin-internal --coverage=false ❌ Failed 6s View ↗
nx run eslint-plugin-internal:test -- --coverage ❌ Failed 8s View ↗
nx run-many -t typecheck ✅ Succeeded 1m 53s View ↗
nx run-many -t lint ✅ Succeeded 13s View ↗
nx test eslint-plugin --coverage=false ✅ Succeeded <1s View ↗
nx test typescript-estree --coverage=false ✅ Succeeded <1s View ↗
nx run generate-configs ✅ Succeeded 7s View ↗
nx run types:build ✅ Succeeded 1s View ↗
Additional runs (11) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-05-31 07:51:38 UTC

@azat-io azat-io closed this May 31, 2025
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 8, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant