Skip to content
Merged
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
1 change: 1 addition & 0 deletions .cfignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Cloudflare Pages - Skip build dependencies
# The project is built via GitHub Actions and artifacts are deployed

node_modules/
src/
public/
Expand Down
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,3 @@ indent_size = 2
[*.{md,mdx}]
indent_size = 2
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
*.png binary
*.gif binary
*.webp binary
*.svg binary
*.ico binary
*.mp4 binary
*.mov binary
Expand Down
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Thumbs.db
node_modules/
.pnpm-store/

# Build outputs
# Build output
dist/
build/

Expand Down Expand Up @@ -41,6 +41,9 @@ test-results/
!.vscode/settings.json
!.vscode/extensions.json
.idea/
*.iml
.zed/
.cursor/
*.swp
*.swo
*~
Expand All @@ -62,3 +65,7 @@ temp/

# Husky runtime
.husky/_/

# Minified files
*.min.js
*.min.css
10 changes: 10 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# npm ignore file
# Even for private repos, good practice to define what would be published

# Ignore everything
*

# Except these
!dist/**
!README.md
!LICENSE
8 changes: 8 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,11 @@ build/
**/*.min.js
**/*.min.css
vite.config.*.timestamp-*

# JSON is handled by Biome
*.json

# Generated files
CLAUDE.md
.rules
CHANGELOG.md
32 changes: 21 additions & 11 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@
"indentWidth": 4,
"lineWidth": 120,
"lineEnding": "lf",
"formatWithErrors": true
},
"assist": {
"enabled": false
"formatWithErrors": true,
"attributePosition": "auto"
},
"assist": { "actions": { "source": { "organizeImports": "off" } } },
"javascript": {
"formatter": {
"quoteStyle": "single",
"trailingCommas": "all",
"semicolons": "always",
"arrowParentheses": "always"
"arrowParentheses": "always",
"bracketSpacing": true,
"bracketSameLine": false,
"quoteProperties": "asNeeded"
}
},
"json": {
Expand All @@ -36,14 +38,14 @@
},
"css": {
"parser": {
"cssModules": false,
"cssModules": true,
"allowWrongLineComments": false,
"tailwindDirectives": true
},
"formatter": {
"indentWidth": 4,
"lineWidth": 100,
"quoteStyle": "double"
"quoteStyle": "single"
},
"linter": {
"enabled": true
Expand All @@ -53,23 +55,31 @@
"enabled": true,
"rules": {
"recommended": true,
"style": {
"noNonNullAssertion": "warn",
"useConst": "error",
"useBlockStatements": "off",
"noParameterAssign": "warn",
"useImportType": "error"
},
"suspicious": {
"noExplicitAny": "warn",
"noDebugger": "error",
"noConsole": "off",
"noImplicitAnyLet": "off"
},
"style": {
"noNonNullAssertion": "warn",
"useImportType": "error"
},
"correctness": {
"noUnusedVariables": "error",
"noUnusedImports": "error",
"noVoidTypeReturn": "off"
},
"complexity": {
"noForEach": "off",
"noStaticOnlyClass": "off",
"noThisInStatic": "off"
},
"security": {
"noDangerouslySetInnerHtml": "error"
}
}
},
Expand Down
19 changes: 6 additions & 13 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"version": "0.2",
"language": "en",
"allowCompoundWords": true,
"dictionaries": ["typescript", "node", "html", "css", "fonts", "npm", "softwareTerms"],
"words": [
"ambilab",
"atlases",
"Ambilab",
"bindgroup",
"bindgroups",
"biomejs",
Expand All @@ -13,40 +13,32 @@
"BTAPI",
"btfont",
"cfignore",
"Cietwierkowski",
"codecov",
"commitlint",
"cooldown",
"cooldowns",
"dbaeumer",
"esbuild",
"Fabrizio",
"gamepad",
"invinc",
"nsis",
"onuncapturederror",
"pnpm",
"rects",
"retroblit",
"RGBA",
"rgba8unorm",
"Rollup",
"Schiavi",
"spritesheet",
"subsystem",
"subsystems",
"texcoord",
"tilemap",
"timestep",
"unorm",
"Václav",
"Vančura",
"Vite",
"Vitest",
"Václav",
"WASD",
"WebGPU",
"webstorm",
"WGSL",
"yoffset"
],
"flagWords": ["cant", "dont", "hte", "teh", "wont"],
Expand All @@ -56,12 +48,13 @@
".git",
".pnpm-store",
"CHANGELOG.md",
"CLAUDE.md",
"coverage",
"dist",
"node_modules",
"pnpm-lock.yaml"
],
"ignoreRegExpList": ["/#[0-9A-Fa-f]{6,8}/", "/0x[0-9A-Fa-f]+/", "/@[a-zA-Z0-9_-]+\\/[a-zA-Z0-9_-]+/"],
"ignoreRegExpList": ["/#[0-9A-Fa-f]{3,8}/", "/0x[0-9A-Fa-f]+/", "/@[a-zA-Z0-9_-]+\\/[a-zA-Z0-9_-]+/"],
"overrides": [
{
"filename": "**/*.ts",
Expand Down
8 changes: 4 additions & 4 deletions demos/styles.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@import "tailwindcss";
@import 'tailwindcss';

