Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b76c99e
lint fixes
InfinityBowman Dec 19, 2025
3fd6768
more lint fixes
InfinityBowman Dec 19, 2025
fc6dd02
Apply Prettier formatting
actions-user Dec 19, 2025
a826624
more lint fixes
InfinityBowman Dec 19, 2025
1fa562e
Merge branch '107-add-a-test-function-to-mcp' of https://github.com/I…
InfinityBowman Dec 19, 2025
9414784
Apply Prettier formatting
actions-user Dec 19, 2025
d964514
lint fixes
InfinityBowman Dec 19, 2025
ddbf9e2
Merge branch '107-add-a-test-function-to-mcp' of https://github.com/I…
InfinityBowman Dec 19, 2025
ceb3ee6
lint fixes
InfinityBowman Dec 19, 2025
7d6319f
Apply Prettier formatting
actions-user Dec 19, 2025
fe905ae
lint fixes
InfinityBowman Dec 19, 2025
dd34896
lint fixes
InfinityBowman Dec 19, 2025
8decd26
Merge branch '107-add-a-test-function-to-mcp' of https://github.com/I…
InfinityBowman Dec 19, 2025
593ad7b
Apply Prettier formatting
actions-user Dec 19, 2025
9a1012e
lint fixes
InfinityBowman Dec 19, 2025
7a09fcc
Merge branch '107-add-a-test-function-to-mcp' of https://github.com/I…
InfinityBowman Dec 19, 2025
f517ea9
Apply Prettier formatting
actions-user Dec 19, 2025
052b41e
better-auth-store rename
InfinityBowman Dec 19, 2025
1c422ec
Merge branch '107-add-a-test-function-to-mcp' of https://github.com/I…
InfinityBowman Dec 19, 2025
682bac0
fix tests
InfinityBowman Dec 19, 2025
495e01c
fix lint
InfinityBowman Dec 19, 2025
6498e0a
Apply Prettier formatting
actions-user Dec 19, 2025
87f33e7
lint fixes and bug fix
InfinityBowman Dec 19, 2025
2b7167c
all lint issues resolved
InfinityBowman Dec 19, 2025
ea593ee
fix issues caused by lint
InfinityBowman Dec 19, 2025
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
4 changes: 2 additions & 2 deletions .clauderc
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ Do not worry about migrations either client side or backend unless specifically

## Libraries

Use Zod for schema and input validation.
Use Zod for schema and input validation (backend).
Use Drizzle ORM for database interactions and migrations.
Use Better-Auth for authentication and user management.
Use Zag.js for UI components and design system.

## Documentation Tool

PLEASE USE THE CORATES MCP tools to explore local documentation sources. Use this MCP for all Better-Auth, Drizzle, Icons, and Zag documentation.
PLEASE USE THE CORATES MCP tools to explore local documentation sources. Use this MCP for all Better-Auth, Drizzle, Icons, and Zag documentation. For linting and testing, prefer using the CoRATES MCP.

## Zag.js

Expand Down
4 changes: 2 additions & 2 deletions .cursorrules
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ Do not worry about migrations either client side or backend unless specifically

## Libraries

Use Zod for schema and input validation.
Use Zod for schema and input validation (backend).
Use Drizzle ORM for database interactions and migrations.
Use Better-Auth for authentication and user management.
Use Zag.js for UI components and design system.

## Documentation Tool

PLEASE USE THE CORATES MCP tools to explore local documentation sources. Use this MCP for all Better-Auth, Drizzle, Icons, and Zag documentation.
PLEASE USE THE CORATES MCP tools to explore local documentation sources. Use this MCP for all Better-Auth, Drizzle, Icons, and Zag documentation. For linting and testing, prefer using the CoRATES MCP.

## Zag.js

Expand Down
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Use Zag.js for UI components and design system.

## Documentation Tool

PLEASE USE THE CORATES MCP tools to explore local documentation sources. Use this MCP for all Better-Auth, Drizzle, Icons, and Zag documentation. For linting, prefer using the MCP.
PLEASE USE THE CORATES MCP tools to explore local documentation sources. Use this MCP for all Better-Auth, Drizzle, Icons, and Zag documentation. For linting and testing, prefer using the CoRATES MCP.

