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.
No rules match “”.
Popular · 1 of 45
Ensure destructuring and symmetric naming of useState hook value and setter variables
import React from 'react';
export default function useColor() {
// useState call is not destructured into value + setter pair
const useStateResult = React.useState();
return useStateResult;
}import React from 'react';
export default function useColor() {
// useState call is destructured into value + setter pair whose identifiers
// follow the [thing, setThing] naming convention
const [color, setColor] = React.useState();
return [color, setColor];
}