Skip to content
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

ui: set up eslint-plugin-crdb for db-console #84856

Merged

Conversation

sjbarag
Copy link
Contributor

@sjbarag sjbarag commented Jul 21, 2022

When the custom eslint-plugin-crdb was added to this repo [1], it was
accidentally only configured in the cluster-ui subproject. Add
eslint-plugin-crdb to the db-console subproject, fixing a lint failure
in the process.

[1] ba68179 (ui: use esbuild-loader in webpack configs, 2022-05-26)

Release note: None

When the custom eslint-plugin-crdb was added to this repo [1], it was
accidentally only configured in the cluster-ui subproject. Add
eslint-plugin-crdb to the db-console subproject, fixing a lint failure
in the process.

[1] ba68179 (ui: use esbuild-loader in webpack configs, 2022-05-26)

Release note: None
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@sjbarag sjbarag requested review from a team July 21, 2022 17:02
Copy link
Contributor

@maryliag maryliag left a comment

Choose a reason for hiding this comment

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

just one questions, otherwise :lgtm:

Reviewed 4 of 5 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @maryliag and @sjbarag)


pkg/ui/workspaces/db-console/src/views/tracez/tracez.tsx line 41 at r1 (raw file):

import { CaretRight } from "@cockroachlabs/icons";
import { Switch } from "antd";
import "antd/lib/switch/style";

where is this being used?

Copy link
Contributor Author

@sjbarag sjbarag left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @maryliag)


pkg/ui/workspaces/db-console/src/views/tracez/tracez.tsx line 41 at r1 (raw file):

Previously, maryliag (Marylia Gutierrez) wrote…

where is this being used?

Technically nowhere, but the import is required to make sure the <Switch/> component gets the correct styling. We used to use https://github.com/umijs/babel-plugin-import to include this import at build-time, but the move to esbuild-loader meant we can't use a babel plugin. The eslint plugin is there to make sure we do this manually :)

Copy link
Contributor

@maryliag maryliag left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @maryliag and @sjbarag)


pkg/ui/workspaces/db-console/src/views/tracez/tracez.tsx line 41 at r1 (raw file):

Previously, sjbarag (Sean Barag) wrote…

Technically nowhere, but the import is required to make sure the <Switch/> component gets the correct styling. We used to use https://github.com/umijs/babel-plugin-import to include this import at build-time, but the move to esbuild-loader meant we can't use a babel plugin. The eslint plugin is there to make sure we do this manually :)

Ah okay, thanks for the explanation!

@sjbarag
Copy link
Contributor Author

sjbarag commented Jul 21, 2022

borsr=maryliag

@sjbarag
Copy link
Contributor Author

sjbarag commented Jul 21, 2022

erm, let's try that again:

bors r=maryliag

@craig
Copy link
Contributor

craig bot commented Jul 21, 2022

Build succeeded:

@craig craig bot merged commit c73adb1 into cockroachdb:master Jul 21, 2022
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.

3 participants