# Avoid unnecessary hyphens (EK00010)

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

An adverb ending in "-ly" already modifies the word that follows it, so it needs no hyphen to connect the two. EkLine flags an "-ly" adverb hyphenated to the next word (rule EK00010) so you can remove the hyphen.

## Why avoid unnecessary hyphens in documentation?

An "-ly" adverb never needs a hyphen to connect it to the word it modifies, and the extra mark reads as an editing slip. Removing it keeps compound modifiers clean and matches standard grammar guides your technical readers rely on. Consistent hyphenation also helps search match your content whether a reader types "newly created" or "newly-created".

## What EkLine flags

EK00010 matches an adverb ending in "-ly" that is hyphenated to the word right after it.

- ❌ **Incorrect:** Open a newly-created file.
- ✅ **Correct:** Open a newly created file.
- ❌ **Incorrect:** Review the automatically-generated docs.
- ✅ **Correct:** Review the automatically generated docs.

## How to fix

Delete the hyphen between the "-ly" adverb and the word it modifies.

<Aside type="note">
Some adjectives end in "-ly" without being adverbs — such as "family-owned" — and keep their hyphen. When a hyphenated "-ly" word is a genuine compound modifier, keep it and ignore the rule for that line.
</Aside>

## FAQ

### Does an "-ly" adverb need a hyphen?

No. An adverb ending in "-ly" already modifies the word that follows, so the hyphen is unnecessary. Write "newly created," not "newly-created."

### Are there "-ly" words that keep their hyphen?

Yes. Some adjectives end in "-ly" without being adverbs — such as "family-owned" — and keep their hyphen. Keep those and ignore the rule for that line.

## Rule details

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

## Ignore this rule

To keep a hyphenated "-ly" word on one line, add an inline comment:

```markdown
<!-- ekline-ignore-next-line EK00010 -- family-owned is a compound adjective -->
EkLine serves family-owned businesses.
```

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

## Related rules

- [EK00028](/reviewer/rules/ek00028/) — Avoid spaces before or after a dash
- [EK00006](/reviewer/rules/ek00006/) — Remove unnecessary adverbs