no-unsupported-features
Warns when using HTML elements or attributes that are not supported by the project's target browsers (via browserslist), or that are experimental or non-standard.
This rule uses @mdn/browser-compat-data for browser support checks and the built-in HTML spec data for experimental/non-standard flags.
Note: If your project does not have a browserslist configuration, this rule's browser support check is a no-op (it does nothing). The
checkExperimentalandcheckNonStandardoptions work independently of browserslist.
Default Severity
warning
How It Works
- Browser support check: Reads the project's browserslist configuration and checks whether each HTML element and attribute is supported in all target browsers. Features that were once supported but later removed from a browser are also reported (e.g., "removed in 50").
- Experimental check (
checkExperimental): Warns about elements and attributes marked as experimental in the HTML specification. Therecommendedpreset does not enable this option; you need to enable it manually if needed. - Non-standard check (
checkNonStandard): Warns about elements and attributes marked as non-standard in the HTML specification.
Options
| Option | Type | Default | Description |
|---|---|---|---|
browserslist | string | string[] | - | Override the browserslist query. |
browserslistConfig | string | - | Explicit path to a browserslist configuration file. |
browserslistEnv | string | - | Browserslist environment name (e.g., "production"). |
ignoreFeatures | string[] | [] | Features to ignore. |
checkExperimental | boolean | false | Warn about experimental elements/attributes. |
checkNonStandard | boolean | false | Warn about non-standard elements/attributes. |
ignoreFeatures Format
Uses exact string matching (no glob or wildcard patterns).
"dialog"— Ignores the<dialog>element (exact match on element name)."input[list]"— Ignores thelistattribute on<input>elements.
Examples
Browserslist Check
Configuration:
{
"rules": {
"no-unsupported-features": {
"options": {
"browserslist": "ie 11"
}
}
}
}
❌ Examples of incorrect code for this rule
<dialog>This is a dialog</dialog>
✅ Examples of correct code for this rule
<div>This is a div</div>
Experimental Check
Configuration:
{
"rules": {
"no-unsupported-features": {
"options": {
"checkExperimental": true
}
}
}
}
❌ Examples of incorrect code for this rule
<iframe credentialless></iframe>
✅ Examples of correct code for this rule
<iframe></iframe>
Note: Whether an element or attribute is experimental depends on the HTML specification data bundled with markuplint. If a feature is no longer marked as experimental, this rule will not report it.
Non-Standard Check
Configuration:
{
"rules": {
"no-unsupported-features": {
"options": {
"checkNonStandard": true
}
}
}
}
❌ Examples of incorrect code for this rule
<canvas moz-opaque></canvas>
✅ Examples of correct code for this rule
<canvas></canvas>
Migration from deprecated-element
In v4.x, the deprecated-element rule detected deprecated, obsolete, and non-standard elements.
In v5.x, the non-standard detection has been moved to no-unsupported-features with the checkNonStandard option.
Before (v4.x)
deprecated-element automatically detected non-standard elements.
After (v5.x)
To detect non-standard elements, enable no-unsupported-features:
{
"rules": {
"no-unsupported-features": {
"options": {
"checkNonStandard": true
}
}
}
}
If you use the recommended preset, this is already enabled automatically via the compat preset.
Interface
{
"no-unsupported-features": boolean
}
Options
{
"no-unsupported-features": {
"options": {
"browserslist"?: string | string[]
"browserslistConfig"?: string
"browserslistEnv"?: string
"ignoreFeatures"?: string[]
"checkExperimental"?: boolean
"checkNonStandard"?: boolean
}
}
}
| Property | Type | Default Value | Description |
|---|---|---|---|
browserslist | string | | undefined | undefined |
browserslistConfig | string | undefined | Explicit path to a browserslist configuration file. |
browserslistEnv | string | undefined | Browserslist environment name (e.g., "production"). |
ignoreFeatures | string[] | undefined | Features to ignore. Element name ("dialog") or attribute pattern ("input[list]"). |
checkExperimental | boolean | false | Whether to warn about experimental elements and attributes. |
checkNonStandard | boolean | false | Whether to warn about non-standard elements and attributes. |
Default Severity
warning