Skip to main content

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 checkExperimental and checkNonStandard options work independently of browserslist.

Default Severity

warning

How It Works

  1. 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").
  2. Experimental check (checkExperimental): Warns about elements and attributes marked as experimental in the HTML specification. The recommended preset does not enable this option; you need to enable it manually if needed.
  3. Non-standard check (checkNonStandard): Warns about elements and attributes marked as non-standard in the HTML specification.

Options

OptionTypeDefaultDescription
browsersliststring | string[]-Override the browserslist query.
browserslistConfigstring-Explicit path to a browserslist configuration file.
browserslistEnvstring-Browserslist environment name (e.g., "production").
ignoreFeaturesstring[][]Features to ignore.
checkExperimentalbooleanfalseWarn about experimental elements/attributes.
checkNonStandardbooleanfalseWarn 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 the list attribute 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
}
}
}
PropertyTypeDefault ValueDescription
browsersliststring | string[]undefinedundefined
browserslistConfigstringundefinedExplicit path to a browserslist configuration file.
browserslistEnvstringundefinedBrowserslist environment name (e.g., "production").
ignoreFeaturesstring[]undefinedFeatures to ignore. Element name ("dialog") or attribute pattern ("input[list]").
checkExperimentalbooleanfalseWhether to warn about experimental elements and attributes.
checkNonStandardbooleanfalseWhether to warn about non-standard elements and attributes.

Default Severity

warning