deno.com

jsx-curly-braces

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