## Zag.js

Expand Down
267 changes: 256 additions & 11 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
import js from '@eslint/js';
import solid from 'eslint-plugin-solid/configs/recommended';
import * as tsParser from '@typescript-eslint/parser';
// import eslintPluginUnicorn from 'eslint-plugin-unicorn';
// import sonarjs from 'eslint-plugin-sonarjs';
import eslintPluginUnicorn from 'eslint-plugin-unicorn';
import sonarjs from 'eslint-plugin-sonarjs';
Comment on lines +4 to +5
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

sonarjs plugin imported but not configured.

The eslint-plugin-sonarjs is imported and registered in the plugins object, but no sonarjs rules are actively configured (line 105 shows the only sonarjs rule commented out). This adds an unnecessary dependency without providing linting value.

Consider either:

  • Enabling useful sonarjs rules like sonarjs/cognitive-complexity, sonarjs/no-duplicate-string, etc.
  • Removing the sonarjs import and plugin registration until you're ready to configure it

Also applies to: 13-15

🤖 Prompt for AI Agents
In eslint.config.js around lines 4-5 and 13-15 the sonarjs plugin is imported
and registered but no sonarjs rules are enabled (the only rule is commented
out), leaving an unused dependency; either remove the import and plugin entry to
drop the unused dependency, or enable a sensible set of sonarjs rules (for
example sonarjs/cognitive-complexity, sonarjs/no-duplicate-string,
sonarjs/no-identical-expressions) by adding them to the rules object with
appropriate severity and thresholds so the plugin provides linting value.


export default [
js.configs.recommended,
solid,
// eslintPluginUnicorn.configs.recommended,
// {
// rules: {
// 'unicorn/better-regex': 'warn',
// },
// },
eslintPluginUnicorn.configs.recommended,
{
files: ['**/*.{js,jsx,ts,tsx}'],
// plugins: {
// sonarjs,
// },
plugins: {
sonarjs,
},
languageOptions: {
parser: tsParser,
parserOptions: {
Expand All @@ -30,6 +25,7 @@ export default [

globals: {
// Browser globals
structuredClone: 'readonly',
HTMLDivElement: 'readonly',
HTMLInputElement: 'readonly',
HTMLTextAreaElement: 'readonly',
Expand Down Expand Up @@ -108,6 +104,223 @@ export default [
},
],
// 'sonarjs/cognitive-complexity': 'error',

// Unicorn rules - customized for this project
// The recommended config is already applied above, these are overrides/customizations

// File naming - prefer camelCase, but allow kebab-case and PascalCase
// Set to warn so you can gradually fix file names
'unicorn/filename-case': [
'warn',
{
case: 'camelCase',
ignore: [
// Allow PascalCase for React/SolidJS components
/^[A-Z][a-zA-Z0-9]*\.(jsx|tsx)$/,
// Allow kebab-case for config files
/^(eslint|prettier|vite|wrangler|jsconfig|tsconfig)\.(js|ts|json)$/,
// Allow UPPER_CASE for constants/config
/^[A-Z_]+\.(js|ts)$/,
// Allow kebab-case files (common in many projects)
/^[a-z]+(-[a-z]+)*\.(js|jsx|ts|tsx)$/,
],
},
],

// Prevent abbreviations - warn instead of error for flexibility
'unicorn/prevent-abbreviations': [
'warn',
{
replacements: {
// Common abbreviations to allow
args: false,
db: false,
err: false,
req: false,
res: false,
temp: false,
tmp: false,
doc: false,
env: false,
i: false,
obj: false,
ext: false,
val: false,
num: false,
ctx: false,
params: false,
dir: false,
el: false,
acc: false,
utils: false,
def: false,
// React/SolidJS common patterns
prev: false,
props: false,
// Project-specific
ops: false,
ref: false,
refs: false,
// Common abbreviations in codebases
lib: false,
docs: false,
msg: false,
cb: false,
idx: false,
j: false,
e: false,
},
},
],

// Allow null for compatibility with some APIs and patterns
'unicorn/no-null': 'off',

// Prefer top-level await - warn since it requires ES2022
'unicorn/prefer-top-level-await': 'warn',

// Allow 'err', 'error', or 'e' as catch parameter name
'unicorn/catch-error-name': ['error', { name: 'err', ignore: ['error', 'e', '_e'] }],

// Disable prefer-global-this for browser code - window is more idiomatic
'unicorn/prefer-global-this': 'off',

// Disable prefer-add-event-listener - IndexedDB and other APIs use onerror/onsuccess handlers
'unicorn/prefer-add-event-listener': 'off',

// Disable or relax rules that are too strict or have too many violations
// These can be gradually enabled as code is refactored

// Switch case braces - many violations, but easy to fix
// 'unicorn/switch-case-braces': 'warn', // Consider enabling as warn first

// Consistent function scoping - can be noisy, especially in React/SolidJS components
'unicorn/consistent-function-scoping': 'off',

// Array forEach - many violations, but forEach is sometimes more readable
'unicorn/no-array-for-each': 'warn',

// String replaceAll - many violations, but replace() is fine for single replacements
'unicorn/prefer-string-replace-all': 'warn',

// Number properties - parseInt/parseFloat are widely understood
'unicorn/prefer-number-properties': 'warn',

// Numeric separators - nice to have but not critical
'unicorn/numeric-separators-style': 'warn',

// Structured clone - JSON.parse(JSON.stringify()) is fine for simple cases
'unicorn/prefer-structured-clone': 'error',

// Node protocol - disabled, standard imports are fine
'unicorn/prefer-node-protocol': 'off',

// Array sort - toSorted() is newer, sort() is fine for now
'unicorn/no-array-sort': 'warn',

// Nested ternary - disabled, nested ternaries are acceptable
'unicorn/no-nested-ternary': 'off',

// New array - disabled, new Array() is fine and used for arraybuffers
'unicorn/no-new-array': 'off',

// Explicit length check - `array.length > 0` vs `array.length`
'unicorn/explicit-length-check': 'warn',

// Additional rules to disable/warn for gradual adoption
// Switch case braces - disabled, braces in case clauses are optional
'unicorn/switch-case-braces': 'off',

// Response static JSON - Cloudflare Workers pattern
// 'unicorn/prefer-response-static-json': 'off',

// Spread operator - can be adopted gradually
'unicorn/prefer-spread': 'off',

// Await expression member - can be fixed gradually
'unicorn/no-await-expression-member': 'warn',

// Array.at() - newer API, can be adopted gradually
'unicorn/prefer-at': 'warn',

// Negated condition - style preference
'unicorn/no-negated-condition': 'warn',

// Zero fractions - can be fixed gradually
'unicorn/no-zero-fractions': 'warn',

// Prefer ternary - style preference
'unicorn/prefer-ternary': 'warn',

// Useless undefined - can be fixed gradually
'unicorn/no-useless-undefined': 'warn',

// For loop - for...of is preferred but for loops are fine
'unicorn/no-for-loop': 'warn',

// Prefer switch - disabled, if statements are fine
'unicorn/prefer-switch': 'off',

// DOM node append - can be adopted gradually
'unicorn/prefer-dom-node-append': 'warn',

// Array indexOf - can be adopted gradually
'unicorn/prefer-array-index-of': 'warn',

// Additional rules for gradual adoption
// Prefer single call - style preference
'unicorn/prefer-single-call': 'off',

// Prefer includes - can be adopted gradually
'unicorn/prefer-includes': 'warn',

// Prefer export from - can be adopted gradually
'unicorn/prefer-export-from': 'warn',

// Number literal case - style preference
'unicorn/number-literal-case': 'off',

// Lonely if - style preference
'unicorn/no-lonely-if': 'warn',

// Array callback reference - can be adopted gradually
'unicorn/no-array-callback-reference': 'off',

// DOM node remove - can be adopted gradually
'unicorn/prefer-dom-node-remove': 'warn',

// Prefer set has - can be adopted gradually
'unicorn/prefer-set-has': 'warn',

// Prefer query selector - getElementById is fine
'unicorn/prefer-query-selector': 'warn',

// Optional catch binding - can be adopted gradually
'unicorn/prefer-optional-catch-binding': 'warn',

// Useless fallback in spread - can be fixed gradually
'unicorn/no-useless-fallback-in-spread': 'warn',

// Array reduce - reduce is fine, can be adopted gradually
'unicorn/no-array-reduce': 'warn',

// New for builtins - can be adopted gradually
'unicorn/new-for-builtins': 'warn',

// String slice - substring is fine
'unicorn/prefer-string-slice': 'warn',

// String raw - can be adopted gradually
'unicorn/prefer-string-raw': 'warn',

// Blob reading methods - can be adopted gradually
'unicorn/prefer-blob-reading-methods': 'warn',

// Immediate mutation - can be fixed gradually
'unicorn/no-immediate-mutation': 'warn',

// Import style - can be adopted gradually
'unicorn/import-style': 'warn',
},
},
{
Expand All @@ -132,6 +345,34 @@ export default [
},
rules: {},
},
{
// Durable objects configuration - allow PascalCase file names
files: ['**/durable-objects/**/*.{js,jsx,ts,tsx}'],
rules: {
'unicorn/filename-case': 'off',
},
},
{
// Scripts and config files - disable all unicorn rules
files: [
'**/scripts/**/*.{js,jsx,ts,tsx,mjs}',
'**/vite.config.{js,ts,mjs}',
'**/*.config.{js,ts,mjs}',
],
rules: Object.fromEntries(
Object.keys(eslintPluginUnicorn.rules).map(rule => [`unicorn/${rule}`, 'off']),
),
},
{
// MCP package - more lenient rules for tooling code
files: ['**/mcp/**/*.{js,jsx,ts,tsx,mjs}'],
rules: {
'unicorn/filename-case': 'off', // Allow camelCase for tool files
'unicorn/prefer-node-protocol': 'off', // Standard imports are fine
'unicorn/no-process-exit': 'off', // CLI tools need process.exit
'unicorn/prevent-abbreviations': 'off', // More lenient for tooling
},
},
{
// Service worker configuration
files: ['**/sw.js', '**/service-worker.js'],
Expand All @@ -145,6 +386,10 @@ export default [
ServiceWorkerGlobalScope: 'readonly',
},
},
rules: {
// 'self' is the standard in service workers, not 'globalThis'
'unicorn/prefer-global-this': 'off',
},
},
{
ignores: [
Expand Down
2 changes: 1 addition & 1 deletion packages/landing/public/sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ self.addEventListener('install', event => {
}
}

const buildAssets = Array.from(discovered);
const buildAssets = [...discovered];
console.log('[SW] Caching', buildAssets.length, 'build assets');

for (const url of buildAssets) {
Expand Down
2 changes: 1 addition & 1 deletion packages/landing/src/components/PrefetchLink.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function prefetch(href) {
const link = document.createElement('link');
link.rel = 'prefetch';
link.href = href;
document.head.appendChild(link);
document.head.append(link);
}

export default function PrefetchLink(props) {
Expand Down
2 changes: 1 addition & 1 deletion packages/landing/src/entry-client.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ if ('serviceWorker' in navigator) {
});
}

mount(() => <StartClient />, document.getElementById('app'));
mount(() => <StartClient />, document.querySelector('#app'));
2 changes: 1 addition & 1 deletion packages/mcp/iconSearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async function loadManifest() {

app.get('/search', async (req, res) => {
const q = (req.query.q || '').toLowerCase();
const limit = parseInt(req.query.limit || '20', 10);
const limit = Number.parseInt(req.query.limit || '20', 10);
const manifest = await loadManifest();

const results = [];
Expand Down
5 changes: 1 addition & 4 deletions packages/mcp/scrape-icons.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,4 @@ async function main() {
console.log(`Manifest written to ${outFile}`);
}

main().catch(err => {
console.error(err);
process.exit(1);
});
await main();
Loading