Skip to content

Bug: :has() not flagged with Baseline Widely available config #60

@rviscomi

Description

@rviscomi

Environment

ESLint version: 9.20.1
@eslint/css version: 0.4.0
Node version: 20.0.0
npm version: 9.6.4
Operating System: MacOS 14.7.3

Which language are you using?

stylesheet

What did you do?

Configuration
import globals from "globals";
import css from "@eslint/css";


/** @type {import('eslint').Linter.Config[]} */
export default [
  {
    languageOptions: {
      globals: globals.browser
    }
  },
  {
    files: ["**/*.css"],
    plugins: {
      css,
    },
    language: "css/css",
    rules: {
      "css/require-baseline": ["warn", {
        "available": "widely"
      }],
    },
  },
];
/* baseline/has (low) */
p:has(i) {
  color: sandybrown;
}

What did you expect to happen?

The :has() pseudo-class is not yet Baseline Widely available, according to MDN:

Image

I would have expected npx eslint src/has.css to emit a warning that it "is not a widely available baseline feature"

What actually happened?

No warnings were emitted

Link to Minimal Reproducible Example

https://github.com/rviscomi/baseline-demos/tree/main/eslint

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedThere is consensus among the team that this change meets the criteria for inclusionenhancementNew feature or request

    Projects

    Status

    Complete

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions