import { RuleTester } from 'eslint' import { parser } from 'typescript-eslint' import { describe, it } from 'vitest' import { noRawElement, RAW_ELEMENT_PARTS, RAW_INPUT_PARTS } from './no-raw-element' RuleTester.describe = describe RuleTester.it = it RuleTester.itOnly = it.only const tester = new RuleTester({ languageOptions: { parser, parserOptions: { ecmaFeatures: { jsx: true } } }, // A directive for a rule these cases do not load is not what they test. linterOptions: { reportUnusedDisableDirectives: 'off' }, }) const component = (body: string) => `export function Probe() {\n return (\n${body}\n )\n}\n` const noPart = (element: string) => `@estiva-app/ui has no part for a raw ${element} yet. Do not build one here: ask Katerina, and it gets made in @estiva-app/ui.` /** Every element the mapping names, drawn the simplest way that makes it a control. */ const withControls: Record = { audio: '