Back to Denoland

Jsx Boolean Value

lint/rules/jsx-boolean-value.md

latest304 B
Original Source

Enforce a consistent JSX boolean value style. Passing true as the boolean value can be omitted with the shorthand syntax.

Invalid:

tsx
const foo = <Foo isFoo={true} />;
const foo = <Foo isFoo={false} />;

Valid:

tsx
const foo = <Foo isFoo />;
const foo = <Foo isFoo={false} />;