Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[*.py]
indent_size = 4

[Makefile]
indent_style = tabs
indent_size = 2
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ build
vite.config.ts.timestamp*
*.d.ts
*.gen.ts
**/evalite-export
**/evalite-export
.astro
84 changes: 0 additions & 84 deletions apps/evalite-ui/.eslintrc.cjs

This file was deleted.

1 change: 0 additions & 1 deletion apps/evalite-ui/app/components/page-layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
BreadcrumbItem,
BreadcrumbLink,
BreadcrumbList,
BreadcrumbPage,
} from "./ui/breadcrumb";
import { Separator } from "./ui/separator";
import { SidebarTrigger } from "./ui/sidebar";
Expand Down
5 changes: 0 additions & 5 deletions apps/evalite-ui/app/components/ui/copy-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,6 @@ import * as React from "react";
import { CopyIcon, CheckIcon } from "lucide-react";
import { cn } from "~/lib/utils";
import { Button } from "~/components/ui/button";
import {
Tooltip,
TooltipContent,
TooltipTrigger,
} from "~/components/ui/tooltip";

interface CopyButtonProps
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
Expand Down
11 changes: 1 addition & 10 deletions apps/evalite-ui/app/components/ui/line-chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,7 @@ export function MyLineChart(props: {
type="linear"
className="--var"
strokeWidth={1}
activeDot={({
points,
payload,
height,
width,
className,
dataKey,
key,
...dotProps
}) => {
activeDot={({ payload, key, ...dotProps }) => {
const onClick = () => {
props.onDotClick({ date: payload.date });
};
Expand Down
5 changes: 1 addition & 4 deletions apps/evalite-ui/app/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import {
queryOptions,
useQueryClient,
useSuspenseQueries,
useSuspenseQuery,
} from "@tanstack/react-query";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import {
Expand Down Expand Up @@ -32,7 +31,6 @@ import {
getServerStateQueryOptions,
} from "~/data/queries";
import { useSubscribeToSocket } from "~/data/use-subscribe-to-socket";
import { useServerStateUtils } from "~/hooks/use-server-state-utils";
import "../tailwind.css";

const TanStackRouterDevtools =
Expand Down Expand Up @@ -125,7 +123,6 @@ export default function App() {
{
data: { groupedEvals, score, prevScore, evalStatus, hasScores },
},
{ data: serverState },
] = useSuspenseQueries({
queries: [getMenuItemsWithSelect, getServerStateQueryOptions],
});
Expand Down Expand Up @@ -169,7 +166,7 @@ export default function App() {
<SidebarGroup>
<SidebarGroupLabel>Evals</SidebarGroupLabel>
<SidebarMenu>
{groupedEvals.map((item, idx) => {
{groupedEvals.map((item) => {
if (item.type === "single") {
return (
<EvalSidebarItem
Expand Down
7 changes: 0 additions & 7 deletions apps/evalite-ui/app/routes/eval.$name.result.$resultIndex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import {
getResultQueryOptions,
getServerStateQueryOptions,
} from "~/data/queries";
import { useServerStateUtils } from "~/hooks/use-server-state-utils";

const searchSchema = z.object({
trace: z.number().optional(),
Expand Down Expand Up @@ -91,7 +90,6 @@ function ResultComponent() {
{
data: { result, prevResult, evaluation },
},
{ data: serverState },
] = useSuspenseQueries({
queries: [
getResultQueryOptions({
Expand All @@ -102,11 +100,6 @@ function ResultComponent() {
getServerStateQueryOptions,
],
});
const serverStateUtils = useServerStateUtils(serverState);

const isRunning =
serverStateUtils.isRunningEvalName(name) &&
evaluation.created_at === timestamp;

const startTime = result.traces[0]?.start_time ?? 0;
const endTime = result.traces[result.traces.length - 1]?.end_time ?? 0;
Expand Down
43 changes: 19 additions & 24 deletions apps/evalite-ui/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
import js from "@eslint/js";
import { defineConfig } from "eslint/config";
import globals from "globals";
import reactHooks from "eslint-plugin-react-hooks";
import reactRefresh from "eslint-plugin-react-refresh";
import tseslint from "typescript-eslint";
import rootConfig from "../../eslint.config.js";

export default tseslint.config(
{ ignores: ["dist"] },
{
extends: [js.configs.recommended, ...tseslint.configs.recommended],
files: ["**/*.{ts,tsx}"],
languageOptions: {
ecmaVersion: 2020,
globals: globals.browser,
},
plugins: {
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
},
}
);
export default defineConfig(...rootConfig, {
files: ["**/*.{ts,tsx}"],
languageOptions: {
globals: globals.browser,
},
plugins: {
"react-hooks": reactHooks,
"react-refresh": reactRefresh,
},
rules: {
...reactHooks.configs.recommended.rules,
"react-refresh/only-export-components": [
"warn",
{ allowConstantExport: true },
],
},
});
13 changes: 4 additions & 9 deletions apps/evalite-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"build": "vite build",
"after-build": "rm -rf ../../packages/evalite/dist/ui && cp -r dist ../../packages/evalite/dist/ui",
"dev": "vite",
"lint": "tsr generate && tsc",
"typecheck": "tsr generate && tsc --noEmit",
"lint": "eslint .",
"test": "vitest run"
},
"dependencies": {
Expand Down Expand Up @@ -48,16 +49,10 @@
"@tanstack/router-plugin": "^1.117.0",
"@types/react": "19.2.0",
"@types/react-dom": "19.2.0",
"@typescript-eslint/eslint-plugin": "^6.7.4",
"@typescript-eslint/parser": "^6.7.4",
"@vitejs/plugin-react": "^4.3.4",
"autoprefixer": "^10.4.19",
"eslint": "^8.38.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-import": "^2.28.1",
"eslint-plugin-jsx-a11y": "^6.7.1",
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.4.24",
"tailwindcss": "^4.1.11",
"tw-animate-css": "^1.3.5",
"typescript": "5.9.3",
Expand Down
41 changes: 41 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import js from "@eslint/js";
import { defineConfig } from "eslint/config";
import globals from "globals";
import tseslint from "typescript-eslint";

export default defineConfig(
{
ignores: [
"**/dist/**",
"**/.evalite/**",
"**/evalite.db",
"apps/evalite-docs/.astro/**",
"apps/evalite-docs/src/env.d.ts",
],
},
js.configs.recommended,
...tseslint.configs.recommended,
{
files: ["**/*.{ts,tsx,mts,cts}"],
languageOptions: {
ecmaVersion: 2022,
globals: {
...globals.node,
...globals.es2022,
},
},
rules: {
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
},
],
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-empty-object-type": "off",
"no-empty": ["error", { allowEmptyCatch: true }],
},
}
);
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
"dev": "pnpm build:evalite && pnpm build:evalite-ui && pnpm --filter evalite --filter evalite-tests --parallel run dev",
"test": "pnpm build && pnpm --filter evalite --filter evalite-tests test",
"example": "pnpm build && pnpm --filter example --filter evalite-ui --filter evalite --parallel dev",
"ci": "pnpm build && pnpm test && pnpm --filter evalite --filter evalite-tests lint && pnpm check-format",
"typecheck": "pnpm -r typecheck",
"lint": "eslint .",
"ci": "pnpm build && pnpm test && pnpm typecheck && pnpm lint && pnpm check-format",
"docs:dev": "(cd apps/evalite-docs && pnpm run dev)",
"release": "pnpm run build && changeset publish",
"prepare": "husky",
Expand All @@ -39,7 +41,11 @@
"typescript": "5.6.2"
},
"devDependencies": {
"lint-staged": "^16.2.4"
"@eslint/js": "^9.38.0",
"eslint": "^9.38.0",
"globals": "^16.4.0",
"lint-staged": "^16.2.6",
"typescript-eslint": "^8.46.2"
},
"lint-staged": {
"*": "prettier --write --ignore-unknown"
Expand Down
2 changes: 1 addition & 1 deletion packages/evalite-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"scripts": {
"dev": "vitest -w",
"test": "vitest run",
"lint": "tsc"
"typecheck": "tsc --noEmit"
},
"dependencies": {
"evalite": "workspace:*",
Expand Down
2 changes: 1 addition & 1 deletion packages/evalite-tests/tests/config.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, it, vi } from "vitest";
import { expect, it } from "vitest";
import { getEvalsAsRecordViaStorage, loadFixture } from "./test-utils.js";

it("Should ignore includes in a vite.config.ts", async () => {
Expand Down
Loading
Loading