@tenphi/eslint-plugin-tasty 1.12.0 → 1.12.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
@@ -104,7 +104,8 @@ When a rule's advice is "change the component you are extending", it stays quiet
104
104
  over a base imported from someone else's package. Components declared in the same
105
105
  file and relative, absolute, `~`, `#` or `@/` imports count as yours already —
106
106
  list a scope here only for a design system you publish from your own monorepo
107
- (`*` matches any run of characters).
107
+ (`*` matches any run of characters). An entry also covers its package's subpaths,
108
+ so `@my-org/ui` owns `@my-org/ui/button`.
108
109
 
109
110
  A design system can also list the components consumers should customize through
110
111
  their props instead of restyling, in `protectedComponents`; consumers inherit the
@@ -445,6 +446,15 @@ rule suppression. Native HTML/SVG attributes and React's singular `style` prop
445
446
  are excluded. Bindings, calls, spreads, and interpolated templates are not evaluated.
446
447
  By default, these checks do not require TypeScript type services.
447
448
 
449
+ A component imported from another package is skipped: a bare specifier that is
450
+ not listed in `importSources` or `ownedSources`, where an entry also covers the
451
+ paths below it (`@my/ds` covers `@my/ds/button`). Its props are its own, so
452
+ `<FocusScope contain />` from `react-aria` is not read as a style. Components
453
+ declared in the file, `tasty()` wrappers, and relative or in-repo imports (`./`,
454
+ `~/`, `#`, `@/`) are still checked, since they may be Tasty components. With
455
+ `typeAwareJSX` on, prop types decide, and the package rule applies only where
456
+ they cannot (`any`, unresolved types).
457
+
448
458
  ### Experimental type-aware JSX props
449
459
 
450
460
  Opt into type analysis to distinguish semantic component props from style props.
@@ -471,7 +481,7 @@ The resolver uses JSX's contextual prop type and follows property declarations:
471
481
  - Props inherited or picked from Tasty's `Styles` remain validated, including
472
482
  indexed aliases such as `Styles['gap']` and explicit `StyleValue` types.
473
483
  - Declared component props such as `position: 'before' | 'after'` or
474
- `prefix: ReactNode` are excluded from JSX value checks.
484
+ `marker: ReactNode` are excluded from JSX value checks.
475
485
  - Missing components, unresolved types, `any`, generics, index signatures,
476
486
  excluded files, and broad primitive types retain the existing name heuristic.
477
487
  If a union combines a style declaration and a semantic declaration, the style
