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
To enforce the explicit use of boolean values for JSX props (e.g., requiring
horizontal={true}instead ofhorizontal), you need thereact/jsx-boolean-valueESLint rule fromeslint-plugin-react.Configuration:
Add this to your ESLint config (e.g.,
.eslintrc.json):json{ "rules": { "react/jsx-boolean-value": ["error", "always"] } }
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.