ota-meshi/eslint-plugin-astro

Rule for single quote

erupturatis opened this issue · 2 comments

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

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" />

DEMO

Thank you