deno.com

jsx-curly-braces

NOTE: this rule is included the following rule sets:recommendedreactjsx
Enable full set in deno.json:
{
  "lint": {
    "tags": ["recommended"] // ...or "react", "jsx"
  }
}
Enable full set using the Deno CLI:
deno lint --tags=recommended
# or ...
deno lint --tags=react
# or ...
deno lint --tags=jsx

Ensure consistent use of curly braces around JSX expressions.

Invalid:

const foo = <Foo foo=<div /> />;
const foo = <Foo str={"foo"} />;
const foo = <div>{"foo"}</div>;

Valid:

const foo = <Foo foo={<div />} />;
const foo = <Foo str="foo" />;
const foo = <div>foo</div>;

Did you find what you needed?

Privacy policy