markdown-preferences/ordered-list-marker-start
enforce that ordered list markers start with 1 or 0
- ⚙️ This rule is included in
plugin.configs.standard. - 🔧 The
--fixoption on the command line can automatically fix some of the problems reported by this rule. - 💡 Some problems reported by this rule are manually fixable by editor suggestions.
📖 Rule Details
This rule enforces that ordered lists in Markdown start with a specific number (1 or 0). It helps ensure consistency in documentation and prevents accidental mistakes in list numbering.
md
<!-- eslint markdown-preferences/ordered-list-marker-start: 'error' -->
<!-- ✓ GOOD -->
1. foo
2. bar
3. baz
<!-- ✗ BAD -->
0. foo
1. bar
2. bazIf you want to allow lists to start with 0, use the option { "start": 0 }:
md
<!-- eslint markdown-preferences/ordered-list-marker-start: ["error", {"start":0}] -->
<!-- ✓ GOOD -->
0. foo
1. bar
2. baz
<!-- ✗ BAD -->
1. foo
2. bar
3. baz🔧 Options
json
{
"markdown-preferences/ordered-list-marker-start": [
"error",
{
"start": 1
}
]
}start... Enforces that ordered lists must start with the specified value (0or1). If set to1, lists must start with1.. If set to0, lists must start with0.. Defaults to1.
📚 Further Reading
👫 Related Rules
🚀 Version
This rule was introduced in eslint-plugin-markdown-preferences v0.12.0