@theme {
/* Accent color - unified blue theme */
Expand All @@ -17,7 +17,7 @@
--color-success: #2ecc71;

/* Font family */
--font-mono: "Courier New", monospace;
--font-mono: 'Courier New', monospace;
}

/* Canvas pixel-perfect rendering - using both values for cross-browser support */
Expand All @@ -35,14 +35,14 @@ canvas {

/* List marker styling */
.info-list li::before {
content: "\25B8";
content: '\25B8';
position: absolute;
left: 0;
color: var(--color-accent);
}

.check-list li::before {
content: "\2713";
content: '\2713';
position: absolute;
left: 0;
color: var(--color-success);
Expand Down
5 changes: 5 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ export default [
'.pnpm-store/**',
'**/.pnpm-store/**',
'vite.config.ts.timestamp-*',
'CLAUDE.md',
'.rules',
],
},

Expand Down Expand Up @@ -99,6 +101,9 @@ export default [
...promisePlugin.configs.recommended.rules,
'promise/always-return': 'warn',
'promise/catch-or-return': 'warn',
'promise/no-return-wrap': 'error',
'promise/param-names': 'error',
'promise/no-nesting': 'warn',

// Security rules
...securityPlugin.configs.recommended.rules,
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@
"preflight": "pnpm format:check && pnpm lint && pnpm typecheck && pnpm spellcheck",
"clean": "rm -rf dist node_modules/.vite",
"sync-rules": "node scripts/sync-rules.mjs",
"prepare": "husky"
"prepare": "husky",
"security:audit": "pnpm audit --audit-level=moderate",
"security:audit:fix": "pnpm audit --fix"
},
"packageManager": "pnpm@10.24.0+sha512.01ff8ae71b4419903b65c60fb2dc9d34cf8bb6e06d03bde112ef38f7a34d6904c424ba66bea5cdcf12890230bf39f9580473140ed9c946fef328b6e5238a345a",
"dependencies": {
Expand Down
4 changes: 3 additions & 1 deletion prettier.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ export default {
// Base settings (applied to Markdown/YAML)
semi: true,
singleQuote: true,
tabWidth: 2,
tabWidth: 4,
useTabs: false,
trailingComma: 'all',
printWidth: 120,
endOfLine: 'lf',
proseWrap: 'always',
htmlWhitespaceSensitivity: 'css',

overrides: [
{
Expand Down
4 changes: 0 additions & 4 deletions scripts/sync-rules.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
#!/usr/bin/env node

/* eslint-disable security/detect-object-injection */

/**
* Sync AI assistant rules across different tools.
*
Expand Down Expand Up @@ -110,7 +106,7 @@
const enabledTargets = Object.entries(targets)
.filter(([, enabled]) => enabled)
.map(([name]) => {
if (!TARGETS[name]) {

Check warning on line 109 in scripts/sync-rules.mjs

View workflow job for this annotation

GitHub Actions / Code Quality

Generic Object Injection Sink

Check warning on line 109 in scripts/sync-rules.mjs

View workflow job for this annotation

GitHub Actions / Code Quality

Generic Object Injection Sink
throw new Error(`Unknown target "${name}" in syncRules.targets`);
}
return name;
Expand Down Expand Up @@ -245,7 +241,7 @@
// Generate each target
let step = 2;
for (const targetName of config.targets) {
const target = TARGETS[targetName];

Check warning on line 244 in scripts/sync-rules.mjs

View workflow job for this annotation

GitHub Actions / Code Quality

Variable Assigned to Object Injection Sink

Check warning on line 244 in scripts/sync-rules.mjs

View workflow job for this annotation

GitHub Actions / Code Quality

Variable Assigned to Object Injection Sink
console.log(`${step}. Generating ${target.description}`);
target.generate(rules);
step++;
Expand All @@ -255,7 +251,7 @@
console.log('\nDone! Rules synced successfully.');
console.log('\nGenerated:');
for (const targetName of config.targets) {
console.log(` - ${TARGETS[targetName].description}`);

Check warning on line 254 in scripts/sync-rules.mjs

View workflow job for this annotation

GitHub Actions / Code Quality

Generic Object Injection Sink

Check warning on line 254 in scripts/sync-rules.mjs

View workflow job for this annotation

GitHub Actions / Code Quality

Generic Object Injection Sink
}
console.log(`\nSource of truth: ${config.source}/*.mdc`);
}
Expand Down