Skip to content

Commit

Permalink
chore: cleanup eslint complains (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
erka authored Nov 22, 2024
1 parent 3a7f8b2 commit 9c27d08
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 12 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: UI

on:
push:
branches: [main]
paths:
- "ui/**"
pull_request:
branches: [main]
paths:
- "ui/**"

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
cache-dependency-path: ui/package-lock.json
- name: Setup
run: npm ci
working-directory: ui
- name: Lint
run: npm run lint
working-directory: ui
3 changes: 2 additions & 1 deletion ui/eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export default [
pluginReact.configs.flat.recommended,
{
rules: {
'react/react-in-jsx-scope': 'off'
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off'
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion ui/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SidebarInset, SidebarProvider, SidebarTrigger } from '@/components/ui/sidebar';
import { SidebarInset, SidebarProvider } from '@/components/ui/sidebar';
import { Sidebar } from '@/components/sidebar';
import { Outlet } from 'react-router-dom';
import { Header } from '@/components/header';
Expand Down
12 changes: 2 additions & 10 deletions ui/src/components/node-panel.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
import { PhaseNode } from '@/types/flow';
import {
Package,
GitBranch,
ChevronDown,
ChevronUp,
CheckCircle,
CircleArrowUp,
CircleAlert
} from 'lucide-react';
import { Package, GitBranch, ChevronDown, ChevronUp, CheckCircle, CircleAlert } from 'lucide-react';
import { TooltipProvider, TooltipTrigger, Tooltip, TooltipContent } from '@/components/ui/tooltip';
import { Button } from './ui/button';
import { cn } from '@/lib/utils';
Expand Down Expand Up @@ -103,7 +95,7 @@ export function NodePanel({ node, isExpanded, onToggle }: NodePanelProps) {
<div className="mt-2 flex flex-wrap gap-2">
{node.data.labels &&
Object.entries(node.data.labels).map(([key, value]) => (
<Label labelKey={key} value={value} />
<Label key={key} labelKey={key} value={value} />
))}
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions ui/src/components/ui/command.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const CommandInput = React.forwardRef<
React.ElementRef<typeof CommandPrimitive.Input>,
React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>
>(({ className, ...props }, ref) => (
// eslint-disable-next-line react/no-unknown-property -- https://github.com/shadcn-ui/ui/issues/3366
<div className="flex items-center border-b px-3" cmdk-input-wrapper="">
<Search className="mr-2 h-4 w-4 shrink-0 opacity-50" />
<CommandPrimitive.Input
Expand Down
1 change: 1 addition & 0 deletions ui/src/components/ui/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as React from 'react';

import { cn } from '@/lib/utils';

// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement> {}

const Input = React.forwardRef<HTMLInputElement, InputProps>(
Expand Down

0 comments on commit 9c27d08

Please sign in to comment.