stillwind 0.8.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +212 -0
- package/css/builtin-variants/tw-relationship.css +4 -4
- package/css/builtins.css +1 -1
- package/dist/frameworks/alpine.d.ts +1 -1
- package/dist/frameworks/astro.d.ts +1 -1
- package/dist/frameworks/lit.d.ts +1 -1
- package/dist/frameworks/preact.d.ts +1 -1
- package/dist/frameworks/qwik.d.ts +1 -1
- package/dist/frameworks/solid.d.ts +1 -1
- package/dist/frameworks/svelte.d.ts +1 -1
- package/dist/frameworks/vanilla.d.ts +1 -1
- package/dist/frameworks/vue.d.ts +1 -1
- package/docs/at-rules/apply.md +5 -5
- package/docs/at-rules/custom-variant.md +12 -12
- package/docs/at-rules/index.md +19 -19
- package/docs/at-rules/plugin.md +13 -7
- package/docs/at-rules/registry-directives.md +9 -9
- package/docs/at-rules/slot.md +6 -6
- package/docs/at-rules/stillwind-css-template.md +7 -7
- package/docs/at-rules/stillwind-property.md +10 -10
- package/docs/at-rules/stillwind-registry.md +18 -18
- package/docs/at-rules/stillwind-require-properties.md +9 -9
- package/docs/at-rules/stillwind-slot.md +6 -6
- package/docs/at-rules/stillwind-undef-arbitrary-property.md +9 -9
- package/docs/at-rules/stillwind-undef-utility.md +10 -10
- package/docs/at-rules/stillwind-undef-variant.md +6 -6
- package/docs/at-rules/theme.md +23 -23
- package/docs/at-rules/utility.md +30 -30
- package/docs/at-rules/variant.md +6 -6
- package/docs/cli.md +7 -7
- package/docs/concepts/css-ordering.md +17 -17
- package/docs/concepts/how-styles-compile.md +14 -14
- package/docs/concepts/stylesheets.md +4 -4
- package/docs/configuration.md +29 -29
- package/docs/editors.md +8 -8
- package/docs/errors/SW01003.md +1 -1
- package/docs/errors/SW10001.md +1 -1
- package/docs/errors/SW10002.md +1 -1
- package/docs/errors/SW10004.md +6 -6
- package/docs/errors/SW10005.md +1 -1
- package/docs/errors/SW11001.md +1 -1
- package/docs/errors/SW11003.md +1 -1
- package/docs/errors/SW12001.md +2 -2
- package/docs/errors/SW12002.md +1 -1
- package/docs/errors/SW13001.md +1 -1
- package/docs/errors/SW13003.md +2 -2
- package/docs/errors/SW14001.md +1 -1
- package/docs/errors/SW14003.md +4 -4
- package/docs/errors/SW14004.md +2 -2
- package/docs/errors/SW14005.md +1 -1
- package/docs/errors/SW14006.md +1 -1
- package/docs/errors/SW14007.md +2 -2
- package/docs/errors/SW14008.md +1 -1
- package/docs/errors/SW30001.md +1 -1
- package/docs/errors/SW31001.md +1 -1
- package/docs/errors/SW31004.md +1 -1
- package/docs/errors/SW33005.md +1 -1
- package/docs/errors/SW34002.md +1 -1
- package/docs/errors/SW90001.md +1 -1
- package/docs/errors/SW90005.md +1 -1
- package/docs/errors/SW90006.md +1 -1
- package/docs/errors/index.md +72 -72
- package/docs/formatters.md +5 -5
- package/docs/guides/animations.md +7 -8
- package/docs/guides/design-systems.md +7 -7
- package/docs/guides/element-relationships.md +15 -19
- package/docs/guides/lint-adoption.md +5 -5
- package/docs/guides/migrating-from-css.md +11 -11
- package/docs/guides/migrating-from-tailwind.md +21 -16
- package/docs/guides/recommended-practices.md +18 -18
- package/docs/guides/responsive-styles.md +7 -7
- package/docs/guides/reusable-styles.md +5 -5
- package/docs/guides/runtime-conditions.md +6 -6
- package/docs/guides/style.md +15 -15
- package/docs/guides/tailwind-compatibility.md +27 -21
- package/docs/guides/view-transitions.md +9 -11
- package/docs/guides/web-components.md +4 -4
- package/docs/index.md +14 -12
- package/docs/integrations.md +3 -3
- package/docs/lints/ambiguous-style-base-order.md +2 -2
- package/docs/lints/bypassed-undefinition.md +3 -3
- package/docs/lints/clamped-value.md +1 -1
- package/docs/lints/conflicting-provider-properties.md +2 -2
- package/docs/lints/conflicting-utilities.md +67 -2
- package/docs/lints/document-scoped-selector.md +1 -1
- package/docs/lints/duplicate-definition.md +3 -3
- package/docs/lints/duplicate-utility.md +2 -2
- package/docs/lints/duplicate-view-transition-name.md +3 -3
- package/docs/lints/ignored-definition-condition.md +2 -2
- package/docs/lints/ignored-tailwind-feature.md +3 -3
- package/docs/lints/implicit-nesting-selector.md +2 -2
- package/docs/lints/incompatible-property-value.md +3 -3
- package/docs/lints/incompatible-theme-value.md +1 -1
- package/docs/lints/index.md +74 -74
- package/docs/lints/ineffective-anchor-scope.md +2 -2
- package/docs/lints/interfering-imported-style-base.md +1 -1
- package/docs/lints/invalid-animation-option.md +3 -3
- package/docs/lints/invalid-css-directive.md +3 -3
- package/docs/lints/invalid-css-import.md +2 -2
- package/docs/lints/invalid-css-input.md +4 -4
- package/docs/lints/invalid-cva-config.md +2 -2
- package/docs/lints/invalid-cva-input.md +4 -4
- package/docs/lints/invalid-keyframes-definition.md +2 -2
- package/docs/lints/invalid-keyframes-use.md +2 -2
- package/docs/lints/invalid-keyframes-variant.md +4 -4
- package/docs/lints/invalid-lint-suppression.md +3 -3
- package/docs/lints/invalid-marker-use.md +2 -2
- package/docs/lints/invalid-media-query.md +4 -4
- package/docs/lints/invalid-ref-input.md +4 -4
- package/docs/lints/invalid-rule-group-input.md +2 -2
- package/docs/lints/invalid-runtime-condition.md +3 -3
- package/docs/lints/invalid-stored-variant.md +3 -3
- package/docs/lints/invalid-style-composition.md +2 -2
- package/docs/lints/invalid-style-input.md +2 -2
- package/docs/lints/invalid-theme-reference.md +3 -3
- package/docs/lints/invalid-utility.md +3 -3
- package/docs/lints/invalid-variant.md +2 -2
- package/docs/lints/invalid-view-transition-definition.md +2 -2
- package/docs/lints/invalid-view-transition-use.md +2 -2
- package/docs/lints/invalid-view-transition-variant.md +3 -3
- package/docs/lints/mismatched-framework-import.md +3 -3
- package/docs/lints/missing-document-target.md +2 -2
- package/docs/lints/missing-ref-attachment.md +4 -4
- package/docs/lints/missing-view-transition-name.md +3 -3
- package/docs/lints/mutating-macro-argument.md +2 -2
- package/docs/lints/no-arbitrary-breakpoints.md +2 -2
- package/docs/lints/no-arbitrary-colors.md +2 -2
- package/docs/lints/no-arbitrary-spacing.md +1 -1
- package/docs/lints/no-class-property.md +3 -3
- package/docs/lints/no-important.md +2 -2
- package/docs/lints/no-restricted-declarations.md +1 -1
- package/docs/lints/no-restricted-length-units.md +1 -1
- package/docs/lints/no-restricted-theme-tokens.md +1 -1
- package/docs/lints/no-restricted-utilities.md +2 -2
- package/docs/lints/prefer-canonical-utilities.md +2 -2
- package/docs/lints/prefer-direct-styling.md +3 -3
- package/docs/lints/prefer-logical-properties.md +22 -5
- package/docs/lints/prefer-sorted-utilities.md +2 -2
- package/docs/lints/prefer-typed-relationships.md +3 -3
- package/docs/lints/prefer-typed-variables.md +1 -1
- package/docs/lints/prefer-variant-directive.md +3 -3
- package/docs/lints/redundant-variant.md +2 -2
- package/docs/lints/repeated-nesting-selector.md +2 -2
- package/docs/lints/runtime-condition-requires-css-if.md +3 -3
- package/docs/lints/split-view-transition-class.md +3 -3
- package/docs/lints/suspending-macro-argument.md +2 -2
- package/docs/lints/unknown-utility.md +4 -4
- package/docs/lints/unknown-variant.md +2 -2
- package/docs/lints/unmatched-host-selector.md +2 -2
- package/docs/lints/unsatisfiable-variants.md +1 -1
- package/docs/lints/unused-lint-suppression.md +1 -1
- package/docs/lints/unverified-style-base.md +2 -2
- package/docs/macros/anchor-scope.md +13 -13
- package/docs/macros/css.md +7 -7
- package/docs/macros/cva.md +13 -13
- package/docs/macros/index.md +10 -10
- package/docs/macros/keyframes.md +9 -9
- package/docs/macros/media.md +2 -2
- package/docs/macros/ref/as-anchor.md +11 -11
- package/docs/macros/ref/as-container.md +8 -8
- package/docs/macros/ref/at.md +10 -10
- package/docs/macros/ref/condition.md +8 -8
- package/docs/macros/ref/in.md +11 -11
- package/docs/macros/ref/index.md +16 -16
- package/docs/macros/ref/position-anchor.md +9 -9
- package/docs/macros/style.md +24 -24
- package/docs/macros/view-transition.md +16 -16
- package/docs/macros/when.md +13 -13
- package/docs/plugins/iconify.md +5 -5
- package/docs/plugins/index.md +4 -4
- package/docs/utilities-and-variants.md +6 -6
- package/docs/why.md +13 -15
- package/package.json +8 -6
- package/skills/migrate-to-stillwind/SKILL.md +36 -2
- package/skills/stillwind/SKILL.md +4 -0
|
@@ -5,7 +5,7 @@ description: "Reports two independent base styles in one call that set the same
|
|
|
5
5
|
|
|
6
6
|
# ambiguous-style-base-order
|
|
7
7
|
|
|
8
|
-
This rule reports a [`style()`](
|
|
8
|
+
This rule reports a [`style()`](https://stillwind.dev/docs/macros/style) call with two base styles
|
|
9
9
|
that set the same property, when neither base is built on the other. The order
|
|
10
10
|
of the arguments does not decide which base wins, so the result is not defined.
|
|
11
11
|
|
|
@@ -47,6 +47,6 @@ Bases that set different properties do not need this.
|
|
|
47
47
|
| `strict` | deny |
|
|
48
48
|
| `stylistic` | off |
|
|
49
49
|
|
|
50
|
-
[Configure lint](
|
|
50
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
51
51
|
|
|
52
52
|
The CLI and the editor report this rule only when they analyze the whole project.
|
|
@@ -5,7 +5,7 @@ description: "Reports a top-level utility definition that also applies where the
|
|
|
5
5
|
|
|
6
6
|
# bypassed-undefinition
|
|
7
7
|
|
|
8
|
-
This rule reports a top-level [`@utility`](
|
|
8
|
+
This rule reports a top-level [`@utility`](https://stillwind.dev/docs/at-rules/utility) that also applies
|
|
9
9
|
where Stillwind removes the utility on purpose. Inside animation options, for example,
|
|
10
10
|
`duration-*` sets `animation-duration`, and the built-in definitions remove the
|
|
11
11
|
`transition-duration` meaning there. A top-level `duration-slow` would bring that
|
|
@@ -36,7 +36,7 @@ meaning back.
|
|
|
36
36
|
## How to fix
|
|
37
37
|
|
|
38
38
|
Define the utility inside `@stillwind-registry default`, as in the example. Then
|
|
39
|
-
it applies in ordinary [`style()`](
|
|
39
|
+
it applies in ordinary [`style()`](https://stillwind.dev/docs/macros/style) calls, and animation options
|
|
40
40
|
keep their own meaning of `duration-*`.
|
|
41
41
|
|
|
42
42
|
## Rule settings
|
|
@@ -47,4 +47,4 @@ keep their own meaning of `duration-*`.
|
|
|
47
47
|
| `strict` | deny |
|
|
48
48
|
| `stylistic` | off |
|
|
49
49
|
|
|
50
|
-
[Configure lint](
|
|
50
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -41,4 +41,4 @@ custom property receives at runtime.
|
|
|
41
41
|
| `strict` | deny |
|
|
42
42
|
| `stylistic` | off |
|
|
43
43
|
|
|
44
|
-
[Configure lint](
|
|
44
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -6,7 +6,7 @@ description: "Reports a container or anchor property that a ref method and a uti
|
|
|
6
6
|
# conflicting-provider-properties
|
|
7
7
|
|
|
8
8
|
This rule reports a container or anchor property that a ref method, such as
|
|
9
|
-
[`asContainer()`](
|
|
9
|
+
[`asContainer()`](https://stillwind.dev/docs/macros/ref/as-container), and another utility both set
|
|
10
10
|
on the same element. For example, `asContainer("size")` sets
|
|
11
11
|
`container-type: size`, and `@container` sets it to `inline-size`. Only one
|
|
12
12
|
value takes effect, and the code does not show which.
|
|
@@ -45,4 +45,4 @@ style(card, card.asContainer("size"));
|
|
|
45
45
|
| `strict` | deny |
|
|
46
46
|
| `stylistic` | off |
|
|
47
47
|
|
|
48
|
-
[Configure lint](
|
|
48
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -33,7 +33,7 @@ style("p-4");
|
|
|
33
33
|
- If the values belong to different states or widths, add a variant to one of
|
|
34
34
|
them, such as `p-2 md:p-4`.
|
|
35
35
|
- If one utility overrides a shared style, pass the shared style as a base. See
|
|
36
|
-
[Override a style](
|
|
36
|
+
[Override a style](https://stillwind.dev/docs/guides/style#override-a-style).
|
|
37
37
|
- If a physical utility such as `ml-4` meets a logical utility such as `mx-auto`,
|
|
38
38
|
use logical utilities for both or physical utilities for both. The writing mode
|
|
39
39
|
decides how physical and logical properties overlap.
|
|
@@ -81,6 +81,70 @@ const rules = {
|
|
|
81
81
|
Utilities that conflict in every writing mode, such as `p-2 px-4`, are reported
|
|
82
82
|
even when the list is empty.
|
|
83
83
|
|
|
84
|
+
`ignoredUtilities` lists utility names whose pairs the rule does not report.
|
|
85
|
+
Use it for a base class that a component library expects you to combine with
|
|
86
|
+
modifier classes. For example, daisyUI expects `btn` with `btn-outline` or
|
|
87
|
+
`btn-ghost`:
|
|
88
|
+
|
|
89
|
+
```ts
|
|
90
|
+
const rules = {
|
|
91
|
+
"conflicting-utilities": {
|
|
92
|
+
ignoredUtilities: ["btn"],
|
|
93
|
+
},
|
|
94
|
+
};
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
The rule then reports neither `btn btn-outline` nor `btn btn-ghost`, but it
|
|
98
|
+
still reports `btn-outline btn-ghost`. Each entry is a complete,
|
|
99
|
+
case-sensitive glob that accepts `*` and `?`. The rule matches it against the
|
|
100
|
+
utility name without variants and the `!` modifier, so `btn` also covers
|
|
101
|
+
`hover:btn` and `btn!`. A pair is not reported when either utility matches. A
|
|
102
|
+
glob such as `btn*` also matches `btn-outline` and `btn-ghost`, so list base
|
|
103
|
+
classes by their full names. The default is an empty list.
|
|
104
|
+
[Plugins](#plugins) lists the base classes of common plugins.
|
|
105
|
+
|
|
106
|
+
## Plugins
|
|
107
|
+
|
|
108
|
+
Some plugins define a base class that you combine with modifier classes on the
|
|
109
|
+
same element, such as `btn btn-outline` in daisyUI. When both classes set the
|
|
110
|
+
same property, the rule reports the pair, although the plugin intends the
|
|
111
|
+
modifier to win. The following settings stop these reports for the plugins that
|
|
112
|
+
[Tailwind CSS compatibility](https://stillwind.dev/docs/guides/tailwind-compatibility#plugins-and-css-packages)
|
|
113
|
+
lists:
|
|
114
|
+
|
|
115
|
+
| Package | Setting | Pairs that the setting allows |
|
|
116
|
+
| ---------------------------------------------- | --------------------------------------------------- | -------------------------------------------------------- |
|
|
117
|
+
| `daisyui` | `ignoredUtilities: ["btn", "join"]` | `btn btn-outline`, `btn btn-ghost`, `join join-vertical` |
|
|
118
|
+
| `@tailwindcss/typography` | `ignoredUtilities: ["prose"]` | `prose prose-lg`, `prose prose-invert` |
|
|
119
|
+
| `@tailwindcss/forms` with the `class` strategy | `ignoredUtilities: ["form-*"]` | `form-input px-4`, `form-select rounded-full` |
|
|
120
|
+
| `tailwind-scrollbar` | `ignoredUtilities: ["scrollbar", "scrollbar-thin"]` | `scrollbar scrollbar-thumb-sky-700` |
|
|
121
|
+
| `tailwindcss-motion` | `ignoredUtilities: ["motion-preset-*"]` | `motion-preset-fade motion-duration-2000` |
|
|
122
|
+
| `tailwindcss-animate` | `ignoredUtilities: ["animate-in", "animate-out"]` | `animate-in fade-in`, `animate-in duration-300` |
|
|
123
|
+
| `tailwindcss-animated` | `allowShorthandOverrides: true` | `animate-fade animate-duration-1000` |
|
|
124
|
+
| `tw-animate-css` | `allowShorthandOverrides: true` | `animate-in delay-150`, `animate-in repeat-infinite` |
|
|
125
|
+
|
|
126
|
+
The other packages on that page need no setting. In these packages, the rule
|
|
127
|
+
reports only pairs of alternative classes, such as `h-radix-select-trigger h-10`.
|
|
128
|
+
|
|
129
|
+
`tailwindcss-animated` and `tw-animate-css` write the `animation` shorthand in
|
|
130
|
+
an animation class and an `animation-*` longhand in a modifier class, so
|
|
131
|
+
`allowShorthandOverrides` allows these pairs without hiding other pairs of the
|
|
132
|
+
animation class.
|
|
133
|
+
|
|
134
|
+
If you use several plugins, put all their entries in one list:
|
|
135
|
+
|
|
136
|
+
```ts
|
|
137
|
+
const rules = {
|
|
138
|
+
"conflicting-utilities": {
|
|
139
|
+
ignoredUtilities: ["btn", "join", "prose"],
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
An ignored base class also hides the pairs that do conflict, such as
|
|
145
|
+
`animate-in animate-out` or `scrollbar scrollbar-thin`. Check these pairs in
|
|
146
|
+
review.
|
|
147
|
+
|
|
84
148
|
## Rule settings
|
|
85
149
|
|
|
86
150
|
| Preset | Severity |
|
|
@@ -93,5 +157,6 @@ even when the list is empty.
|
|
|
93
157
|
| --- | --- |
|
|
94
158
|
| `allowShorthandOverrides` | `false` |
|
|
95
159
|
| `writingModes` | `["horizontal-tb"]` |
|
|
160
|
+
| `ignoredUtilities` | `[]` |
|
|
96
161
|
|
|
97
|
-
[Configure lint](
|
|
162
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -5,8 +5,8 @@ description: "Reports a utility or variant definition that replaces an earlier o
|
|
|
5
5
|
|
|
6
6
|
# duplicate-definition
|
|
7
7
|
|
|
8
|
-
This rule reports a [`@utility`](
|
|
9
|
-
[`@custom-variant`](
|
|
8
|
+
This rule reports a [`@utility`](https://stillwind.dev/docs/at-rules/utility) or
|
|
9
|
+
[`@custom-variant`](https://stillwind.dev/docs/at-rules/custom-variant) definition that replaces an
|
|
10
10
|
earlier definition with the same name. The definitions do not combine, so the
|
|
11
11
|
earlier one is lost. In the example, `hocus` matches focus only, not hover.
|
|
12
12
|
|
|
@@ -42,4 +42,4 @@ earlier one is lost. In the example, `hocus` matches focus only, not hover.
|
|
|
42
42
|
| `strict` | deny |
|
|
43
43
|
| `stylistic` | off |
|
|
44
44
|
|
|
45
|
-
[Configure lint](
|
|
45
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -31,7 +31,7 @@ style("p-4");
|
|
|
31
31
|
Remove one of them. The automatic fix removes the repeated utility.
|
|
32
32
|
|
|
33
33
|
Two different utilities that set the same property are reported by
|
|
34
|
-
[conflicting-utilities](conflicting-utilities
|
|
34
|
+
[conflicting-utilities](https://stillwind.dev/docs/lints/conflicting-utilities) instead.
|
|
35
35
|
|
|
36
36
|
## Rule settings
|
|
37
37
|
|
|
@@ -41,4 +41,4 @@ Two different utilities that set the same property are reported by
|
|
|
41
41
|
| `strict` | deny |
|
|
42
42
|
| `stylistic` | off |
|
|
43
43
|
|
|
44
|
-
[Configure lint](
|
|
44
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -5,8 +5,8 @@ description: "Reports two .for() calls in one style() call."
|
|
|
5
5
|
|
|
6
6
|
# duplicate-view-transition-name
|
|
7
7
|
|
|
8
|
-
This rule reports a [`style()`](
|
|
9
|
-
[`.for()`](
|
|
8
|
+
This rule reports a [`style()`](https://stillwind.dev/docs/macros/style) call with more than one
|
|
9
|
+
[`.for()`](https://stillwind.dev/docs/macros/view-transition). An element has one
|
|
10
10
|
[`view-transition-name`](https://developer.mozilla.org/docs/Web/CSS/Reference/Properties/view-transition-name),
|
|
11
11
|
so only one of the names takes effect.
|
|
12
12
|
|
|
@@ -44,4 +44,4 @@ style(transition.for("a"));
|
|
|
44
44
|
| `strict` | deny |
|
|
45
45
|
| `stylistic` | off |
|
|
46
46
|
|
|
47
|
-
[Configure lint](
|
|
47
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -5,7 +5,7 @@ description: "Reports a media rule around a utility definition, which the compil
|
|
|
5
5
|
|
|
6
6
|
# ignored-definition-condition
|
|
7
7
|
|
|
8
|
-
This rule reports a [`@utility`](
|
|
8
|
+
This rule reports a [`@utility`](https://stillwind.dev/docs/at-rules/utility) definition inside a
|
|
9
9
|
condition such as `@media`. The compiler registers utilities when it reads the
|
|
10
10
|
stylesheet, not in the browser, so it ignores the condition. The utility then
|
|
11
11
|
applies at every width.
|
|
@@ -49,4 +49,4 @@ applies at every width.
|
|
|
49
49
|
| `strict` | deny |
|
|
50
50
|
| `stylistic` | off |
|
|
51
51
|
|
|
52
|
-
[Configure lint](
|
|
52
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -8,7 +8,7 @@ description: "Reports Tailwind CSS features that Stillwind ignores in the styles
|
|
|
8
8
|
This rule reports a Tailwind CSS feature in your stylesheet that Stillwind
|
|
9
9
|
ignores, such as `@config`, `@source`, or an option on `@import`. The line has
|
|
10
10
|
no effect, because Stillwind reads its settings from `stillwind.config.ts` and
|
|
11
|
-
generates utilities only from [`style()`](
|
|
11
|
+
generates utilities only from [`style()`](https://stillwind.dev/docs/macros/style) calls.
|
|
12
12
|
|
|
13
13
|
## Reported
|
|
14
14
|
|
|
@@ -48,7 +48,7 @@ export default defineConfig({
|
|
|
48
48
|
- Replace a v3 path in `theme()`, such as `theme(colors.red.500)`, with a theme
|
|
49
49
|
variable: `--theme(--color-red-500)`. Without this change, browsers reject the
|
|
50
50
|
declaration.
|
|
51
|
-
- [Migrating from Tailwind CSS](
|
|
51
|
+
- [Migrating from Tailwind CSS](https://stillwind.dev/docs/guides/migrating-from-tailwind#move-configuration)
|
|
52
52
|
lists every replacement.
|
|
53
53
|
|
|
54
54
|
## Rule settings
|
|
@@ -59,4 +59,4 @@ export default defineConfig({
|
|
|
59
59
|
| `strict` | deny |
|
|
60
60
|
| `stylistic` | off |
|
|
61
61
|
|
|
62
|
-
[Configure lint](
|
|
62
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -5,7 +5,7 @@ description: "Reports a custom variant selector without &, which matches descend
|
|
|
5
5
|
|
|
6
6
|
# implicit-nesting-selector
|
|
7
7
|
|
|
8
|
-
This rule reports a [`@custom-variant`](
|
|
8
|
+
This rule reports a [`@custom-variant`](https://stillwind.dev/docs/at-rules/custom-variant) selector
|
|
9
9
|
without `&`. Without `&`, the selector matches descendants of the element, not
|
|
10
10
|
the element itself. In the example, `hocus:` would match hovered elements inside
|
|
11
11
|
the element.
|
|
@@ -40,4 +40,4 @@ the element.
|
|
|
40
40
|
| `strict` | deny |
|
|
41
41
|
| `stylistic` | off |
|
|
42
42
|
|
|
43
|
-
[Configure lint](
|
|
43
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -21,10 +21,10 @@ For a utility that your own stylesheet defines, the rule also checks the other
|
|
|
21
21
|
declarations that the utility writes, such as a bare value in `fg-5` from
|
|
22
22
|
`@utility fg-* { color: --value(integer); }`. It skips values that contain
|
|
23
23
|
`var()`, values that come from theme tokens, and custom properties.
|
|
24
|
-
[incompatible-theme-value](incompatible-theme-value
|
|
24
|
+
[incompatible-theme-value](https://stillwind.dev/docs/lints/incompatible-theme-value) checks theme
|
|
25
25
|
tokens where you define them. By default, the rule does not check the
|
|
26
26
|
definitions of packages and plugins, because you cannot change them. The
|
|
27
|
-
[`checkLibraries` and `checkPlugins`](
|
|
27
|
+
[`checkLibraries` and `checkPlugins`](https://stillwind.dev/docs/configuration#definitions-of-packages-and-plugins)
|
|
28
28
|
fields of `lint` select packages and plugins to check.
|
|
29
29
|
|
|
30
30
|
## Reported
|
|
@@ -57,4 +57,4 @@ style("w-1/2");
|
|
|
57
57
|
| `strict` | deny |
|
|
58
58
|
| `stylistic` | off |
|
|
59
59
|
|
|
60
|
-
[Configure lint](
|
|
60
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -43,4 +43,4 @@ namespace. For example, tokens in `--color-*` must be colors, so a length makes
|
|
|
43
43
|
| `strict` | deny |
|
|
44
44
|
| `stylistic` | off |
|
|
45
45
|
|
|
46
|
-
[Configure lint](
|
|
46
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
package/docs/lints/index.md
CHANGED
|
@@ -6,8 +6,8 @@ description: "Find a lint rule by the kind of mistake or policy that it reports.
|
|
|
6
6
|
# Lint rule reference
|
|
7
7
|
|
|
8
8
|
Lint rules report mistakes and project policies in your styles. The CLI and the
|
|
9
|
-
editor run them. [Checks in the editor and CI](
|
|
10
|
-
explains where the rules run, and [Configuration](
|
|
9
|
+
editor run them. [Checks in the editor and CI](https://stillwind.dev/docs/guides/lint-adoption)
|
|
10
|
+
explains where the rules run, and [Configuration](https://stillwind.dev/docs/configuration#lint)
|
|
11
11
|
covers presets, severities, and suppression comments.
|
|
12
12
|
|
|
13
13
|
The **Default** column shows the severity in the `recommended` preset, which a
|
|
@@ -20,11 +20,11 @@ A utility or variant that these rules report produces no CSS.
|
|
|
20
20
|
|
|
21
21
|
| Rule | Reports | Default |
|
|
22
22
|
| ---------------------------------------------------- | ------------------------------------------------------------- | ------- |
|
|
23
|
-
| [invalid-marker-use](invalid-marker-use
|
|
24
|
-
| [invalid-utility](invalid-utility
|
|
25
|
-
| [invalid-variant](invalid-variant
|
|
26
|
-
| [unknown-utility](unknown-utility
|
|
27
|
-
| [unknown-variant](unknown-variant
|
|
23
|
+
| [invalid-marker-use](https://stillwind.dev/docs/lints/invalid-marker-use) | A marker class such as `group` with a variant or `!` | warn |
|
|
24
|
+
| [invalid-utility](https://stillwind.dev/docs/lints/invalid-utility) | A known utility written in a form that it does not accept | deny |
|
|
25
|
+
| [invalid-variant](https://stillwind.dev/docs/lints/invalid-variant) | A known variant with an invalid value, such as `min-[foo]:` | deny |
|
|
26
|
+
| [unknown-utility](https://stillwind.dev/docs/lints/unknown-utility) | A utility or theme value that your stylesheet does not define | deny |
|
|
27
|
+
| [unknown-variant](https://stillwind.dev/docs/lints/unknown-variant) | A variant that your stylesheet does not define | deny |
|
|
28
28
|
|
|
29
29
|
## Invalid arguments to Stillwind APIs
|
|
30
30
|
|
|
@@ -33,74 +33,74 @@ report never matches.
|
|
|
33
33
|
|
|
34
34
|
| Rule | Reports | Default |
|
|
35
35
|
| ------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------- | ------- |
|
|
36
|
-
| [invalid-animation-option](invalid-animation-option
|
|
37
|
-
| [invalid-css-input](invalid-css-input
|
|
38
|
-
| [invalid-cva-config](invalid-cva-config
|
|
39
|
-
| [invalid-cva-input](invalid-cva-input
|
|
40
|
-
| [invalid-keyframes-definition](invalid-keyframes-definition
|
|
41
|
-
| [invalid-keyframes-use](invalid-keyframes-use
|
|
42
|
-
| [invalid-keyframes-variant](invalid-keyframes-variant
|
|
43
|
-
| [invalid-media-query](invalid-media-query
|
|
44
|
-
| [invalid-ref-input](invalid-ref-input
|
|
45
|
-
| [invalid-rule-group-input](invalid-rule-group-input
|
|
46
|
-
| [invalid-runtime-condition](invalid-runtime-condition
|
|
47
|
-
| [invalid-stored-variant](invalid-stored-variant
|
|
48
|
-
| [invalid-style-composition](invalid-style-composition
|
|
49
|
-
| [invalid-style-input](invalid-style-input
|
|
50
|
-
| [invalid-view-transition-definition](invalid-view-transition-definition
|
|
51
|
-
| [invalid-view-transition-use](invalid-view-transition-use
|
|
52
|
-
| [invalid-view-transition-variant](invalid-view-transition-variant
|
|
53
|
-
| [missing-document-target](missing-document-target
|
|
54
|
-
| [runtime-condition-requires-css-if](runtime-condition-requires-css-if
|
|
36
|
+
| [invalid-animation-option](https://stillwind.dev/docs/lints/invalid-animation-option) | A utility that is not an animation option, such as `p-4` | deny |
|
|
37
|
+
| [invalid-css-input](https://stillwind.dev/docs/lints/invalid-css-input) | A [`style.css()`](https://stillwind.dev/docs/macros/css) argument that is not a static utility | deny |
|
|
38
|
+
| [invalid-cva-config](https://stillwind.dev/docs/lints/invalid-cva-config) | An unknown or malformed field in a [`style.cva()`](https://stillwind.dev/docs/macros/cva) configuration | deny |
|
|
39
|
+
| [invalid-cva-input](https://stillwind.dev/docs/lints/invalid-cva-input) | `&&` or a ternary inside a `style.cva()` value | deny |
|
|
40
|
+
| [invalid-keyframes-definition](https://stillwind.dev/docs/lints/invalid-keyframes-definition) | A frame key that is not a keyframe position, such as `middle` | deny |
|
|
41
|
+
| [invalid-keyframes-use](https://stillwind.dev/docs/lints/invalid-keyframes-use) | An animation applied with an argument that is not an options string | deny |
|
|
42
|
+
| [invalid-keyframes-variant](https://stillwind.dev/docs/lints/invalid-keyframes-variant) | A selector or container variant around a keyframes definition | deny |
|
|
43
|
+
| [invalid-media-query](https://stillwind.dev/docs/lints/invalid-media-query) | A condition in [`style.media()`](https://stillwind.dev/docs/macros/media) that is not a media query, such as `hover` | deny |
|
|
44
|
+
| [invalid-ref-input](https://stillwind.dev/docs/lints/invalid-ref-input) | A [`style.ref()`](https://stillwind.dev/docs/macros/ref) label or ref method argument that is not a literal | deny |
|
|
45
|
+
| [invalid-rule-group-input](https://stillwind.dev/docs/lints/invalid-rule-group-input) | A `class` field or ref inside a variant key of [`style()`](https://stillwind.dev/docs/macros/style) | deny |
|
|
46
|
+
| [invalid-runtime-condition](https://stillwind.dev/docs/lints/invalid-runtime-condition) | A runtime CSS condition that Stillwind cannot compile | deny |
|
|
47
|
+
| [invalid-stored-variant](https://stillwind.dev/docs/lints/invalid-stored-variant) | A [`style.when()`](https://stillwind.dev/docs/macros/when) argument that is not a sequence of variants | deny |
|
|
48
|
+
| [invalid-style-composition](https://stillwind.dev/docs/lints/invalid-style-composition) | Inline styles or custom properties in a base style, which do not carry over | deny |
|
|
49
|
+
| [invalid-style-input](https://stillwind.dev/docs/lints/invalid-style-input) | A [`style()`](https://stillwind.dev/docs/macros/style) argument that it cannot compile, such as a number | deny |
|
|
50
|
+
| [invalid-view-transition-definition](https://stillwind.dev/docs/lints/invalid-view-transition-definition) | An unknown field in a [`style.viewTransition()`](https://stillwind.dev/docs/macros/view-transition) definition | deny |
|
|
51
|
+
| [invalid-view-transition-use](https://stillwind.dev/docs/lints/invalid-view-transition-use) | Extra or invalid arguments to [`.for()`](https://stillwind.dev/docs/macros/view-transition) | deny |
|
|
52
|
+
| [invalid-view-transition-variant](https://stillwind.dev/docs/lints/invalid-view-transition-variant) | A state or container variant in a view transition definition | deny |
|
|
53
|
+
| [missing-document-target](https://stillwind.dev/docs/lints/missing-document-target) | A [`style.css()`](https://stillwind.dev/docs/macros/css) utility without a selector | deny |
|
|
54
|
+
| [runtime-condition-requires-css-if](https://stillwind.dev/docs/lints/runtime-condition-requires-css-if) | A runtime CSS condition that needs `useCssIf` | deny |
|
|
55
55
|
|
|
56
56
|
## Arguments and imports
|
|
57
57
|
|
|
58
58
|
| Rule | Reports | Default |
|
|
59
59
|
| ---------------------------------------------------------------------- | --------------------------------------------------------------------------------- | ------- |
|
|
60
|
-
| [mismatched-framework-import](mismatched-framework-import
|
|
61
|
-
| [mutating-macro-argument](mutating-macro-argument
|
|
62
|
-
| [suspending-macro-argument](suspending-macro-argument
|
|
60
|
+
| [mismatched-framework-import](https://stillwind.dev/docs/lints/mismatched-framework-import) | An import from the entrypoint of another framework | warn |
|
|
61
|
+
| [mutating-macro-argument](https://stillwind.dev/docs/lints/mutating-macro-argument) | A state update inside a [`style()`](https://stillwind.dev/docs/macros/style) argument | deny |
|
|
62
|
+
| [suspending-macro-argument](https://stillwind.dev/docs/lints/suspending-macro-argument) | `await`, `yield`, or `import()` inside a [`style()`](https://stillwind.dev/docs/macros/style) argument | deny |
|
|
63
63
|
|
|
64
64
|
## Conflicting or duplicated styles
|
|
65
65
|
|
|
66
66
|
| Rule | Reports | Default |
|
|
67
67
|
| ------------------------------------------------------------------------------ | ----------------------------------------------------------------------- | ------- |
|
|
68
|
-
| [ambiguous-style-base-order](ambiguous-style-base-order
|
|
69
|
-
| [conflicting-provider-properties](conflicting-provider-properties
|
|
70
|
-
| [conflicting-utilities](conflicting-utilities
|
|
71
|
-
| [duplicate-utility](duplicate-utility
|
|
72
|
-
| [interfering-imported-style-base](interfering-imported-style-base
|
|
73
|
-
| [unverified-style-base](unverified-style-base
|
|
68
|
+
| [ambiguous-style-base-order](https://stillwind.dev/docs/lints/ambiguous-style-base-order) | Two base styles in one call that set the same property | warn |
|
|
69
|
+
| [conflicting-provider-properties](https://stillwind.dev/docs/lints/conflicting-provider-properties) | A container or anchor property that a ref method and a utility both set | warn |
|
|
70
|
+
| [conflicting-utilities](https://stillwind.dev/docs/lints/conflicting-utilities) | Utilities that set the same property, such as `p-2 p-4` | warn |
|
|
71
|
+
| [duplicate-utility](https://stillwind.dev/docs/lints/duplicate-utility) | The same utility twice under the same conditions | warn |
|
|
72
|
+
| [interfering-imported-style-base](https://stillwind.dev/docs/lints/interfering-imported-style-base) | An imported base style that sets the same property as another style | warn |
|
|
73
|
+
| [unverified-style-base](https://stillwind.dev/docs/lints/unverified-style-base) | A base style whose origin the CLI cannot determine from its type | warn |
|
|
74
74
|
|
|
75
75
|
## Styles that do not apply as written
|
|
76
76
|
|
|
77
77
|
| Rule | Reports | Default |
|
|
78
78
|
| ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | ------- |
|
|
79
|
-
| [clamped-value](clamped-value
|
|
80
|
-
| [document-scoped-selector](document-scoped-selector
|
|
81
|
-
| [duplicate-view-transition-name](duplicate-view-transition-name
|
|
82
|
-
| [incompatible-property-value](incompatible-property-value
|
|
83
|
-
| [ineffective-anchor-scope](ineffective-anchor-scope
|
|
84
|
-
| [missing-ref-attachment](missing-ref-attachment
|
|
85
|
-
| [missing-view-transition-name](missing-view-transition-name
|
|
86
|
-
| [repeated-nesting-selector](repeated-nesting-selector
|
|
87
|
-
| [split-view-transition-class](split-view-transition-class
|
|
88
|
-
| [unmatched-host-selector](unmatched-host-selector
|
|
89
|
-
| [unsatisfiable-variants](unsatisfiable-variants
|
|
79
|
+
| [clamped-value](https://stillwind.dev/docs/lints/clamped-value) | A value outside the range that the browser uses, such as opacity above 1 | warn |
|
|
80
|
+
| [document-scoped-selector](https://stillwind.dev/docs/lints/document-scoped-selector) | A selector that styles the whole document instead of the element | deny |
|
|
81
|
+
| [duplicate-view-transition-name](https://stillwind.dev/docs/lints/duplicate-view-transition-name) | Two [`.for()`](https://stillwind.dev/docs/macros/view-transition) calls in one [`style()`](https://stillwind.dev/docs/macros/style) call | warn |
|
|
82
|
+
| [incompatible-property-value](https://stillwind.dev/docs/lints/incompatible-property-value) | A value that the browser rejects for the property | deny |
|
|
83
|
+
| [ineffective-anchor-scope](https://stillwind.dev/docs/lints/ineffective-anchor-scope) | An empty or repeated ref list in an anchor scope | warn |
|
|
84
|
+
| [missing-ref-attachment](https://stillwind.dev/docs/lints/missing-ref-attachment) | [`asContainer()`](https://stillwind.dev/docs/macros/ref/as-container) or [`asAnchor()`](https://stillwind.dev/docs/macros/ref/as-anchor) in a call that does not attach the ref | warn |
|
|
85
|
+
| [missing-view-transition-name](https://stillwind.dev/docs/lints/missing-view-transition-name) | A view transition applied without [`.for()`](https://stillwind.dev/docs/macros/view-transition) | warn |
|
|
86
|
+
| [repeated-nesting-selector](https://stillwind.dev/docs/lints/repeated-nesting-selector) | A selector that repeats `&` to relate two elements | warn |
|
|
87
|
+
| [split-view-transition-class](https://stillwind.dev/docs/lints/split-view-transition-class) | View transitions split across separate [`style()`](https://stillwind.dev/docs/macros/style) calls | warn |
|
|
88
|
+
| [unmatched-host-selector](https://stillwind.dev/docs/lints/unmatched-host-selector) | A variant that tests a shadow host through the elements around it | warn |
|
|
89
|
+
| [unsatisfiable-variants](https://stillwind.dev/docs/lints/unsatisfiable-variants) | Variants that can never match together, such as `portrait:landscape:` | warn |
|
|
90
90
|
|
|
91
91
|
## Stylesheet definitions
|
|
92
92
|
|
|
93
93
|
| Rule | Reports | Default |
|
|
94
94
|
| ------------------------------------------------------------------------ | ---------------------------------------------------------------- | ------- |
|
|
95
|
-
| [bypassed-undefinition](bypassed-undefinition
|
|
96
|
-
| [duplicate-definition](duplicate-definition
|
|
97
|
-
| [ignored-definition-condition](ignored-definition-condition
|
|
98
|
-
| [ignored-tailwind-feature](ignored-tailwind-feature
|
|
99
|
-
| [implicit-nesting-selector](implicit-nesting-selector
|
|
100
|
-
| [incompatible-theme-value](incompatible-theme-value
|
|
101
|
-
| [invalid-css-directive](invalid-css-directive
|
|
102
|
-
| [invalid-css-import](invalid-css-import
|
|
103
|
-
| [invalid-theme-reference](invalid-theme-reference
|
|
95
|
+
| [bypassed-undefinition](https://stillwind.dev/docs/lints/bypassed-undefinition) | A definition that bypasses an undefinition in another context | warn |
|
|
96
|
+
| [duplicate-definition](https://stillwind.dev/docs/lints/duplicate-definition) | A utility or variant definition that replaces an earlier one | warn |
|
|
97
|
+
| [ignored-definition-condition](https://stillwind.dev/docs/lints/ignored-definition-condition) | A media rule around a definition, which the compiler ignores | deny |
|
|
98
|
+
| [ignored-tailwind-feature](https://stillwind.dev/docs/lints/ignored-tailwind-feature) | Tailwind-only directives such as `@config`, which have no effect | warn |
|
|
99
|
+
| [implicit-nesting-selector](https://stillwind.dev/docs/lints/implicit-nesting-selector) | A custom variant selector without `&`, which selects descendants | warn |
|
|
100
|
+
| [incompatible-theme-value](https://stillwind.dev/docs/lints/incompatible-theme-value) | A theme value of the wrong type, such as a length for a color | deny |
|
|
101
|
+
| [invalid-css-directive](https://stillwind.dev/docs/lints/invalid-css-directive) | A malformed or unsupported Stillwind directive | deny |
|
|
102
|
+
| [invalid-css-import](https://stillwind.dev/docs/lints/invalid-css-import) | A stylesheet import that cannot be resolved | deny |
|
|
103
|
+
| [invalid-theme-reference](https://stillwind.dev/docs/lints/invalid-theme-reference) | A reference to a theme token that is not defined | deny |
|
|
104
104
|
|
|
105
105
|
## Project policies
|
|
106
106
|
|
|
@@ -108,15 +108,15 @@ These rules enforce choices of your project. No preset enables them.
|
|
|
108
108
|
|
|
109
109
|
| Rule | Reports | Default |
|
|
110
110
|
| -------------------------------------------------------------------- | ------------------------------------------------------------- | ------- |
|
|
111
|
-
| [no-arbitrary-breakpoints](no-arbitrary-breakpoints
|
|
112
|
-
| [no-arbitrary-colors](no-arbitrary-colors
|
|
113
|
-
| [no-arbitrary-spacing](no-arbitrary-spacing
|
|
114
|
-
| [no-class-property](no-class-property
|
|
115
|
-
| [no-important](no-important
|
|
116
|
-
| [no-restricted-declarations](no-restricted-declarations
|
|
117
|
-
| [no-restricted-length-units](no-restricted-length-units
|
|
118
|
-
| [no-restricted-theme-tokens](no-restricted-theme-tokens
|
|
119
|
-
| [no-restricted-utilities](no-restricted-utilities
|
|
111
|
+
| [no-arbitrary-breakpoints](https://stillwind.dev/docs/lints/no-arbitrary-breakpoints) | Viewport widths written as values, such as `min-[713px]:` | off |
|
|
112
|
+
| [no-arbitrary-colors](https://stillwind.dev/docs/lints/no-arbitrary-colors) | Colors written as values, such as `bg-[#123456]` | off |
|
|
113
|
+
| [no-arbitrary-spacing](https://stillwind.dev/docs/lints/no-arbitrary-spacing) | Spacing written as values, such as `p-[13px]` | off |
|
|
114
|
+
| [no-class-property](https://stillwind.dev/docs/lints/no-class-property) | The `class` field, which adds classes without generated CSS | off |
|
|
115
|
+
| [no-important](https://stillwind.dev/docs/lints/no-important) | The `!` modifier | off |
|
|
116
|
+
| [no-restricted-declarations](https://stillwind.dev/docs/lints/no-restricted-declarations) | Utilities that produce the CSS declarations that you list | off |
|
|
117
|
+
| [no-restricted-length-units](https://stillwind.dev/docs/lints/no-restricted-length-units) | Length units that you forbid for the properties that you list | off |
|
|
118
|
+
| [no-restricted-theme-tokens](https://stillwind.dev/docs/lints/no-restricted-theme-tokens) | Utilities that use the theme tokens that you list | off |
|
|
119
|
+
| [no-restricted-utilities](https://stillwind.dev/docs/lints/no-restricted-utilities) | The utilities that you list | off |
|
|
120
120
|
|
|
121
121
|
## Preferred spelling
|
|
122
122
|
|
|
@@ -125,18 +125,18 @@ preset enables the rules that are off by default.
|
|
|
125
125
|
|
|
126
126
|
| Rule | Reports | Default |
|
|
127
127
|
| -------------------------------------------------------------------- | ------------------------------------------------------------------------ | ------- |
|
|
128
|
-
| [prefer-canonical-utilities](prefer-canonical-utilities
|
|
129
|
-
| [prefer-direct-styling](prefer-direct-styling
|
|
130
|
-
| [prefer-logical-properties](prefer-logical-properties
|
|
131
|
-
| [prefer-sorted-utilities](prefer-sorted-utilities
|
|
132
|
-
| [prefer-typed-relationships](prefer-typed-relationships
|
|
133
|
-
| [prefer-typed-variables](prefer-typed-variables
|
|
134
|
-
| [prefer-variant-directive](prefer-variant-directive
|
|
135
|
-
| [redundant-variant](redundant-variant
|
|
128
|
+
| [prefer-canonical-utilities](https://stillwind.dev/docs/lints/prefer-canonical-utilities) | A utility with a shorter equivalent, such as `px-[16px]` for `px-4` | warn |
|
|
129
|
+
| [prefer-direct-styling](https://stillwind.dev/docs/lints/prefer-direct-styling) | A selector that styles another element, such as `[&_button]:` | off |
|
|
130
|
+
| [prefer-logical-properties](https://stillwind.dev/docs/lints/prefer-logical-properties) | A physical property with a logical form, such as `ml-4` | off |
|
|
131
|
+
| [prefer-sorted-utilities](https://stillwind.dev/docs/lints/prefer-sorted-utilities) | Utilities that are not in sorted order | off |
|
|
132
|
+
| [prefer-typed-relationships](https://stillwind.dev/docs/lints/prefer-typed-relationships) | `group-*` and `peer-*` variants that a ref can replace | off |
|
|
133
|
+
| [prefer-typed-variables](https://stillwind.dev/docs/lints/prefer-typed-variables) | A custom property without a type in a utility that accepts several types | off |
|
|
134
|
+
| [prefer-variant-directive](https://stillwind.dev/docs/lints/prefer-variant-directive) | A media rule in your CSS that a named variant can replace | off |
|
|
135
|
+
| [redundant-variant](https://stillwind.dev/docs/lints/redundant-variant) | A variant that adds no condition, such as `hover:hover:` | warn |
|
|
136
136
|
|
|
137
137
|
## Suppression comments
|
|
138
138
|
|
|
139
139
|
| Rule | Reports | Default |
|
|
140
140
|
| ---------------------------------------------------------------- | ------------------------------------------- | ------- |
|
|
141
|
-
| [invalid-lint-suppression](invalid-lint-suppression
|
|
142
|
-
| [unused-lint-suppression](unused-lint-suppression
|
|
141
|
+
| [invalid-lint-suppression](https://stillwind.dev/docs/lints/invalid-lint-suppression) | A malformed comment or an unknown rule name | warn |
|
|
142
|
+
| [unused-lint-suppression](https://stillwind.dev/docs/lints/unused-lint-suppression) | A comment that suppresses no finding | off |
|
|
@@ -35,7 +35,7 @@ Write the scope that you mean:
|
|
|
35
35
|
- Use `"all"` to limit every anchor name.
|
|
36
36
|
- Use `"none"` to set `anchor-scope: none`.
|
|
37
37
|
|
|
38
|
-
See [`style.anchorScope()`](
|
|
38
|
+
See [`style.anchorScope()`](https://stillwind.dev/docs/macros/anchor-scope#inputs).
|
|
39
39
|
|
|
40
40
|
## Rule settings
|
|
41
41
|
|
|
@@ -45,4 +45,4 @@ See [`style.anchorScope()`](../macros/anchor-scope.md#inputs).
|
|
|
45
45
|
| `strict` | deny |
|
|
46
46
|
| `stylistic` | off |
|
|
47
47
|
|
|
48
|
-
[Configure lint](
|
|
48
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -70,6 +70,6 @@ Reordering the arguments does not fix it. `style("p-4", first)` and
|
|
|
70
70
|
| `strict` | deny |
|
|
71
71
|
| `stylistic` | off |
|
|
72
72
|
|
|
73
|
-
[Configure lint](
|
|
73
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
74
74
|
|
|
75
75
|
The CLI and the editor report this rule only when they analyze the whole project.
|
|
@@ -31,10 +31,10 @@ style("p-4", fade(""));
|
|
|
31
31
|
## How to fix
|
|
32
32
|
|
|
33
33
|
- Move the utility out of the animation options and into the
|
|
34
|
-
[`style()`](
|
|
34
|
+
[`style()`](https://stillwind.dev/docs/macros/style) call, as in the example.
|
|
35
35
|
- Keep only animation options, such as `duration-300` or `both`, in the options.
|
|
36
36
|
|
|
37
|
-
See [`style.keyframes()`](
|
|
37
|
+
See [`style.keyframes()`](https://stillwind.dev/docs/macros/keyframes#apply-the-animation).
|
|
38
38
|
|
|
39
39
|
## Rule settings
|
|
40
40
|
|
|
@@ -44,4 +44,4 @@ See [`style.keyframes()`](../macros/keyframes.md#apply-the-animation).
|
|
|
44
44
|
| `strict` | deny |
|
|
45
45
|
| `stylistic` | off |
|
|
46
46
|
|
|
47
|
-
[Configure lint](
|
|
47
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -6,12 +6,12 @@ description: "Reports a malformed or unsupported Stillwind directive in your sty
|
|
|
6
6
|
# invalid-css-directive
|
|
7
7
|
|
|
8
8
|
This rule reports a Stillwind directive in your stylesheet that the compiler
|
|
9
|
-
cannot read, such as [`@stillwind-slot`](
|
|
9
|
+
cannot read, such as [`@stillwind-slot`](https://stillwind.dev/docs/at-rules/stillwind-slot) with
|
|
10
10
|
an unknown slot name. The compiler skips the directive.
|
|
11
11
|
|
|
12
12
|
The rule also reports a statement that works only at the top level of a stylesheet
|
|
13
13
|
when you write it inside a style rule: a definition such as
|
|
14
|
-
[`@utility`](
|
|
14
|
+
[`@utility`](https://stillwind.dev/docs/at-rules/utility) or `@theme`, a Tailwind configuration statement
|
|
15
15
|
such as `@plugin`, or a `@layer` statement that lists layer names. The compiler
|
|
16
16
|
ignores the whole statement. `@variant`, `@apply`, `@stillwind-slot`, and
|
|
17
17
|
`@stillwind-require-properties` still work inside a style rule.
|
|
@@ -48,4 +48,4 @@ ignores the whole statement. `@variant`, `@apply`, `@stillwind-slot`, and
|
|
|
48
48
|
| `strict` | deny |
|
|
49
49
|
| `stylistic` | off |
|
|
50
50
|
|
|
51
|
-
[Configure lint](
|
|
51
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|
|
@@ -13,7 +13,7 @@ The rule also reports an `@import` inside a style rule when the imported file, o
|
|
|
13
13
|
file that it imports, contains a statement that works only at the top level, such
|
|
14
14
|
as `@theme`, `@utility`, `@stillwind-slot`, or a `@layer` statement. The compiler
|
|
15
15
|
leaves out the whole import. See
|
|
16
|
-
[Reset only part of the page](
|
|
16
|
+
[Reset only part of the page](https://stillwind.dev/docs/concepts/stylesheets#reset-only-part-of-the-page).
|
|
17
17
|
|
|
18
18
|
## Reported
|
|
19
19
|
|
|
@@ -48,4 +48,4 @@ leaves out the whole import. See
|
|
|
48
48
|
| `strict` | deny |
|
|
49
49
|
| `stylistic` | off |
|
|
50
50
|
|
|
51
|
-
[Configure lint](
|
|
51
|
+
[Configure lint](https://stillwind.dev/docs/configuration#lint) to change the severity or options.
|