deno.com

jsx-curly-braces

注意: 此规则包含在以下规则集中:recommendedreactjsx
deno.json 中启用完整规则集
{
  "lint": {
    "tags": ["recommended"] // ...or "react", "jsx"
  }
}
使用 Deno CLI 启用完整规则集
deno lint --tags=recommended
# or ...
deno lint --tags=react
# or ...
deno lint --tags=jsx

确保 JSX 表达式周围花括号使用的一致性。

无效

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

有效

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

你找到你需要的东西了吗?

隐私政策