Files
loto/web/eslint.config.mjs
T
tiennm99 8b9468a701 feat(settings): empty-cell color picker with persisted store
Adds a gear button + modal on /, /master with a native color picker
and 8 preset swatches for the empty-cell background. The selected
color repaints both the player card AND the master tracking grid via
the --empty-cell-bg CSS variable. Default brown matches the physical
Minh Tân paper card.

settings-store.svelte.js: Svelte 5 rune-based reactive store, state
hydrated on layout mount, persisted to localStorage key loto_settings.
Validates hex (#rrggbb regex) before applying — keeps the CSS sink
safe and ignores corrupt or shorthand-3-digit payloads.

SettingsButton.svelte: gear icon, modal with picker + presets + reset
+ close, escape-to-close via window keydown listener (the trigger
button retains focus on open, so a dialog-scoped handler would miss).

eslint.config.mjs: declares Svelte 5 rune globals so .svelte.js stores
lint clean.

Docs synced: PDR, codebase-summary, system-architecture, roadmap.
2026-04-27 00:13:39 +07:00

36 lines
776 B
JavaScript

import js from "@eslint/js";
import svelte from "eslint-plugin-svelte";
import globals from "globals";
export default [
js.configs.recommended,
...svelte.configs["flat/recommended"],
{
languageOptions: {
ecmaVersion: "latest",
sourceType: "module",
globals: {
...globals.browser,
...globals.node,
// Svelte 5 runes — usable inside .svelte and .svelte.js files.
$state: "readonly",
$derived: "readonly",
$effect: "readonly",
$props: "readonly",
$bindable: "readonly",
$inspect: "readonly",
$host: "readonly",
},
},
},
{
ignores: [
"build/**",
".svelte-kit/**",
"node_modules/**",
"plans/**",
"docs/**",
],
},
];