Rule for single quote
erupturatis opened this issue · 2 comments
erupturatis commented
Motivation
I am not sure if you can do it with a workaround plugin, but it isn't a rule natively in the plugin as far as I know
Description
When I write class = "..." to throw an error to change to single quotes
Examples
---
---
{/* ✓ GOOD */}
<div class = 'cls' />
{/* ✗ BAD */}
<div class ="cls" />
Additional comments
thats all
ota-meshi commented
Hi @erupturatis.
I think you can use jsx-quotes rule.
https://eslint.org/docs/latest/rules/jsx-quotes
---
/* eslint jsx-quotes: ['error', 'prefer-single'] */
---
{/* ✓ GOOD */}
<div class = 'cls' />
{/* ✗ BAD */}
<div class ="cls" />
erupturatis commented
Thank you