Skip to content

Latest commit

 

History

History
83 lines (59 loc) · 1.93 KB

browserbug-comment-no-outdated.md

File metadata and controls

83 lines (59 loc) · 1.93 KB

@woltapp/browserbug-comment-no-outdated

Ensures that no browser workarounds exist, if browserslist support for that browser is outside the specified range.

Assuming a browserslist config like this:

chrome 120
firefox 119
safari 16.4
/*  @browserbug chrome under 117 -- Work around bug */
/** ↑
 * Comments for unsupported browsers, like this */

[!WARNING] Comments within selector and value lists are currently ignored.

The message secondary option can accept the arguments of this rule.

Options

true

Assuming a browserslist config like this:

chrome 120
firefox 119
safari 16.4

The following patterns are considered problems:

/* @browserbug chrome under 117 -- Work around bug */
/* @browserbug chrome between 117 120 -- Work around bug */
/* @browserbug firefox under 80 -- Work around bug */
/* @browserbug unknown 123 -- Work around bug */

Invalid @browserbug declarations are also considered problems:

/* @browserbug notAKnownBrowser equal 14 -- Work around bug */
/* @browserbug chrome equal 5000 -- Work around bug */
/* @browserbug Invalid syntax */

The following patterns are not considered problems:

/* @browserbug chrome last-checked 122 */
/* @browserbug firefox last-checked 122 */
/* @browserbug safari between 15.4 17.2 */

Optional secondary options

This section is a work in progress.

browserslistQuery

Allows specifying an inline browserslist query, that will take precedence over the global one (if any).

When Not To Use It

Give a short description of when it would be appropriate to turn off this rule.

Further Reading

If there are other links that describe the issue this rule addresses, please include them here in a bulleted list.