Skip to content

Conversation

Anemy
Copy link
Member

@Anemy Anemy commented Oct 3, 2025

Turns on the @mongodb-js/compass/no-inline-emotion-css rule from warn to error. Also updates some places we were dynamically passing objects to use constants. Some of it is a probably a bit of overkill, but I don't think it'll hurt.

@Anemy Anemy requested a review from a team as a code owner October 3, 2025 18:21
@Anemy Anemy requested review from Copilot and nbbeeken October 3, 2025 18:21
@Anemy Anemy added the no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) label Oct 3, 2025
Copy link
Contributor

@Copilot 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 enforces the @mongodb-js/compass/no-inline-emotion-css linting rule by changing it from a warning to an error and refactors existing inline styles to use CSS constants throughout the codebase.

Key changes:

  • Updates ESLint configuration to enforce the no-inline-emotion-css rule as an error
  • Replaces inline style attributes and css() calls with pre-defined CSS constants
  • Adds eslint-disable comments where dynamic styling is still necessary

Reviewed Changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.

Show a summary per file
File Description
configs/eslint-config-compass/index.js Changes the no-inline-emotion-css rule from 'warn' to 'error'
packages/compass-workspaces/src/components/workspace-tab-context-provider.tsx Replaces inline style with CSS constant for display: contents
packages/compass-global-writes/src/components/create-shard-key-form.tsx Extracts accordion padding to a CSS constant
packages/compass-explain-plan/src/components/explain-tree/tree-layout.tsx Moves SVG positioning styles to a CSS constant
packages/compass-connections-navigation/src/with-status-marker.tsx Converts inline width/height styles to CSS constant
packages/compass-components/src/components/workspace-tabs/tab.tsx Adds eslint-disable comment for dynamic theme styling
packages/compass-components/src/components/select-list.tsx Extracts checkbox padding to CSS constant
packages/compass-components/src/components/icons/logo-icon.tsx Removes dynamic height CSS in favor of height attribute
packages/compass-components/src/components/file-selector.tsx Converts display: none to CSS constant
packages/compass-components/src/components/file-picker-dialog.tsx Converts display: none to CSS constant
packages/compass-components/src/components/document-list/element.tsx Refactors multiple inline styles to use style objects
packages/compass-components/src/components/bson-value.tsx Converts color calculation to style object
packages/compass-components/src/components/actions/item-action-group.tsx Replaces inline display style with CSS constant
packages/compass-assistant/src/components/confirmation-message.tsx Converts conditional background/border colors to CSS classes
packages/compass-assistant/src/components/assistant-chat.tsx Extracts multiple inline styles to constants
packages/compass-aggregations/src/components/aggregation-side-panel/stage-wizard-use-cases/match/match-group-form.tsx Converts inline display style to CSS constant

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants