Rules
Every rule from ESLint, Oxlint and Biome. Pick a rule to see its example. Reach is the weekly npm downloads of the presets that enable a rule; trend is its change over the last quarter.
Every rule from ESLint, Oxlint and Biome. Pick a rule to see its example. Reach is the weekly npm downloads of the presets that enable a rule; trend is its change over the last quarter.
<App>Hello world</App>;
<App prop='Hello world'>{'Hello world'}</App>;<Color text={"\u00a0"} />
<App>{"Hello \u00b7 world"}</App>;
<style type="text/css">{'.main { margin-top: 0; }'}</style>;
/**
* there's no way to inject a whitespace into jsx without a container so this
* will always be allowed.
*/
<App>{' '}</App>
<App>{' '}</App>
<App>{/* comment */ <Bpp />}</App> // the comment makes the container necessaryPopular · 1 of 42
Disallow unnecessary JSX expressions when literals alone are sufficient or enforce JSX expressions on literals in JSX children or attributes
<App>Hello world</App>;
<App prop='Hello world'>{'Hello world'}</App>;<Color text={"\u00a0"} />
<App>{"Hello \u00b7 world"}</App>;
<style type="text/css">{'.main { margin-top: 0; }'}</style>;
/**
* there's no way to inject a whitespace into jsx without a container so this
* will always be allowed.
*/
<App>{' '}</App>
<App>{' '}</App>
<App>{/* comment */ <Bpp />}</App> // the comment makes the container necessary