Skip to content

no-implicit-input-type

Reports an <input> with no type.

Without a type an input is a text field, which is easy to read as an omission; with the type written, the intent is in the markup and tools that look for text fields find it.

To fix, add type="text" (or the type that is meant).

Reported
...
<div role="button"></div>
...
<button type="button">Go</button>
<input name="a">
<input type="text" name="b">
...
angular:
lint:
rules:
no-implicit-input-type: warn # off (default), warn, error
html:
lint:
rules:
no-implicit-input-type: warn # off (default), warn, error
svelte:
lint:
rules:
no-implicit-input-type: warn # off (default), warn, error
vue:
lint:
rules:
no-implicit-input-type: warn # off (default), warn, error

Enabled by the presets: html/html-validate-recommended.

Suppress one line with sudsy-disable-next-line no-implicit-input-type in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
html-validate no-implicit-input-type full