Skip to content
Open
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
20 changes: 20 additions & 0 deletions .eslintrc.old.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:prettier/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs', 'docs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ pnpm-debug.log*
lerna-debug.log*

node_modules
dist
dist-ssr
/docs
*.local

# Editor directories and files
Expand Down
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"semi": false,
"singleQuote": true,
"trailingComma": "es5"
}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ HackerNews discussion: https://news.ycombinator.com/item?id=44767775
- Default model: Llama-3.2-1B

## WebGPU Browser and OS Compatibility

<picture>
<source type="image/webp" srcset="https://caniuse.bitsofco.de/image/webgpu.webp">
<source type="image/png" srcset="https://caniuse.bitsofco.de/image/webgpu.png">
<img src="https://caniuse.bitsofco.de/image/webgpu.jpg" alt="Data on support for the webgpu feature across the major browsers from caniuse.com">
</picture>
</picture>
226 changes: 0 additions & 226 deletions docs/assets/index-COeyAUXx.js

This file was deleted.

14 changes: 0 additions & 14 deletions docs/index.html

This file was deleted.

31 changes: 31 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import globals from "globals";
import tseslint from "typescript-eslint";
import reactRecommended from "eslint-plugin-react/configs/recommended.js";
import eslintConfigPrettier from "eslint-config-prettier";

export default tseslint.config(
{
ignores: ["dist/", "docs/", ".eslintrc.old.cjs", "eslint.config.js"],
},
...tseslint.configs.recommended,
{
...reactRecommended,
files: ["**/*.{js,jsx,ts,tsx}"],
languageOptions: {
...reactRecommended.languageOptions,
globals: {
...globals.browser,
},
},
settings: {
react: {
version: "detect",
},
},
rules: {
...reactRecommended.rules,
"react/react-in-jsx-scope": "off",
}
},
eslintConfigPrettier
);
19 changes: 9 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Browser LLM</title>
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/github-fork-ribbon-css/0.2.3/gh-fork-ribbon.min.css"/>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
<link rel="stylesheet" href="/src/assets/gh-fork-ribbon.min.css" />
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
14 changes: 13 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"preview": "vite preview"
"preview": "vite preview",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"format": "prettier --write ."
},
"dependencies": {
"@emotion/react": "^11.14.0",
Expand All @@ -23,10 +25,20 @@
"react-syntax-highlighter": "^15.6.1"
},
"devDependencies": {
"@eslint/js": "^9.32.0",
"@types/react-dom": "^19.1.7",
"@typescript-eslint/eslint-plugin": "^8.39.0",
"@typescript-eslint/parser": "^8.39.0",
"@vitejs/plugin-react": "^4.7.0",
"@webgpu/types": "^0.1.64",
"eslint": "^9.32.0",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-prettier": "^5.5.3",
"eslint-plugin-react": "^7.37.5",
"globals": "^16.3.0",
"prettier": "^3.6.2",
"typescript": "~5.8.3",
"typescript-eslint": "^8.39.0",
"vite": "^7.0.4"
}
}
Loading