Skip to content

Fix no-case-declarations ESLint error in plugin-aggrid#278

Merged
hotlong merged 2 commits intocopilot/implement-metadata-cachingfrom
copilot/fix-action-step-error-another-one
Jan 30, 2026
Merged

Fix no-case-declarations ESLint error in plugin-aggrid#278
hotlong merged 2 commits intocopilot/implement-metadata-cachingfrom
copilot/fix-action-step-error-another-one

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 30, 2026

ESLint rule no-case-declarations requires lexical declarations in switch case blocks to be wrapped in braces.

Changes:

  • Wrapped case 'number': block with braces in ObjectAgGridImpl.tsx:552-561
// Before
case 'number':
  const precision = (field as any).precision;
  if (precision !== undefined) {
    colDef.valueFormatter = (params: any) => { ... };
  }
  break;

// After  
case 'number': {
  const precision = (field as any).precision;
  if (precision !== undefined) {
    colDef.valueFormatter = (params: any) => { ... };
  }
  break;
}
Original prompt

引用: https://github.com/objectstack-ai/objectui/actions/runs/21508785705/job/61975291074#step:8:1


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectui Ready Ready Preview, Comment Jan 30, 2026 9:15am
objectui-components Ready Ready Preview, Comment Jan 30, 2026 9:15am
objectui-crm-app Error Error Jan 30, 2026 9:15am

Request Review

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix action step error in build process Fix no-case-declarations ESLint error in plugin-aggrid Jan 30, 2026
Copilot AI requested a review from hotlong January 30, 2026 09:09
@hotlong hotlong marked this pull request as ready for review January 30, 2026 09:12
Copilot AI review requested due to automatic review settings January 30, 2026 09:12
@hotlong hotlong merged commit de7fe20 into copilot/implement-metadata-caching Jan 30, 2026
7 of 9 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an ESLint no-case-declarations violation in the AG Grid plugin by wrapping a switch case block with braces. The ESLint rule requires lexical declarations (const, let, class) at the top level of case clauses to be wrapped in braces to create a proper block scope.

Changes:

  • Added braces to the case 'number': block in applyFieldTypeFormatting function to properly scope the const precision declaration

@github-actions
Copy link
Copy Markdown
Contributor

✅ All checks passed!

  • ✅ Type check passed
  • ✅ Tests passed
  • ✅ Lint check completed

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants