diff --git a/package.json b/package.json index cb43e564..204f0c15 100644 --- a/package.json +++ b/package.json @@ -71,7 +71,7 @@ "license": "Apache-2.0", "dependencies": { "@eslint/core": "^1.0.1", - "@eslint/css-tree": "^3.6.8", + "@eslint/css-tree": "https://github.com/SwetaTanwar/csstree/tree/nested-parsing", "@eslint/plugin-kit": "^0.5.1" }, "devDependencies": { diff --git a/tests/rules/no-invalid-properties.test.js b/tests/rules/no-invalid-properties.test.js index 6ea8c08d..2ecc9e3a 100644 --- a/tests/rules/no-invalid-properties.test.js +++ b/tests/rules/no-invalid-properties.test.js @@ -266,6 +266,14 @@ ruleTester.run("no-invalid-properties", rule, { "a { color: oklch(from green l c h / 0.5) }", "a { color: oklch(from #123456 calc(l + 10) c h) }", "a { color: oklch(from hsl(180 100% 50%) calc(l - 10) c h) }", + + // https://github.com/eslint/css/issues/250 + "main { p:first-of-type { margin-top: 0; } }", + "main { p:hover { color: red; } }", + "main { p:nth-child(2n) { color: red; } }", + "main { p:has(.child) { color: red; } }", + "main { p:has(.child:hover) { color: red; } }", + "main { p:first-of-type, span { color: red; } }", ], invalid: [ {