mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-10 23:07:15 +01:00
The two shared packages are the first repos on the preset (link:../ts_config inside the monorepo; consumers outside use the git tag). Each eslint.config.js is now the defineConfig() call plus one override with its reason: a public API name (`nextChance`, `fuzzyMatch`) the boolean-prefix rule would rename, which is a breaking change for the three repos importing it. Everything else the preset flagged is fixed in code, not disabled: key order (perfectionist), hex casing, sort compare functions in tests, Iterator#map().toArray(), explicit returns on multiline arrows. web_ui: react-refresh/only-export-components was a real finding -- range-slider.tsx exported `steppedValue` next to the component, which breaks Vite HMR for the module. The keyboard contract moves to stepped-value.ts as `steppedValue` + a new pure `keyTarget(key, values, current)`, which also resolves unicorn/no-late-event-control: the handler now decides the target first and calls preventDefault() only when it owns the key. Its tests move with it (the 250-line gate caught the combined file). Minor bump for the new export. dist/ rebuilt in both packages. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DnAYyNH1Sm4iJNidfYbrZJ
27 lines
856 B
JSON
27 lines
856 B
JSON
{
|
|
// Strictness comes from the shared base; only output/lib options live here.
|
|
"extends": "@kuhyx/ts-config/tsconfig",
|
|
"compilerOptions": {
|
|
"target": "ES2023",
|
|
"lib": ["ESNext", "DOM", "DOM.Iterable"],
|
|
"module": "ESNext",
|
|
"moduleResolution": "bundler",
|
|
"jsx": "react-jsx",
|
|
"types": ["vitest/globals"],
|
|
|
|
|
|
/* This package ships a prebuilt dist/ (ESM + .d.ts) because consumers use
|
|
Vite, which does not transpile dependencies. So unlike the consumers,
|
|
emit is on and .ts import specifiers must be rewritten. */
|
|
"rewriteRelativeImportExtensions": true,
|
|
"allowImportingTsExtensions": true,
|
|
"declaration": true,
|
|
"declarationMap": true,
|
|
"sourceMap": true,
|
|
"outDir": "dist",
|
|
"rootDir": "src"
|
|
},
|
|
"include": ["src"],
|
|
"exclude": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/test"]
|
|
}
|