Files
whenkit/eslint.config.mjs
CatoandClaude Sonnet 5.5 15ed5a9c84 chore: codemod to migrate date inputs to DateInput
A JSX tag scanner (braces, strings, template literals — not a regex over
attributes) that changes <input type=date|datetime-local> to DateInput and
adds one import. Lists what it will not guess. Tested on tricky fixtures,
including the blank-line-after-imports bug its own test caught; a second run
changes nothing.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Cato <41178744+catomean@users.noreply.github.com>
2026-10-08 14:40:38 +02:00

28 lines
1.1 KiB
JavaScript

// Flat config. Recommended presets only: a bespoke rule set would be a second
// opinion to maintain for no benefit. The floor is "lint runs and can fail", not "lint encodes
// taste".
import js from "@eslint/js";
import globals from "globals";
import tseslint from "typescript-eslint";
export default tseslint.config(
{
// dist/ is generated by `tsc`; demo/dist/ by esbuild for the visual check.
ignores: ["dist/**", "demo/dist/**", "node_modules/**"],
},
js.configs.recommended,
...tseslint.configs.recommended,
{
files: ["**/*.ts", "**/*.tsx"],
// Client islands touch browser APIs; the parser and server components
// run under Node. Both global sets, one config.
languageOptions: { globals: { ...globals.node, ...globals.browser } },
},
{
// Tests are plain Node running under `node --test`.
files: ["test/**/*.js", "test/**/*.mjs", "scripts/**/*.mjs"],
// browser.mjs is Node driving a browser: page.evaluate bodies run there.
languageOptions: { globals: { ...globals.node, ...globals.nodeBuiltin, ...globals.browser } },
},
);