package/dist/constants.js CHANGED
@@ -216,17 +216,18 @@ const RENAMED_SPECIAL_STYLE_KEYS = {
216
216
  * positive from `known-property` on valid CSS — which is why the list is derived
217
217
  * from data instead of maintained by hand.
218
218
  *
219
- * The dataset also carries at-rule descriptors (`src`, `syntax`, `symbols`, `size`),
220
- * which are kept, as stylelint keeps them. They are only reachable as top-level
221
- * style keys, where the cost is a declaration browsers drop rather than a report —
222
- * and separating them would mean hand-maintaining the exclusion list this change
223
- * exists to delete. Inside an at-rule block nothing validates them: `known-property`
224
- * exempts every `@`-prefixed key and does not descend.
219
+ * The dataset also carries at-rule descriptors (`src`, `prefix`, `syntax`,
220
+ * `symbols`), which stylelint keeps. They are left out here: a style rule cannot
221
+ * declare them, so as style keys they render declarations browsers drop, and as
222
+ * JSX props (`<NumberInput prefix="$" />`) they would be read as style values.
223
+ * `@webref/css` says which names are descriptors only; one that is also a
224
+ * property (`fontWeight`, `speakAs`, `size`) stays. Inside an at-rule block
225
+ * nothing validates them: `known-property` exempts every `@`-prefixed key and
226
+ * does not descend.
225
227
  */
226
228
  const DATASET_CSS_PROPERTIES = [
227
229
  "accelerator",
228
230
  "accentColor",
229
- "additiveSymbols",
230
231
  "alignContent",
231
232
  "alignItems",
232
233
  "alignSelf",
@@ -260,7 +261,6 @@ const DATASET_CSS_PROPERTIES = [
260
261
  "animationTriggerTimeline",
261
262
  "appRegion",
262
263
  "appearance",
263
- "ascentOverride",
264
264
  "aspectRatio",
265
265
  "audioLevel",
266
266
  "azimuth",
@@ -280,7 +280,6 @@ const DATASET_CSS_PROPERTIES = [
280
280
  "backgroundRepeatX",
281
281
  "backgroundRepeatY",
282
282
  "backgroundSize",
283
- "basePalette",
284
283
  "baselineShift",
285
284
  "baselineSource",
286
285
  "behavior",
@@ -419,7 +418,6 @@ const DATASET_CSS_PROPERTIES = [
419
418
  "cx",
420
419
  "cy",
421
420
  "d",
422
- "descentOverride",
423
421
  "direction",
424
422
  "display",
425
423
  "displayAlign",
@@ -438,7 +436,6 @@ const DATASET_CSS_PROPERTIES = [
438
436
  "epubTextTransform",
439
437
  "epubWordBreak",
440
438
  "epubWritingMode",
441
- "fallback",
442
439
  "fieldSizing",
443
440
  "fill",
444
441
  "fillBreak",
@@ -468,7 +465,6 @@ const DATASET_CSS_PROPERTIES = [
468
465
  "flowFrom",
469
466
  "flowInto",
470
467
  "font",
471
- "fontDisplay",
472
468
  "fontFamily",
473
469
  "fontFeatureSettings",
474
470
  "fontKerning",
@@ -531,11 +527,9 @@ const DATASET_CSS_PROPERTIES = [
531
527
  "imageRendering",
532
528
  "imageResolution",
533
529
  "imeMode",
534
- "inherits",
535
530
  "initialLetter",
536
531
  "initialLetterAlign",
537
532
  "initialLetterWrap",
538
- "initialValue",
539
533
  "inlineSize",
540
534
  "inlineSizing",
541
535
  "inputFormat",
@@ -574,7 +568,6 @@ const DATASET_CSS_PROPERTIES = [
574
568
  "lineBreak",
575
569
  "lineClamp",
576
570
  "lineFitEdge",
577
- "lineGapOverride",
578
571
  "lineGrid",
579
572
  "lineHeight",
580
573
  "lineHeightStep",
@@ -608,7 +601,6 @@ const DATASET_CSS_PROPERTIES = [
608
601
  "markerSegment",
609
602
  "markerSide",
610
603
  "markerStart",
611
- "marks",
612
604
  "mask",
613
605
  "maskBorder",
614
606
  "maskBorderMode",
@@ -654,8 +646,6 @@ const DATASET_CSS_PROPERTIES = [
654
646
  "navLeft",
655
647
  "navRight",
656
648
  "navUp",
657
- "navigation",
658
- "negative",
659
649
  "objectFit",
660
650
  "objectPosition",
661
651
  "objectViewBox",
@@ -672,7 +662,6 @@ const DATASET_CSS_PROPERTIES = [
672
662
  "offsetRotation",
673
663
  "opacity",
674
664
  "order",
675
- "orientation",
676
665
  "orphans",
677
666
  "outline",
678
667
  "outlineColor",
@@ -698,13 +687,11 @@ const DATASET_CSS_PROPERTIES = [
698
687
  "overflowX",
699
688
  "overflowY",
700
689
  "overlay",
701
- "overrideColors",
702
690
  "overscrollBehavior",
703
691
  "overscrollBehaviorBlock",
704
692
  "overscrollBehaviorInline",
705
693
  "overscrollBehaviorX",
706
694
  "overscrollBehaviorY",
707
- "pad",
708
695
  "padding",
709
696
  "paddingBlock",
710
697
  "paddingBlockEnd",
@@ -720,7 +707,6 @@ const DATASET_CSS_PROPERTIES = [
720
707
  "pageBreakAfter",
721
708
  "pageBreakBefore",
722
709
  "pageBreakInside",
723
- "pageOrientation",
724
710
  "paintOrder",
725
711
  "pause",
726
712
  "pauseAfter",
@@ -745,12 +731,10 @@ const DATASET_CSS_PROPERTIES = [
745
731
  "positionTryOptions",
746
732
  "positionTryOrder",
747
733
  "positionVisibility",
748
- "prefix",
749
734
  "printColorAdjust",
750
735
  "propertyName",
751
736
  "quotes",
752
737
  "r",
753
- "range",
754
738
  "readingFlow",
755
739
  "readingOrder",
756
740
  "regionFragment",
@@ -846,7 +830,6 @@ const DATASET_CSS_PROPERTIES = [
846
830
  "shapeOutside",
847
831
  "shapeRendering",
848
832
  "size",
849
- "sizeAdjust",
850
833
  "sliderOrientation",
851
834
  "snapHeight",
852
835
  "solidColor",
@@ -860,7 +843,6 @@ const DATASET_CSS_PROPERTIES = [
860
843
  "speakNumeral",
861
844
  "speakPunctuation",
862
845
  "speechRate",
863
- "src",
864
846
  "stopColor",
865
847
  "stopOpacity",
866
848
  "stress",
@@ -886,11 +868,7 @@ const DATASET_CSS_PROPERTIES = [
886
868
  "strokeRepeat",
887
869
  "strokeSize",
888
870
  "strokeWidth",
889
- "suffix",
890
871
  "supportedColorSchemes",
891
- "symbols",
892
- "syntax",
893
- "system",
894
872
  "tabSize",
895
873
  "tableLayout",
896
874
  "textAlign",
@@ -976,11 +954,9 @@ const DATASET_CSS_PROPERTIES = [
976
954
  "transitionProperty",
977
955
  "transitionTimingFunction",
978
956
  "translate",
979
- "types",
980
957
  "ucAltSkin",
981
958
  "ucSkin",
982
959
  "unicodeBidi",
983
- "unicodeRange",
984
960
  "userSelect",
985
961
  "userZoom",
986
962
  "vectorEffect",