Skip to content

chore(monorepo): add a new rule for css modules migration #18839

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

Merged
merged 2 commits into from
Jul 8, 2025

Conversation

koji
Copy link
Contributor

@koji koji commented Jul 5, 2025

Overview

add a new rule for css modules migration

at this moment, this sets warn instead error becasue there are some components that use style in app, protocol-designer, and opentrons-ai-client
when i set error, there were 115 errors.

close AUTH-

Test Plan and Hands on Testing

Changelog

Review requests

Risk assessment

add a new rule for css modules migration

close AUTH-
@koji koji requested a review from Copilot July 7, 2025 19:23
Copy link

@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

Adds a new ESLint override to warn on inline styles in .tsx files, guiding migration to CSS modules.

  • Introduces the react/forbid-dom-props rule to forbid the style prop in TSX files (excluding story files)
  • Temporarily set to warn to accommodate existing inline-style usage

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@koji koji marked this pull request as ready for review July 8, 2025 14:53
Copy link
Contributor

@Elyorcv Elyorcv left a comment

Choose a reason for hiding this comment

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

LGTM

files: ['**/*.tsx'],
excludedFiles: ['**/*.stories.tsx'],
rules: {
// TODO: Switch this rule to 'error' once the CSS modules migration is complete.
Copy link
Contributor

Choose a reason for hiding this comment

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

could we create a ticket for this and put here?

Copy link
Contributor

@mjhuff mjhuff left a comment

Choose a reason for hiding this comment

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

Makes sense, thank you!

Copy link
Collaborator

@jerader jerader left a comment

Choose a reason for hiding this comment

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

makes sense

@koji koji merged commit 5d6e238 into edge Jul 8, 2025
30 checks passed
@koji koji deleted the chore_add-new-rule-for-migration branch July 8, 2025 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants