Files
TehRiehlDeal 6c652e7138 refactor: centralize theme/config/utils + fix data and console bugs
Phase 1 of the cohesion refactor (behavior-preserving):

Single source of truth:
- New src/lib/theme.ts: category colors (moved from data.ts, re-exported
  for back-compat), derived hex strings, nebula palette, UI colors, CSS var map
- New src/lib/config.ts: breakpoint, zoom, parallax, node radii, particle
  counts, animation timings (previously scattered magic numbers)
- New src/lib/utils/tree.ts: getNodeById, getNodeRadius, getDistanceFromOrigin,
  getBeamIntensity (pure helpers lifted out of onMount)
- New src/lib/utils/stats.ts: branch ids/labels, proficiency order, and the
  stats-panel aggregation helpers (deduped from inline copies)
- SkillTree.svelte now imports all of the above; removed the duplicated
  getCategoryColorHex, stats helpers, branch id/label lists, and inline magic numbers
- Populated src/lib/index.ts barrel

Bug fixes:
- data.ts: tmdbAPI pypiUrl pointed at tvdbAPI -> corrected to tmdbAPI
- Removed/ gated stray console.log noise (skill-tree-loaded, SW logs)
- Removed dead vars (maxAlpha, glowMaxAlpha) and unused catch binding

Tooling: ESLint + Prettier now clean; added Vitest unit tests for the new
pure utils (14 tests). svelte-check: 0 errors. build: ok.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 09:40:27 -07:00

29 lines
748 B
JavaScript

import svelteConfig from '@sveltejs/eslint-config';
/** @type {import('eslint').Linter.Config[]} */
export default [
{
ignores: ['build/', '.svelte-kit/', 'static/', 'node_modules/']
},
...svelteConfig,
{
rules: {
// This is a static, client-only portfolio whose links point at external
// URLs (projects, resume, mailto). The resolve() rule targets SvelteKit
// internal navigation, so it only produces false positives here.
'svelte/no-navigation-without-resolve': 'off'
}
},
{
// Service worker runs in a ServiceWorkerGlobalScope, not the browser/node defaults.
files: ['static/service-worker.js'],
languageOptions: {
globals: {
self: 'readonly',
caches: 'readonly',
fetch: 'readonly'
}
}
}
];