whats the eslint rule that'd verify if we're always writing props like this <Foo…
- User
whats the eslint rule that'd verify if we're always writing props like this
instead of
Assistant
The ESLint rule you're looking for is from
eslint-plugin-reactand it's calledreact/jsx-boolean-value.To enforce
horizontal={true}instead ofhorizontal, you'd configure it like this:json// .eslintrc.json { "plugins": [ "react" ], "rules": { "react/jsx-boolean-value": ["error", "always"] } }Explanation:
react/jsx-boolean-value: This rule enforces a specific style for boolean attributes in JSX.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.