Skip to content

NO-JIRA: don't allow directly importing React#370

Open
PeterYurkovich wants to merge 1 commit into
openshift:mainfrom
PeterYurkovich:add-no-react-import-lint
Open

NO-JIRA: don't allow directly importing React#370
PeterYurkovich wants to merge 1 commit into
openshift:mainfrom
PeterYurkovich:add-no-react-import-lint

Conversation

@PeterYurkovich
Copy link
Copy Markdown
Contributor

@PeterYurkovich PeterYurkovich commented May 13, 2026

Summary by CodeRabbit

  • Chores
    • Updated code quality standards to enforce consistent import practices across the codebase.

@openshift-ci-robot
Copy link
Copy Markdown

@PeterYurkovich: This pull request explicitly references no jira issue.

Details

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 13, 2026
@openshift-ci openshift-ci Bot requested review from jgbernalp and zhuje May 13, 2026 22:32
@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 13, 2026

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: PeterYurkovich

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 13, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 13, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 4cc8d774-1ccd-4aed-8ebd-eb6a68e2db68

📥 Commits

Reviewing files that changed from the base of the PR and between 81c3a0f and 469e5ae.

📒 Files selected for processing (1)
  • web/eslint.config.ts

Walkthrough

An ESLint rule was added to web/eslint.config.ts to prevent default and namespace imports of React, directing developers toward named imports with custom error messages.

Changes

ESLint React Import Restriction Rule

Layer / File(s) Summary
React import restriction rule
web/eslint.config.ts
Added no-restricted-syntax rule that blocks import React from 'react' and import * as React from 'react', with custom messages guiding developers to use named imports.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change—adding an ESLint rule to prevent direct React imports—which aligns with the actual modifications in web/eslint.config.ts.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@PeterYurkovich
Copy link
Copy Markdown
Contributor Author

/retest

1 similar comment
@PeterYurkovich
Copy link
Copy Markdown
Contributor Author

/retest

@zhuje
Copy link
Copy Markdown
Contributor

zhuje commented May 14, 2026

One unit test failing :(

 20 passing (2m)
  1 failing
  1) Logs Page
       displays a suggestion to fix an error:
     AssertionError: Timed out retrying after 30000ms: Expected to find content: 'Select a smaller time range to reduce the number of results' within the element: <div.lv-plugin__table> but never did.
      at Context.eval (webpack://logging-view-plugin/./cypress/e2e/integration/logs-page.cy.ts:520:11)
      at withinFn (http://localhost:9003/__cypress/runner/cypress_runner.js:136019:8)
      at  (http://localhost:9003/__cypress/runner/cypress_runner.js:136100:16)
      at __WEBPACK_DEFAULT_EXPORT__ (http://localhost:9003/__cypress/runner/cypress_runner.js:133958:10)
      at Context.within (http://localhost:9003/__cypress/runner/cypress_runner.js:136086:67)
      at wrapped (http://localhost:9003/__cypress/runner/cypress_runner.js:141671:19)
[mochawesome] Report JSON saved to /logs/artifacts/cypress_report_003.json
  (Results)
  ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
  │ Tests:        21                                                                               │
  │ Passing:      20                                                                               │
  │ Failing:      1                                                                                │
  │ Pending:      0                                                                                │
  │ Skipped:      0                                                                                │
  │ Screenshots:  1                                                                                │
  │ Video:        false                                                                            │
  │ Duration:     1 minute, 33 seconds                                                             │
  │ Spec Ran:     logs-page.cy.ts                                                                  │
  └────────────────────────────────────────────────────────────────────────────────────────────────┘

@zhuje
Copy link
Copy Markdown
Contributor

zhuje commented May 14, 2026

/retest

@openshift-ci
Copy link
Copy Markdown
Contributor

openshift-ci Bot commented May 14, 2026

@PeterYurkovich: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/test-e2e 469e5ae link true /test test-e2e

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@PeterYurkovich
Copy link
Copy Markdown
Contributor Author

Seems like there is some other issue with the tests on main. I'll take a look when I have the chance

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants