noObsoleteTags (JavaScript)
Summary
Section titled “Summary”- Diagnostic Category:
lint/nursery/noObsoleteTags - This rule doesn’t have a fix.
- The default severity of this rule is warning.
- Sources:
- Inspired from
@html-eslint/no-obsolete-tags
- Inspired from
How to configure
Section titled “How to configure”{ "linter": { "rules": { "nursery": { "noObsoleteTags": "error" } } }}Description
Section titled “Description”Disallow obsolete HTML elements.
Obsolete elements are no longer part of conforming HTML. Use standard HTML elements for structure and semantics, and CSS for presentation.
This rule disallows acronym, applet, basefont, bgsound, big, blink,
center, dir, font, frame, frameset, isindex, keygen, listing,
marquee, menuitem, multicol, nextid, nobr, noembed, noframes,
plaintext, rb, rtc, spacer, strike, tt, and xmp.
This rule checks native JSX elements without case sensitivity. Component names
such as <Font />, member expressions such as <UI.font />, and namespaced
names are ignored.
Examples
Section titled “Examples”Invalid
Section titled “Invalid”<font color="red">Warning</font>;code-block.jsx:1:2 lint/nursery/noObsoleteTags ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ The font element is obsolete.
> 1 │ <font color="red">Warning</font>;
│ ^^^^
2 │
ℹ Obsolete elements are no longer part of conforming HTML.
ℹ Use standard HTML elements for structure and semantics, and CSS for presentation.
ℹ This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.
<acronym title="World Wide Web">WWW</acronym>;code-block.jsx:1:2 lint/nursery/noObsoleteTags ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ The acronym element is obsolete.
> 1 │ <acronym title="World Wide Web">WWW</acronym>;
│ ^^^^^^^
2 │
ℹ Obsolete elements are no longer part of conforming HTML.
ℹ Use standard HTML elements for structure and semantics, and CSS for presentation.
ℹ This rule belongs to the nursery group, which means it is not yet stable and may change in the future. Visit https://biomejs.dev/linter/#nursery for more information.
<span className="warning">Warning</span>;<abbr title="World Wide Web">WWW</abbr>;<Font />;<UI.font />;Resources
Section titled “Resources”Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.