The dark palette lives as a single :root[data-theme='dark'] block in tokens.css; theme.ts and the pre-paint public/theme-init.js (external file because the prod CSP forbids inline scripts) always resolve the stored ui.theme.mode to a concrete data-theme, so 'system' needs no @media duplicate and follows live OS changes via matchMedia. color-scheme flips per theme (native controls/scrollbars), paired theme-color metas track the effective theme, and the new Appearance settings section offers the three-way choice as native radios (device-local, like #170). Label chips gain a chip-outline ring so arbitrary user colors stay separated on the dark canvas; useEffectiveTheme() is exported for the later pond-scoped theming stage (ADR 0018). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QRtCnB3uLdQtFmvp9HXcRX
62 lines
1.8 KiB
JavaScript
62 lines
1.8 KiB
JavaScript
// Repo-wide ESLint flat config. Packages inherit these rules; add
|
|
// package-specific overrides here (scoped by `files`) rather than with
|
|
// per-package config files, so rules stay consistent across the monorepo.
|
|
import js from '@eslint/js';
|
|
import tseslint from 'typescript-eslint';
|
|
import prettier from 'eslint-config-prettier';
|
|
|
|
export default tseslint.config(
|
|
{
|
|
ignores: [
|
|
'**/dist/**',
|
|
// Vendored third-party apps bundled into plugins (drawio) — never linted.
|
|
'packages/plugins/*/vendor/**',
|
|
'**/node_modules/**',
|
|
'**/coverage/**',
|
|
'**/.pnpm-store/**',
|
|
'**/*.gen.ts',
|
|
// Runtime data volumes (installed plugin bundles, uploads) — not source.
|
|
'apps/api/data/**',
|
|
],
|
|
},
|
|
js.configs.recommended,
|
|
...tseslint.configs.recommended,
|
|
prettier,
|
|
{
|
|
// Plain-Node maintenance/build scripts (no TypeScript, no bundler).
|
|
files: ['scripts/**/*.mjs', 'deploy/**/*.mjs', 'packages/plugins/*/build.mjs'],
|
|
languageOptions: {
|
|
globals: {
|
|
console: 'readonly',
|
|
process: 'readonly',
|
|
URL: 'readonly',
|
|
fetch: 'readonly',
|
|
Buffer: 'readonly',
|
|
setTimeout: 'readonly',
|
|
},
|
|
},
|
|
},
|
|
{
|
|
// Classic browser scripts served verbatim from public/ (theme-init.js,
|
|
// issue #180): no bundler, no modules, browser globals only.
|
|
files: ['apps/web/public/*.js'],
|
|
languageOptions: {
|
|
globals: {
|
|
window: 'readonly',
|
|
document: 'readonly',
|
|
},
|
|
},
|
|
},
|
|
{
|
|
rules: {
|
|
// Unused values are usually bugs; underscore-prefix marks intentional ones.
|
|
'@typescript-eslint/no-unused-vars': [
|
|
'error',
|
|
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
|
|
],
|
|
// `any` defeats the shared Zod/type contracts between client and server.
|
|
'@typescript-eslint/no-explicit-any': 'error',
|
|
},
|
|
},
|
|
);
|