# no-invalid-intl-options

Rule `unicorn/no-invalid-intl-options`. Disallow invalid or ignored Intl options.

- Source: unicorn
- Technologies: JavaScript
- Kind: correctness
- Needs type information: no
- Autofix: yes, in at least one linter
- Reach: 9.9M weekly downloads of presets that enable it
- Trend: +28.3% last quarter
- Rank: #933 by reach, #1188 by growth

## Linters

| Linter | Rule name | Recommended | Autofix | Details | Docs |
| --- | --- | --- | --- | --- | --- |
| ESLint | `unicorn/no-invalid-intl-options` | no | suggestion | package `eslint-plugin-unicorn` | [docs](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/v80.0.0/docs/rules/no-invalid-intl-options.md) |

## Code examples

### Incorrect: the rule reports this

```js
new Intl.NumberFormat('en', {maximumFractionDigit: 2});
```

```js
new Intl.NumberFormat('en', {style: 'currency'});
```

```js
new Intl.DateTimeFormat('en', {dateStyle: 'short', year: 'numeric'});
```

### Correct: the rule accepts this

```js
new Intl.NumberFormat('en', {maximumFractionDigits: 2});
```

```js
new Intl.NumberFormat('en', {style: 'currency', currency: 'USD'});
```

```js
new Intl.DateTimeFormat('en', {dateStyle: 'short'});
```

Examples from the ESLint documentation.

## Enable it

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

```js
import unicorn from "eslint-plugin-unicorn";

export default [
  {
    plugins: { unicorn },
    rules: {
      "unicorn/no-invalid-intl-options": "error",
    },
  },
];
```

## Presets that enable it

| Preset | Linter | Package | Rules | Weekly downloads | Trend |
| --- | --- | --- | --- | --- | --- |
| [Unicorn recommended](https://lintradar.dev/presets/unicorn-recommended.md) | ESLint | `eslint-plugin-unicorn` | 340 | 9.5M | +30.3% |
| [Unicorn unopinionated](https://lintradar.dev/presets/unicorn-unopinionated.md) | ESLint | `eslint-plugin-unicorn` | 236 | 9.5M | +30.3% |
| [XO](https://lintradar.dev/presets/xo.md) | ESLint | `eslint-config-xo` | 618 | 413K | −5.0% |

## Related rules

- [unicorn/no-invalid-integrity](https://lintradar.dev/rules/unicorn/no-invalid-integrity.md): Disallow invalid subresource integrity metadata.
- [unicorn/no-invalid-property-descriptor](https://lintradar.dev/rules/unicorn/no-invalid-property-descriptor.md): Disallow invalid property descriptors.
- [unicorn/no-invalid-dom-token](https://lintradar.dev/rules/unicorn/no-invalid-dom-token.md): Disallow invalid DOM tokens.
- [unicorn/no-invalid-response-options](https://lintradar.dev/rules/unicorn/no-invalid-response-options.md): Disallow invalid options in `new Response()`, `Response.json()`, and `Response.redirect()`.
- [unicorn/no-invalid-character-comparison](https://lintradar.dev/rules/unicorn/no-invalid-character-comparison.md): Disallow comparing a single character from a string to a multi-character string.
- [unicorn/no-invalid-style-set-property](https://lintradar.dev/rules/unicorn/no-invalid-style-set-property.md): Disallow invalid arguments to `CSSStyleDeclaration#setProperty()`.

---

Web page: https://lintradar.dev/rules/unicorn/no-invalid-intl-options. Data from npm and the linters' documentation, collected Dec 4, 2026. Site guide for agents: https://lintradar.dev/llms.txt
