# jsx-quotes

Rule `eslint/jsx-quotes`. Enforce the consistent use of either double or single quotes in JSX attributes

- Source: eslint
- Technologies: JavaScript
- Kind: style
- Needs type information: no
- Autofix: yes, in at least one linter
- Deprecated: yes
- Reach: 3.4M weekly downloads of presets that enable it
- Trend: +2.3% last quarter
- Rank: #1432 by reach, #1568 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `jsx-quotes` | no | safe | package `eslint` | [docs](https://eslint.org/docs/latest/rules/jsx-quotes) |

## Code examples

### Incorrect: the rule reports this

```jsx
<a b='c' />;
```

```jsx
<a b="c" />;
```

### Correct: the rule accepts this

```jsx
<a b="c" />;
<a b='"' />;
```

```jsx
<a b='c' />;
<a b="'" />;
```

Examples from the ESLint documentation.

## Enable it

### ESLint: `eslint.config.js`

```js
export default [
  {
    rules: {
      "jsx-quotes": "error",
    },
  },
];
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Airbnb](https://lintradar.dev/presets/airbnb.md) | ESLint | `eslint-config-airbnb` | 346 | 3.4M | +2.3% |

## Related rules

- [eslint/no-div-regex](https://lintradar.dev/rules/eslint/no-div-regex.md): Disallow equal signs explicitly at the beginning of regular expressions
- [eslint/no-object-constructor](https://lintradar.dev/rules/eslint/no-object-constructor.md): Disallow calls to the `Object` constructor without an argument
- [eslint/max-nested-callbacks](https://lintradar.dev/rules/eslint/max-nested-callbacks.md): Enforce a maximum depth that callbacks can be nested
- [eslint/complexity](https://lintradar.dev/rules/eslint/complexity.md): Enforce a maximum cyclomatic complexity allowed in a program
- [eslint/require-unicode-regexp](https://lintradar.dev/rules/eslint/require-unicode-regexp.md): Enforce the use of `u` or `v` flag on regular expressions
- [eslint/prefer-object-has-own](https://lintradar.dev/rules/eslint/prefer-object-has-own.md): Disallow use of `Object.prototype.hasOwnProperty.call()` and prefer use of `Object.hasOwn()`

---

Web page: https://lintradar.dev/rules/eslint/jsx-quotes. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
