Skip to content

Conversation

paulovmr
Copy link

Currently, some typescript files use named imports and others use namespace imports to import React Hooks. This PR enforces through ESLint that React Hooks must be imported using named imports, as a way to organize and standardize the frontend code.

With this PR, if a React Hook is used with the React. prefix, there will be a lint error, for example:

error  Import React hook "useMemo" directly instead of using React.useMemo          no-react-hook-namespace

@paulovmr
Copy link
Author

/ok-to-test

@caponetto
Copy link

/lgtm

@ederign
Copy link
Member

ederign commented Jun 16, 2025

@paulovmr PR lgtm, but needs a rebase.

@paulovmr paulovmr force-pushed the notebooks-v2-standardize-react-imports branch from 93101db to 7a41950 Compare June 16, 2025 20:43
@google-oss-prow google-oss-prow bot removed the lgtm label Jun 16, 2025
@ederign
Copy link
Member

ederign commented Jun 16, 2025

/approve
/lgtm

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ederign

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

The pull request process is described here

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

@google-oss-prow google-oss-prow bot merged commit 6f6ba50 into kubeflow:notebooks-v2 Jun 16, 2025
6 of 7 checks passed
@github-project-automation github-project-automation bot moved this from Needs Triage to Done in Kubeflow Notebooks Jun 16, 2025
bhaktinarvekar pushed a commit to bhaktinarvekar/notebooks that referenced this pull request Sep 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants