require-li-container
Angular templatesHTMLVue / SvelteVue / Sveltecorrectnessno fixdefault: offhtml/html-eslint-recommended
What it does
Section titled “What it does”Reports an <li> whose parent is not a list (<ul>, <ol> or <menu>).
Why it matters
Section titled “Why it matters”An <li> outside a list is not a list item, so a screen reader announces no list, and the browser draws no marker.
To fix, put the item in a list.
Example
Section titled “Example”...<ul><li>a</li></ul><div><li>b</li></div>Configuration
Section titled “Configuration”angular: lint: rules: require-li-container: warn # off (default), warn, errorhtml: lint: rules: require-li-container: warn # off (default), warn, errorsvelte: lint: rules: require-li-container: warn # off (default), warn, errorvue: lint: rules: require-li-container: warn # off (default), warn, errorEnabled by the presets: html/html-eslint-recommended.
Suppress one line with sudsy-disable-next-line require-li-container in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools; Sudsy reports what each upstream rule reports.
| Tool | Rule | Match |
|---|---|---|
| html-eslint | require-li-container |
full |