Environment
Node version: v20.0.0
npm version: v9.6.4
Local ESLint version: v9.21.0 (Currently used)
Global ESLint version: Not found
@eslint/css version: 0.4.0
Operating System: darwin 23.6.0
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"
}],
},
},
];
/** src/functions.css */
a {
background: color-mix(in srgb, lightblue, white 80%);
}
div {
background: conic-gradient(from 0deg at 0% 25%, blue, green, yellow 180deg);
}
npx eslint src/functions.css
What did you expect to happen?
ESLint should warn when Baseline newly available features like color-mix and conic-gradient are used.
I'd also expect the types map within baseline-data.js to include entries for functions like color-mix and conic-gradient.
There is a related color entry, but its Baseline status should be Newly available (5) according to MDN.
What actually happened?
ESLint doesn't emit any warnings for these newly available features, despite the config being set to widely available.
color-mix and conic-gradient aren't listed in the types map, and color has a Baseline status of Widely available (10).
Link to Minimal Reproducible Example
https://github.com/rviscomi/baseline-demos/blob/main/eslint/src/functions.css
Participation
Additional comments
The cssTypePattern regex seems to be responsible for this:
|
const cssTypePattern = /^css\.types\.(?<type>[a-zA-Z$\d-]+)$/u; |
Environment
Node version: v20.0.0
npm version: v9.6.4
Local ESLint version: v9.21.0 (Currently used)
Global ESLint version: Not found
@eslint/css version: 0.4.0
Operating System: darwin 23.6.0
Which language are you using?
stylesheet
What did you do?
Configuration
What did you expect to happen?
ESLint should warn when Baseline newly available features like
color-mixandconic-gradientare used.I'd also expect the
typesmap within baseline-data.js to include entries for functions likecolor-mixandconic-gradient.There is a related
colorentry, but its Baseline status should be Newly available (5) according to MDN.What actually happened?
ESLint doesn't emit any warnings for these newly available features, despite the config being set to widely available.
color-mixandconic-gradientaren't listed in thetypesmap, andcolorhas a Baseline status of Widely available (10).Link to Minimal Reproducible Example
https://github.com/rviscomi/baseline-demos/blob/main/eslint/src/functions.css
Participation
Additional comments
The
cssTypePatternregex seems to be responsible for this:css/tools/generate-baseline.js
Line 77 in 9c7fd6a