# Avoid words like "from" or "between" in number ranges (EK00027)

import { Aside, Badge } from '@astrojs/starlight/components';

A dash already expresses a numeric range, so drop a leading word like "from" or "between" and write a clean range such as 1-10. EkLine flags a range that pairs "from" or "between" with a dash and suggests removing the word (rule EK00027).

## Why avoid "from" or "between" in a number range?

Mixing "from" or "between" with a dash creates a redundant, grammatically incomplete range that reads awkwardly to your audience. A clean dash range is shorter and unambiguous, which matters when readers scan specifications and limits. Consistent range formatting also keeps reference tables and API docs uniform.

## What EkLine flags

EK00027 matches phrases such as "from 1 - 10" or "between 1 - 10" that describe a numeric range with a dash.

- ❌ **Incorrect:** Choose a value from 1 - 10.
- ✅ **Correct:** Choose a value in the range 1-10.
- ❌ **Incorrect:** Send between 5 - 8 requests per second.
- ✅ **Correct:** Send 5-8 requests per second.

## How to fix

Remove "from" or "between" and write the range with a dash, or complete the phrase with "from X to Y".

<Aside type="note">
The phrasing "from X to Y" is correct because it doesn't use a dash. When you write a range out in full with "to", keep it and ignore the rule for that line.
</Aside>

## FAQ

### How do you write a number range correctly?

Use a dash between the two values, such as "1-10", or spell the range out in full with "from X to Y". Don't combine a leading "from" or "between" with a dash.

### Is "from 5 - 8" wrong?

Yes. It mixes two ways of showing a range and leaves the phrase grammatically incomplete. Write "5-8" or "from 5 to 8" instead.

## Rule details

| Property | Value |
|----------|-------|
| Rule ID | `EK00027` |
| Category | Spelling and grammar |
| Default severity | <Badge text="Warning" variant="caution" /> |
| Enabled by default | Yes |

## Ignore this rule

To keep a flagged range on one line, add an inline comment:

```markdown
<!-- ekline-ignore-next-line EK00027 -- quoted specification text -->
The spec reads "between 5 - 8 requests".
```

To disable the rule across your project, add it to the `ignore` list in your [configuration file](/reviewer/configuration/ignoring-rules/#ignore).

## Related rules

- [EK00034](/reviewer/rules/ek00034/) — Use an en dash for negative numbers
- [EK00029](/reviewer/rules/ek00029/) — Spell out ordinal numbers