-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ci): pin submodule to
7ea5dff
and run codegen (#133)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
b3ea393
commit b9141cf
Showing
4 changed files
with
112 additions
and
2 deletions.
There are no files selected for viewing
Submodule biome
updated
11 files
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
--- | ||
title: noUnknownUnit (not released) | ||
--- | ||
|
||
**Diagnostic Category: `lint/nursery/noUnknownUnit`** | ||
|
||
:::danger | ||
This rule hasn't been released yet. | ||
::: | ||
|
||
:::caution | ||
This rule is part of the [nursery](/linter/rules/#nursery) group. | ||
::: | ||
|
||
Sources: | ||
- Same as: <a href="https://github.com/stylelint/stylelint/blob/main/lib/rules/unit-no-unknown/README.md" target="_blank"><code>stylelint/unit-no-unknown</code></a> | ||
|
||
Disallow unknown CSS units. | ||
|
||
For details on known CSS units, see the [MDN web docs](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units#lengths). | ||
|
||
## Examples | ||
|
||
### Invalid | ||
|
||
```css | ||
a { | ||
width: 10pixels; | ||
} | ||
``` | ||
|
||
<pre class="language-text"><code class="language-text">nursery/noUnknownUnit.js:2:12 <a href="https://biomejs.dev/linter/rules/no-unknown-unit">lint/nursery/noUnknownUnit</a> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
|
||
<strong><span style="color: Tomato;"> </span></strong><strong><span style="color: Tomato;">✖</span></strong> <span style="color: Tomato;">Unexpected unknown unit: </span><span style="color: Tomato;"><strong>pixels</strong></span> | ||
|
||
<strong>1 │ </strong>a { | ||
<strong><span style="color: Tomato;"> </span></strong><strong><span style="color: Tomato;">></span></strong> <strong>2 │ </strong> width: 10pixels; | ||
<strong> │ </strong> <strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong> | ||
<strong>3 │ </strong>} | ||
<strong>4 │ </strong> | ||
|
||
<strong><span style="color: lightgreen;"> </span></strong><strong><span style="color: lightgreen;">ℹ</span></strong> <span style="color: lightgreen;">See </span><span style="color: lightgreen;"><a href="https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units#lengths">MDN web docs</a></span><span style="color: lightgreen;"> for more details.</span> | ||
|
||
<strong><span style="color: lightgreen;"> </span></strong><strong><span style="color: lightgreen;">ℹ</span></strong> <span style="color: lightgreen;">Use a known unit instead, such as:</span> | ||
|
||
- px | ||
- em | ||
- rem | ||
- etc. | ||
|
||
</code></pre> | ||
|
||
```css | ||
a { | ||
width: calc(10px + 10pixels); | ||
} | ||
``` | ||
|
||
<pre class="language-text"><code class="language-text">nursery/noUnknownUnit.js:2:24 <a href="https://biomejs.dev/linter/rules/no-unknown-unit">lint/nursery/noUnknownUnit</a> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ | ||
|
||
<strong><span style="color: Tomato;"> </span></strong><strong><span style="color: Tomato;">✖</span></strong> <span style="color: Tomato;">Unexpected unknown unit: </span><span style="color: Tomato;"><strong>pixels</strong></span> | ||
|
||
<strong>1 │ </strong>a { | ||
<strong><span style="color: Tomato;"> </span></strong><strong><span style="color: Tomato;">></span></strong> <strong>2 │ </strong> width: calc(10px + 10pixels); | ||
<strong> │ </strong> <strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong><strong><span style="color: Tomato;">^</span></strong> | ||
<strong>3 │ </strong>} | ||
<strong>4 │ </strong> | ||
|
||
<strong><span style="color: lightgreen;"> </span></strong><strong><span style="color: lightgreen;">ℹ</span></strong> <span style="color: lightgreen;">See </span><span style="color: lightgreen;"><a href="https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Values_and_units#lengths">MDN web docs</a></span><span style="color: lightgreen;"> for more details.</span> | ||
|
||
<strong><span style="color: lightgreen;"> </span></strong><strong><span style="color: lightgreen;">ℹ</span></strong> <span style="color: lightgreen;">Use a known unit instead, such as:</span> | ||
|
||
- px | ||
- em | ||
- rem | ||
- etc. | ||
|
||
</code></pre> | ||
|
||
### Valid | ||
|
||
```css | ||
a { | ||
width: 10px; | ||
} | ||
``` | ||
|
||
```css | ||
a { | ||
width: 10Px; | ||
} | ||
``` | ||
|
||
```css | ||
a { | ||
width: 10pX; | ||
} | ||
``` | ||
|
||
```css | ||
a { | ||
width: calc(10px + 10px); | ||
} | ||
``` | ||
|
||
## Related links | ||
|
||
- [Disable a rule](/linter/#disable-a-lint-rule) | ||
- [Rule options](/linter/#rule-options) |