mirror of
https://github.com/bitbaum/whenkit.git
synced 2026-12-04 18:57:40 +01:00
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>
28 lines
1.1 KiB
JavaScript
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 } },
|
|
},
|
|
);
|