Initial commit

This commit is contained in:
2026-07-03 18:10:26 +00:00
commit 5b23824a56
12 changed files with 2004 additions and 0 deletions
+24
View File
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
+5
View File
@@ -0,0 +1,5 @@
{
"useTabs": true,
"tabWidth": 4,
"printWidth": 70
}
View File
+55
View File
@@ -0,0 +1,55 @@
import js from "@eslint/js";
import tseslint from "typescript-eslint";
import { defineConfig, globalIgnores } from "eslint/config";
export default defineConfig([
globalIgnores(["dist"]),
{
files: ["**/*.{ts,tsx}"],
extends: [
js.configs.recommended,
tseslint.configs.strictTypeChecked,
tseslint.configs.stylisticTypeChecked,
],
rules: {
"@typescript-eslint/array-type": [
"error",
{
default: "array",
},
],
"@typescript-eslint/consistent-generic-constructors": [
"error",
"constructor",
],
"@typescript-eslint/no-unsafe-type-assertion": "error",
"@typescript-eslint/strict-boolean-expressions": "error",
"@typescript-eslint/switch-exhaustiveness-check": [
"error",
{
requireDefaultForNonUnion: true,
considerDefaultExhaustiveForUnions: true,
},
],
"no-extra-boolean-cast": "off",
"no-fallthrough": [
"error",
{
reportUnusedFallthroughComment: true,
},
],
"@typescript-eslint/no-unused-vars": [
"error",
{
varsIgnorePattern: "^_",
reportUsedIgnorePattern: true,
},
],
},
languageOptions: {
parserOptions: {
projectService: true,
},
},
},
]);
+13
View File
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Application</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
+25
View File
@@ -0,0 +1,25 @@
{
"name": "graph",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"test": "vitest --run --reporter=tree",
"build": "tsc -b && esbuild --minify --bundle src/index.ts --outdir=dist --define:import.meta.vitest=undefined",
"fmt": "prettier --write .",
"lint": "eslint .",
"preview": "vite preview"
},
"devDependencies": {
"@eslint/js": "^10.0.1",
"@types/node": "^24.12.3",
"@typescript-eslint/types": "^8.61.1",
"esbuild": "^0.28.1",
"eslint": "^10.3.0",
"jiti": "^2.7.0",
"prettier": "^3.8.4",
"typescript": "~6.0.2",
"typescript-eslint": "^8.59.2",
"vitest": "^4.1.9"
}
}
+1813
View File
File diff suppressed because it is too large Load Diff
+10
View File
@@ -0,0 +1,10 @@
function add(a: number, b: number): number {
return a + b;
}
if (import.meta.vitest) {
const { it, expect } = import.meta.vitest;
it("adds", () => {
expect(add(1, 2)).toBe(3);
});
}
+24
View File
@@ -0,0 +1,24 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"target": "es2023",
"lib": ["ES2023"],
"module": "esnext",
"types": ["vitest/importMeta"],
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"moduleDetection": "force",
"noEmit": true,
"jsx": "react-jsx",
/* Linting */
"noUnusedLocals": false,
"noUncheckedIndexedAccess": true,
"erasableSyntaxOnly": true,
},
"include": ["src", "tests"]
}
+7
View File
@@ -0,0 +1,7 @@
{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
]
}
+21
View File
@@ -0,0 +1,21 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "es2023",
"lib": ["ES2023"],
"module": "esnext",
"types": ["node"],
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"moduleDetection": "force",
"noEmit": true,
/* Linting */
"erasableSyntaxOnly": true,
},
"include": ["./*.config.ts", ".config/**/*"]
}
+7
View File
@@ -0,0 +1,7 @@
import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
includeSource: ["src/**/*.{ts,mts,cts}"],
},
});