noUnknownProperty
此内容尚不支持你的语言。
Summary
Section titled “Summary”- Rule available since: v1.8.0
- Diagnostic Category: lint/correctness/noUnknownProperty
- This rule is recommended, which means is enabled by default.
- This rule doesn’t have a fix.
- The default severity of this rule is error.
- Sources:
- Same as stylelint/property-no-unknown
 
- Same as 
How to configure
Section titled “How to configure”{  "linter": {    "rules": {      "correctness": {        "noUnknownProperty": "error"      }    }  }}Description
Section titled “Description”Disallow unknown properties.
This rule considers properties defined in the CSS Specifications and browser specific properties to be known. https://github.com/known-css/known-css-properties#source
This rule ignores:
- custom variables e.g. --custom-property
- vendor-prefixed properties (e.g., -moz-align-self,-webkit-align-self)
Examples
Section titled “Examples”Invalid
Section titled “Invalid”a {  colr: blue;}code-block.css:2:3 lint/correctness/noUnknownProperty ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  ✖ Unknown property is not allowed.
  
    1 │ a {
  > 2 │   colr: blue;
      │   ^^^^
    3 │ }
    4 │ 
  
  ℹ See CSS Specifications and browser specific properties for more details.
  
  ℹ To resolve this issue, replace the unknown property with a valid CSS property.
  
a {  my-property: 1;}code-block.css:2:3 lint/correctness/noUnknownProperty ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
  ✖ Unknown property is not allowed.
  
    1 │ a {
  > 2 │   my-property: 1;
      │   ^^^^^^^^^^^
    3 │ }
    4 │ 
  
  ℹ See CSS Specifications and browser specific properties for more details.
  
  ℹ To resolve this issue, replace the unknown property with a valid CSS property.
  
a {  color: green;}a {  fill: black;}a {  -moz-align-self: center;}Related links
Section titled “Related links”Copyright (c) 2023-present Biome Developers and Contributors.