oxlint-tailwindcss 1.2.0 → 1.3.1

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/README.md CHANGED
@@ -29,7 +29,8 @@ Read the story behind this plugin:
29
29
  - **Lightweight** — Only 2 runtime dependencies: `@tailwindcss/node` and `tailwindcss`.
30
30
  - **23 rules** — Correctness, style, complexity, and restriction rules with autofixes where
31
31
  possible.
32
- - **Variable detection** — Lints variables named `className`, `classes`, `style` automatically.
32
+ - **Variable detection** — Lints variables matching `/^classNames?$/`, `/^classes$/`, `/^styles?$/`
33
+ (e.g. `className`, `classNames`, `classes`, `styles`) automatically.
33
34
  - **Customizable** — Extend class detection with custom attributes, callees, tags, and variable
34
35
  patterns.
35
36
  - **Component class support** — Recognizes `@layer components { .btn {} }` in your CSS.
@@ -419,6 +420,14 @@ Deprecated class mappings:
419
420
  | `overflow-ellipsis` | `text-ellipsis` |
420
421
  | `decoration-slice` | `box-decoration-slice` |
421
422
  | `decoration-clone` | `box-decoration-clone` |
423
+ | `bg-gradient-to-t` | `bg-linear-to-t` |
424
+ | `bg-gradient-to-tr` | `bg-linear-to-tr` |
425
+ | `bg-gradient-to-r` | `bg-linear-to-r` |
426
+ | `bg-gradient-to-br` | `bg-linear-to-br` |
427
+ | `bg-gradient-to-b` | `bg-linear-to-b` |
428
+ | `bg-gradient-to-bl` | `bg-linear-to-bl` |
429
+ | `bg-gradient-to-l` | `bg-linear-to-l` |
430
+ | `bg-gradient-to-tl` | `bg-linear-to-tl` |
422
431
 
423
432
  **Autofix:** Replaces with the modern equivalent.
424
433
 
@@ -590,6 +599,13 @@ Converts physical properties to logical ones for LTR/RTL support.
590
599
  Also converts `border-l/r`, `rounded-l/r/tl/tr/bl/br`, and `scroll-ml/mr/pl/pr` to their logical
591
600
  equivalents.
592
601
 
602
+ **Options:**
603
+
604
+ | Option | Type | Default | Description |
605
+ | ----------- | ----------------------------------- | -------- | --------------------------------------------- |
606
+ | `direction` | `"inline"` \| `"block"` \| `"both"` | `"both"` | Restrict conversion to one axis |
607
+ | `allowlist` | `string[]` | `[]` | Regex patterns for classes to leave untouched |
608
+
593
609
  **Autofix:** Replaces with logical equivalent.
594
610
 
595
611
  ---
@@ -609,6 +625,13 @@ in LTR-only projects.
609
625
  "end-0" → "right-0"
610
626
  ```
611
627
 
628
+ **Options:**
629
+
630
+ | Option | Type | Default | Description |
631
+ | ----------- | ----------------------------------- | -------- | --------------------------------------------- |
632
+ | `direction` | `"inline"` \| `"block"` \| `"both"` | `"both"` | Restrict conversion to one axis |
633
+ | `allowlist` | `string[]` | `[]` | Regex patterns for classes to leave untouched |
634
+
612
635
  **Autofix:** Replaces with physical equivalent.
613
636
 
614
637
  ---
@@ -907,10 +930,10 @@ The class parser correctly handles:
907
930
 
908
931
  - **`enforce-canonical`**: Named classes are canonicalized via the precomputed map (covers
909
932
  everything in `getClassList()` plus a curated list of legacy v3 spellings like `break-words`,
910
- `flex-grow`, `start-N`, `bg-gradient-to-*`). Arbitrary/CSS-var forms (`p-[2px]`, `bg-(--c)`) are
911
- canonicalized dynamically via the worker. Some valid v4 classes that don't appear in
912
- `getClassList()` and have no canonical rewrite (e.g. `border-1` is valid as a dynamic numeric
913
- value but isn't enumerated) are left untouched.
933
+ `flex-grow`, `start-N`, `bg-gradient-to-*`, `bg-left-top` → `bg-top-left`). Arbitrary/CSS-var
934
+ forms (`p-[2px]`, `bg-(--c)`) are canonicalized dynamically via the worker. Some valid v4 classes
935
+ that don't appear in `getClassList()` and have no canonical rewrite (e.g. `border-1` is valid as a
936
+ dynamic numeric value but isn't enumerated) are left untouched.
914
937
  - **`no-conflicting-classes`**: Uses exact CSS property name matching plus composition heuristics:
915
938
  CSS-var composition (`shadow` + `ring`), narrowing-override (later class is a strict subset of
916
939
  earlier — handles `size-4 h-6`, `rounded-t-lg rounded-tl-sm`, `truncate text-clip`), complementary