@esportsplus/ui 0.59.0 → 0.61.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/.audit/audit.json +2810 -0
- package/.audit/check-scss.mjs +20 -0
- package/.audit/rules-audit.md +542 -0
- package/README.md +42 -31
- package/RULES.md +115 -0
- package/build/components/accordion/index.d.ts +12 -2175
- package/build/components/accordion/index.js +3 -4
- package/build/components/accordion/scss/index.scss +1 -1
- package/build/components/announcement/scss/index.scss +1 -1
- package/build/components/breadcrumb/index.js +47 -64
- package/build/components/breadcrumb/scss/index.scss +1 -1
- package/build/components/button/copy.d.ts +6 -4
- package/build/components/button/copy.js +24 -20
- package/build/components/button/faces.d.ts +0 -1
- package/build/components/button/faces.js +5 -6
- package/build/components/button/index.d.ts +3 -7
- package/build/components/button/index.js +3 -5
- package/build/components/button/kbd.d.ts +12 -8
- package/build/components/button/kbd.js +59 -74
- package/build/components/button/morph/index.d.ts +2169 -0
- package/build/components/button/morph/index.js +4 -0
- package/build/components/button/morph/save.d.ts +19 -0
- package/build/components/button/morph/save.js +57 -0
- package/build/components/button/morph/template.d.ts +22 -0
- package/build/components/button/morph/template.js +90 -0
- package/build/components/button/scss/index.scss +1 -1
- package/build/components/button/sidebar.js +2 -2
- package/build/components/button/split.d.ts +1 -1
- package/build/components/button/split.js +11 -15
- package/build/components/capslock/index.js +6 -5
- package/build/components/capslock/scss/index.scss +1 -1
- package/build/components/card/scss/index.scss +1 -1
- package/build/components/cc/index.js +103 -111
- package/build/components/cc/scss/index.scss +1 -1
- package/build/components/chat/index.d.ts +6 -0
- package/build/components/chat/index.js +3 -0
- package/build/components/chat/minimap/index.d.ts +52 -0
- package/build/components/chat/minimap/index.js +248 -0
- package/build/components/{chat-minimap/range.js → chat/minimap/model.js} +1 -1
- package/build/components/{chat-minimap → chat/minimap}/spy.d.ts +1 -1
- package/build/components/{chat-minimap → chat/minimap}/spy.js +1 -1
- package/build/components/checkbox/index.d.ts +1 -0
- package/build/components/checkbox/index.js +1 -0
- package/build/components/checkbox/options.d.ts +0 -1
- package/build/components/checkbox/options.js +0 -1
- package/build/components/checkbox/scss/index.scss +1 -1
- package/build/components/clipboard/index.d.ts +3 -2181
- package/build/components/clipboard/index.js +2 -3
- package/build/components/color-picker/index.d.ts +21 -0
- package/build/components/color-picker/index.js +153 -138
- package/build/components/color-picker/scss/index.scss +1 -1
- package/build/components/command/index.d.ts +6 -93
- package/build/components/command/index.js +4 -601
- package/build/components/command/palette.d.ts +103 -0
- package/build/components/command/palette.js +595 -0
- package/build/components/command/scss/index.scss +1 -1
- package/build/components/command/search.d.ts +37 -0
- package/build/components/command/search.js +67 -0
- package/build/components/counter/index.d.ts +15 -4
- package/build/components/counter/index.js +3 -2
- package/build/components/counter/scss/index.scss +1 -1
- package/build/components/datalist/scss/index.scss +1 -1
- package/build/components/dock/index.d.ts +24 -5
- package/build/components/dock/index.js +389 -51
- package/build/components/dock/scss/index.scss +1 -1
- package/build/components/editor/markdown/index.d.ts +3 -22
- package/build/components/editor/markdown/index.js +3 -30
- package/build/components/editor/markdown/render.js +3 -5
- package/build/components/editor/markdown/template.d.ts +22 -0
- package/build/components/editor/markdown/template.js +30 -0
- package/build/components/editor/tree/find.js +3 -3
- package/build/components/editor/tree/index.d.ts +3 -116
- package/build/components/editor/tree/index.js +3 -2225
- package/build/components/editor/tree/template.d.ts +116 -0
- package/build/components/editor/tree/template.js +2225 -0
- package/build/components/editor/viewer/index.d.ts +3 -26
- package/build/components/editor/viewer/index.js +3 -249
- package/build/components/editor/viewer/template.d.ts +26 -0
- package/build/components/editor/viewer/template.js +249 -0
- package/build/components/editor/workspace/index.d.ts +4 -65
- package/build/components/editor/workspace/index.js +4 -1228
- package/build/components/editor/workspace/model.d.ts +29 -37
- package/build/components/editor/workspace/model.js +186 -155
- package/build/components/editor/workspace/session.d.ts +3 -0
- package/build/components/editor/workspace/session.js +61 -34
- package/build/components/editor/workspace/shortcuts.d.ts +0 -2
- package/build/components/editor/workspace/shortcuts.js +0 -2
- package/build/components/editor/workspace/status.d.ts +4 -5
- package/build/components/editor/workspace/status.js +79 -61
- package/build/components/editor/workspace/statusbar.d.ts +5 -3
- package/build/components/editor/workspace/statusbar.js +66 -80
- package/build/components/editor/workspace/strip.d.ts +1 -2
- package/build/components/editor/workspace/strip.js +4 -3
- package/build/components/editor/workspace/tabs.d.ts +35 -3
- package/build/components/editor/workspace/tabs.js +75 -13
- package/build/components/editor/workspace/template.d.ts +65 -0
- package/build/components/editor/workspace/template.js +1145 -0
- package/build/components/error/scss/index.scss +1 -1
- package/build/components/filter/index.js +0 -3
- package/build/components/filter/scss/index.scss +1 -1
- package/build/components/form/index.d.ts +6 -32
- package/build/components/form/index.js +2 -1
- package/build/components/frame/scss/index.scss +1 -1
- package/build/components/grid/scss/index.scss +1 -1
- package/build/components/group/index.d.ts +12 -0
- package/build/components/group/index.js +15 -0
- package/build/components/group/scss/index.scss +2 -0
- package/build/components/heatmap/index.js +10 -32
- package/build/components/heatmap/scss/index.scss +1 -1
- package/build/components/highlight/index.d.ts +2 -3
- package/build/components/highlight/index.js +79 -78
- package/build/components/highlight/scss/index.scss +1 -1
- package/build/components/icon/index.d.ts +4 -3
- package/build/components/icon/index.js +2 -1
- package/build/components/icon/scss/index.scss +1 -1
- package/build/components/image/index.d.ts +3 -16
- package/build/components/image/index.js +2 -2
- package/build/components/image/scss/index.scss +1 -1
- package/build/components/index.d.ts +6 -4
- package/build/components/index.js +6 -4
- package/build/components/inline-edit/index.js +5 -4
- package/build/components/inline-edit/rich.js +79 -82
- package/build/components/inline-edit/scss/index.scss +1 -1
- package/build/components/inline-edit/status.js +4 -3
- package/build/components/input/scss/index.scss +1 -1
- package/build/components/input/tag.js +84 -67
- package/build/components/json/index.d.ts +4 -3
- package/build/components/json/index.js +2 -1
- package/build/components/link/scss/index.scss +1 -1
- package/build/components/loading/scss/index.scss +1 -1
- package/build/components/marquee/index.js +74 -71
- package/build/components/marquee/scss/index.scss +1 -1
- package/build/components/metric/flash.js +12 -11
- package/build/components/metric/scss/index.scss +1 -1
- package/build/components/nav/index.d.ts +1 -1
- package/build/components/nav/scss/index.scss +1 -1
- package/build/components/nav/toc.d.ts +8 -13
- package/build/components/nav/toc.js +9 -21
- package/build/components/nav/tree.d.ts +13 -14
- package/build/components/nav/tree.js +32 -19
- package/build/components/notification/index.d.ts +14 -3
- package/build/components/notification/index.js +4 -3
- package/build/components/notification/scss/index.scss +1 -1
- package/build/components/overlay/scss/index.scss +1 -1
- package/build/components/page/scss/index.scss +1 -1
- package/build/components/pagination/cards.d.ts +1 -0
- package/build/components/pagination/cards.js +4 -6
- package/build/components/pagination/scss/index.scss +1 -1
- package/build/components/panels/dnd.d.ts +47 -0
- package/build/components/panels/dnd.js +106 -0
- package/build/components/panels/group.d.ts +35 -0
- package/build/components/panels/group.js +319 -0
- package/build/components/panels/index.d.ts +25 -0
- package/build/components/panels/index.js +520 -0
- package/build/components/panels/model.d.ts +64 -0
- package/build/components/panels/model.js +446 -0
- package/build/components/panels/resize.d.ts +9 -0
- package/build/components/panels/resize.js +87 -0
- package/build/components/panels/scss/index.scss +2 -0
- package/build/components/panels/subtree.d.ts +3 -0
- package/build/components/panels/subtree.js +43 -0
- package/build/components/preview/buttons.d.ts +20 -0
- package/build/components/preview/buttons.js +26 -0
- package/build/components/{copy/index.d.ts → preview/code.d.ts} +3 -9
- package/build/components/preview/code.js +18 -0
- package/build/components/preview/header.d.ts +16 -0
- package/build/components/preview/header.js +18 -0
- package/build/components/preview/index.d.ts +8704 -0
- package/build/components/preview/index.js +123 -0
- package/build/components/preview/scss/index.scss +2 -0
- package/build/components/preview/source.d.ts +21 -0
- package/build/components/preview/source.js +76 -0
- package/build/components/preview/stage.d.ts +16 -0
- package/build/components/preview/stage.js +24 -0
- package/build/components/progress/scss/index.scss +1 -1
- package/build/components/progress/text.js +9 -11
- package/build/components/radio/index.d.ts +3 -2
- package/build/components/radio/index.js +2 -2
- package/build/components/range/filter.js +8 -9
- package/build/components/range/scss/index.scss +1 -1
- package/build/components/relative-time/index.js +4 -7
- package/build/components/relative-time/scss/index.scss +1 -1
- package/build/components/root/scss/index.scss +1 -1
- package/build/components/select/index.d.ts +1 -1
- package/build/components/select/index.js +72 -59
- package/build/components/select/scss/index.scss +1 -1
- package/build/components/shell/index.d.ts +22 -0
- package/build/components/shell/index.js +272 -0
- package/build/components/shell/scss/index.scss +2 -0
- package/build/components/shortcut-recorder/index.d.ts +2 -3
- package/build/components/shortcut-recorder/index.js +3 -1
- package/build/components/shortcut-recorder/scss/index.scss +1 -1
- package/build/components/sortable/scss/index.scss +1 -1
- package/build/components/sticky-header/scss/index.scss +1 -1
- package/build/components/story/index.d.ts +10 -6
- package/build/components/story/index.js +27 -47
- package/build/components/story/scss/index.scss +1 -1
- package/build/components/surface-field/index.js +13 -16
- package/build/components/surface-field/scss/index.scss +1 -1
- package/build/components/switch/index.d.ts +3 -2
- package/build/components/switch/index.js +2 -2
- package/build/components/tasklist/index.js +3 -1
- package/build/components/tasklist/scss/index.scss +1 -1
- package/build/components/textarea/scss/index.scss +1 -1
- package/build/components/theme/index.d.ts +6 -2
- package/build/components/theme/index.js +4 -3
- package/build/components/theme/scss/index.scss +1 -1
- package/build/components/theme-picker/cards.d.ts +13 -0
- package/build/components/theme-picker/cards.js +17 -0
- package/build/components/theme-picker/index.d.ts +9 -49
- package/build/components/theme-picker/index.js +5 -165
- package/build/components/theme-picker/scss/index.scss +1 -1
- package/build/components/theme-picker/shared.d.ts +26 -0
- package/build/components/theme-picker/shared.js +24 -0
- package/build/components/theme-picker/swatches.d.ts +13 -0
- package/build/components/theme-picker/swatches.js +17 -0
- package/build/components/theme-picker/toggle.d.ts +19 -0
- package/build/components/theme-picker/toggle.js +109 -0
- package/build/components/toast/index.js +10 -10
- package/build/components/toast/scss/index.scss +1 -1
- package/build/components/tooltip/menu.d.ts +2 -0
- package/build/components/tooltip/menu.js +88 -45
- package/build/components/tooltip/scss/index.scss +1 -1
- package/build/components/tooltip/shared.js +2 -2
- package/build/components/typewriter/rotate.js +7 -16
- package/build/components/typewriter/scss/index.scss +1 -1
- package/build/components/uptime/index.js +26 -33
- package/build/components/uptime/scss/index.scss +1 -1
- package/build/components/usage-meter/scss/index.scss +1 -1
- package/build/modifiers/background/scss/index.scss +2 -0
- package/build/modifiers/border/scss/index.scss +2 -0
- package/build/modifiers/box-shadow/scss/index.scss +2 -0
- package/build/modifiers/color/scss/index.scss +2 -0
- package/build/modifiers/scrollbar/scss/index.scss +1 -1
- package/build/shared/animation.js +1 -1
- package/build/shared/drag.d.ts +2 -1
- package/build/shared/drag.js +4 -3
- package/package.json +8 -8
- package/scripts/code-editor-services.test.mjs +1 -1
- package/scripts/code-editor-workspace.test.mjs +28 -18
- package/scripts/panels.test.mjs +262 -0
- package/scripts/workspace-keybindings.test.mjs +1 -1
- package/scripts/workspace-session.test.mjs +8 -6
- package/scripts/workspace-status.test.mjs +9 -1
- package/scripts/workspace-tabs.test.mjs +5 -5
- package/src/components/accordion/index.ts +11 -8
- package/src/components/accordion/scss/index.scss +15 -15
- package/src/components/accordion/scss/variables.scss +11 -7
- package/src/components/announcement/scss/index.scss +21 -24
- package/src/components/announcement/scss/variables.scss +13 -7
- package/src/components/breadcrumb/index.ts +8 -10
- package/src/components/breadcrumb/scss/index.scss +48 -122
- package/src/components/breadcrumb/scss/variables.scss +73 -55
- package/src/components/button/copy.ts +34 -27
- package/src/components/button/faces.ts +2 -4
- package/src/components/button/index.ts +3 -7
- package/src/components/button/kbd.ts +37 -95
- package/src/components/button/morph/index.ts +6 -0
- package/src/components/button/morph/save.ts +55 -0
- package/src/components/button/morph/template.ts +135 -0
- package/src/components/button/scss/index.scss +218 -99
- package/src/components/button/scss/variables.scss +160 -115
- package/src/components/button/sidebar.ts +6 -6
- package/src/components/button/split.ts +5 -6
- package/src/components/capslock/index.ts +9 -8
- package/src/components/capslock/scss/index.scss +21 -25
- package/src/components/capslock/scss/variables.scss +31 -12
- package/src/components/card/scss/index.scss +9 -24
- package/src/components/card/scss/variables.scss +29 -76
- package/src/components/cc/index.ts +15 -10
- package/src/components/cc/scss/index.scss +110 -153
- package/src/components/cc/scss/variables.scss +231 -44
- package/src/components/chat/index.ts +10 -0
- package/src/components/{chat-minimap → chat/minimap}/index.ts +66 -21
- package/src/components/{chat-minimap → chat/minimap}/scss/index.scss +26 -54
- package/src/components/chat/minimap/scss/variables.scss +178 -0
- package/src/components/{chat-minimap → chat/minimap}/spy.ts +1 -1
- package/src/components/checkbox/index.ts +1 -0
- package/src/components/checkbox/options.ts +0 -1
- package/src/components/checkbox/scss/index.scss +25 -31
- package/src/components/checkbox/scss/variables.scss +50 -19
- package/src/components/clipboard/index.ts +4 -3
- package/src/components/color-picker/index.ts +131 -67
- package/src/components/color-picker/scss/index.scss +138 -221
- package/src/components/color-picker/scss/variables.scss +228 -81
- package/src/components/command/index.ts +5 -860
- package/src/components/command/palette.ts +879 -0
- package/src/components/command/scss/index.scss +82 -99
- package/src/components/command/scss/variables.scss +129 -50
- package/src/components/command/search.ts +67 -0
- package/src/components/counter/index.ts +90 -85
- package/src/components/counter/scss/index.scss +32 -41
- package/src/components/counter/scss/variables.scss +44 -16
- package/src/components/datalist/scss/index.scss +25 -25
- package/src/components/datalist/scss/variables.scss +21 -11
- package/src/components/dock/index.ts +505 -42
- package/src/components/dock/scss/index.scss +318 -73
- package/src/components/dock/scss/variables.scss +310 -39
- package/src/components/editor/code/features.ts +0 -1
- package/src/components/editor/code/find.ts +0 -1
- package/src/components/editor/code/keymap.ts +0 -1
- package/src/components/editor/code/scss/_editor.scss +12 -31
- package/src/components/editor/code/scss/_features.scss +12 -45
- package/src/components/editor/code/scss/_services.scss +15 -23
- package/src/components/editor/code/scss/index.scss +1 -1
- package/src/components/editor/code/scss/variables.scss +195 -42
- package/src/components/editor/code/view.ts +0 -1
- package/src/components/editor/diffs/scss/_diffs.scss +24 -77
- package/src/components/editor/diffs/scss/_merge.scss +5 -16
- package/src/components/editor/diffs/scss/index.scss +1 -1
- package/src/components/editor/diffs/scss/variables.scss +148 -11
- package/src/components/editor/markdown/index.ts +3 -67
- package/src/components/editor/markdown/render.ts +3 -6
- package/src/components/editor/markdown/scss/index.scss +30 -48
- package/src/components/editor/markdown/scss/variables.scss +117 -32
- package/src/components/editor/markdown/template.ts +69 -0
- package/src/components/editor/tree/drag.ts +5 -2
- package/src/components/editor/tree/find.ts +5 -4
- package/src/components/editor/tree/index.ts +3 -3434
- package/src/components/editor/tree/scss/index.scss +204 -262
- package/src/components/editor/tree/scss/variables.scss +198 -31
- package/src/components/editor/tree/template.ts +3436 -0
- package/src/components/editor/viewer/index.ts +3 -318
- package/src/components/editor/viewer/scss/_viewer.scss +15 -31
- package/src/components/editor/viewer/scss/index.scss +1 -1
- package/src/components/editor/viewer/scss/variables.scss +56 -14
- package/src/components/editor/viewer/template.ts +321 -0
- package/src/components/editor/workspace/index.ts +4 -1480
- package/src/components/editor/workspace/model.ts +225 -185
- package/src/components/editor/workspace/scss/_keybindings.scss +163 -0
- package/src/components/editor/workspace/scss/{status.scss → _status.scss} +11 -44
- package/src/components/editor/workspace/scss/_tabs.scss +57 -0
- package/src/components/editor/workspace/scss/index.scss +82 -312
- package/src/components/editor/workspace/scss/variables.scss +427 -0
- package/src/components/editor/workspace/session.ts +80 -44
- package/src/components/editor/workspace/shortcuts.ts +0 -2
- package/src/components/editor/workspace/status.ts +110 -80
- package/src/components/editor/workspace/statusbar.ts +38 -35
- package/src/components/editor/workspace/strip.ts +6 -5
- package/src/components/editor/workspace/tabs.ts +115 -15
- package/src/components/editor/workspace/template.ts +1486 -0
- package/src/components/error/index.ts +3 -0
- package/src/components/error/scss/index.scss +34 -65
- package/src/components/error/scss/variables.scss +28 -9
- package/src/components/filter/index.ts +2 -6
- package/src/components/filter/scss/index.scss +9 -2
- package/src/components/filter/scss/variables.scss +6 -6
- package/src/components/form/index.ts +4 -1
- package/src/components/frame/scss/index.scss +31 -42
- package/src/components/frame/scss/variables.scss +25 -18
- package/src/components/grid/scss/index.scss +2 -1
- package/src/components/group/index.ts +24 -0
- package/src/components/group/scss/index.scss +6 -0
- package/src/components/group/scss/variables.scss +4 -0
- package/src/components/heatmap/index.ts +14 -44
- package/src/components/heatmap/scss/index.scss +38 -44
- package/src/components/heatmap/scss/variables.scss +100 -59
- package/src/components/highlight/index.ts +133 -119
- package/src/components/highlight/scss/index.scss +49 -43
- package/src/components/highlight/scss/variables.scss +71 -30
- package/src/components/icon/index.ts +7 -5
- package/src/components/icon/scss/index.scss +7 -2
- package/src/components/icon/scss/variables.scss +2 -0
- package/src/components/image/index.ts +4 -2
- package/src/components/image/scss/index.scss +14 -22
- package/src/components/image/scss/variables.scss +30 -15
- package/src/components/index.ts +6 -4
- package/src/components/inline-edit/index.ts +3 -2
- package/src/components/inline-edit/rich.ts +17 -15
- package/src/components/inline-edit/scss/index.scss +165 -254
- package/src/components/inline-edit/scss/variables.scss +311 -83
- package/src/components/inline-edit/status.ts +2 -1
- package/src/components/input/scrub.ts +1 -1
- package/src/components/input/scss/_field.scss +1 -1
- package/src/components/input/scss/_scrub.scss +14 -25
- package/src/components/input/scss/_tag.scss +26 -46
- package/src/components/input/scss/variables.scss +167 -77
- package/src/components/input/tag.ts +59 -49
- package/src/components/json/index.ts +4 -1
- package/src/components/link/scss/index.scss +1 -4
- package/src/components/link/scss/variables.scss +5 -1
- package/src/components/loading/scss/index.scss +3 -23
- package/src/components/loading/scss/variables.scss +3 -6
- package/src/components/marquee/index.ts +33 -28
- package/src/components/marquee/scss/index.scss +32 -26
- package/src/components/marquee/scss/variables.scss +35 -23
- package/src/components/metric/flash.ts +2 -1
- package/src/components/metric/scss/_flash.scss +125 -145
- package/src/components/metric/scss/index.scss +31 -43
- package/src/components/metric/scss/variables.scss +192 -98
- package/src/components/nav/index.ts +1 -1
- package/src/components/nav/scss/index.scss +46 -49
- package/src/components/nav/scss/variables.scss +61 -64
- package/src/components/nav/spy.ts +2 -0
- package/src/components/nav/toc.ts +11 -31
- package/src/components/nav/tree.ts +56 -24
- package/src/components/notification/index.ts +94 -89
- package/src/components/notification/scss/index.scss +77 -76
- package/src/components/notification/scss/variables.scss +55 -38
- package/src/components/overlay/index.ts +3 -1
- package/src/components/overlay/scss/index.scss +94 -114
- package/src/components/overlay/scss/variables.scss +46 -18
- package/src/components/page/scss/variables.scss +1 -1
- package/src/components/pagination/cards.ts +2 -1
- package/src/components/pagination/scss/index.scss +191 -7
- package/src/components/pagination/scss/variables.scss +112 -36
- package/src/components/panels/dnd.ts +184 -0
- package/src/components/panels/group.ts +437 -0
- package/src/components/panels/index.ts +678 -0
- package/src/components/panels/model.ts +675 -0
- package/src/components/panels/resize.ts +131 -0
- package/src/components/panels/scss/index.scss +394 -0
- package/src/components/panels/scss/variables.scss +197 -0
- package/src/components/panels/subtree.ts +65 -0
- package/src/components/preview/buttons.ts +48 -0
- package/src/components/preview/code.ts +28 -0
- package/src/components/preview/header.ts +23 -0
- package/src/components/preview/index.ts +144 -0
- package/src/components/preview/scss/index.scss +143 -0
- package/src/components/preview/scss/variables.scss +127 -0
- package/src/components/preview/source.ts +73 -0
- package/src/components/preview/stage.ts +33 -0
- package/src/components/progress/scss/index.scss +117 -15
- package/src/components/progress/scss/variables.scss +140 -40
- package/src/components/progress/text.ts +5 -4
- package/src/components/radio/index.ts +2 -4
- package/src/components/range/filter.ts +7 -11
- package/src/components/range/scss/_filter.scss +301 -327
- package/src/components/range/scss/_slider.scss +31 -110
- package/src/components/range/scss/_vertical.scss +8 -20
- package/src/components/range/scss/index.scss +1 -4
- package/src/components/range/scss/variables.scss +374 -70
- package/src/components/relative-time/index.ts +9 -14
- package/src/components/relative-time/scss/index.scss +13 -21
- package/src/components/relative-time/scss/variables.scss +46 -29
- package/src/components/root/scss/index.scss +11 -20
- package/src/components/root/scss/variables.scss +17 -15
- package/src/components/select/index.ts +37 -15
- package/src/components/select/scss/index.scss +24 -51
- package/src/components/select/scss/variables.scss +77 -19
- package/src/components/shell/index.ts +321 -0
- package/src/components/shell/scss/index.scss +214 -0
- package/src/components/shell/scss/variables.scss +89 -0
- package/src/components/shortcut-recorder/index.ts +6 -3
- package/src/components/shortcut-recorder/scss/index.scss +71 -56
- package/src/components/shortcut-recorder/scss/variables.scss +47 -21
- package/src/components/sortable/index.ts +1 -0
- package/src/components/sortable/scss/index.scss +37 -42
- package/src/components/sortable/scss/variables.scss +76 -52
- package/src/components/sticky-header/scss/index.scss +11 -10
- package/src/components/sticky-header/scss/variables.scss +36 -4
- package/src/components/story/index.ts +1 -36
- package/src/components/story/scss/index.scss +22 -98
- package/src/components/story/scss/variables.scss +57 -15
- package/src/components/surface-field/index.ts +18 -20
- package/src/components/surface-field/scss/index.scss +32 -46
- package/src/components/surface-field/scss/variables.scss +92 -23
- package/src/components/switch/index.ts +2 -4
- package/src/components/tasklist/index.ts +8 -2
- package/src/components/tasklist/scss/index.scss +7 -7
- package/src/components/tasklist/scss/variables.scss +18 -13
- package/src/components/textarea/index.ts +1 -0
- package/src/components/textarea/scss/index.scss +9 -7
- package/src/components/textarea/scss/variables.scss +2 -2
- package/src/components/theme/index.ts +12 -4
- package/src/components/theme/scss/index.scss +13 -0
- package/src/components/theme/scss/variables.scss +5 -16
- package/src/components/theme-picker/cards.ts +19 -0
- package/src/components/theme-picker/index.ts +6 -225
- package/src/components/theme-picker/scss/index.scss +77 -167
- package/src/components/theme-picker/scss/variables.scss +220 -0
- package/src/components/theme-picker/shared.ts +54 -0
- package/src/components/theme-picker/swatches.ts +15 -0
- package/src/components/theme-picker/toggle.ts +150 -0
- package/src/components/toast/index.ts +14 -14
- package/src/components/toast/scss/index.scss +130 -155
- package/src/components/toast/scss/variables.scss +89 -52
- package/src/components/tooltip/menu.ts +77 -10
- package/src/components/tooltip/scss/_menu.scss +96 -138
- package/src/components/tooltip/scss/_shared.scss +93 -90
- package/src/components/tooltip/scss/index.scss +52 -54
- package/src/components/tooltip/scss/variables.scss +187 -67
- package/src/components/tooltip/shared.ts +8 -6
- package/src/components/typewriter/rotate.ts +15 -24
- package/src/components/typewriter/scss/index.scss +131 -3
- package/src/components/typewriter/scss/variables.scss +56 -44
- package/src/components/uptime/index.ts +1 -13
- package/src/components/uptime/scss/index.scss +28 -66
- package/src/components/uptime/scss/variables.scss +63 -48
- package/src/components/usage-meter/scss/index.scss +19 -19
- package/src/components/usage-meter/scss/variables.scss +80 -35
- package/src/css-utilities/absolute.scss +54 -52
- package/src/css-utilities/background.scss +22 -24
- package/src/css-utilities/border.scss +21 -21
- package/src/css-utilities/box-shadow.scss +32 -21
- package/src/css-utilities/color.scss +23 -21
- package/src/css-utilities/flex.scss +55 -53
- package/src/css-utilities/group.scss +7 -0
- package/src/css-utilities/hidden.scss +22 -20
- package/src/css-utilities/icon.scss +32 -30
- package/src/css-utilities/layer.scss +10 -10
- package/src/css-utilities/reset.scss +27 -16
- package/src/css-utilities/surface.scss +206 -128
- package/src/css-utilities/text.scss +114 -114
- package/src/modifiers/background/scss/index.scss +1 -0
- package/src/modifiers/background/scss/variables.scss +24 -0
- package/src/modifiers/border/scss/index.scss +1 -0
- package/src/modifiers/border/scss/variables.scss +21 -0
- package/src/modifiers/box-shadow/scss/index.scss +1 -0
- package/src/modifiers/box-shadow/scss/variables.scss +12 -0
- package/src/modifiers/color/scss/index.scss +1 -0
- package/src/modifiers/color/scss/variables.scss +10 -0
- package/src/modifiers/scrollbar/scss/index.scss +3 -2
- package/src/modifiers/scrollbar/scss/variables.scss +4 -3
- package/src/shared/animation.ts +3 -3
- package/src/shared/drag.ts +8 -3
- package/src/tokens/scss/color.scss +53 -37
- package/src/tokens/scss/index.scss +0 -1
- package/src/tokens/scss/state.scss +16 -1
- package/storage/svg/code.svg +1 -1
- package/storage/svg/collapse.svg +1 -0
- package/storage/svg/grid.svg +1 -0
- package/storage/svg/stack.svg +1 -0
- package/build/components/banner/scss/index.scss +0 -2
- package/build/components/button/fan.d.ts +0 -24
- package/build/components/button/fan.js +0 -118
- package/build/components/button/hold.d.ts +0 -31
- package/build/components/button/hold.js +0 -115
- package/build/components/button/icons.d.ts +0 -6
- package/build/components/button/icons.js +0 -35
- package/build/components/button/loading.d.ts +0 -22
- package/build/components/button/loading.js +0 -60
- package/build/components/button/morph.d.ts +0 -22
- package/build/components/button/morph.js +0 -115
- package/build/components/card/expand.d.ts +0 -22
- package/build/components/card/expand.js +0 -118
- package/build/components/card/index.d.ts +0 -6
- package/build/components/card/index.js +0 -4
- package/build/components/chat-minimap/index.d.ts +0 -28
- package/build/components/chat-minimap/index.js +0 -223
- package/build/components/chat-minimap/scss/index.scss +0 -2
- package/build/components/clipboard/copy.d.ts +0 -27
- package/build/components/clipboard/copy.js +0 -48
- package/build/components/copy/index.js +0 -61
- package/build/components/copy/scss/index.scss +0 -2
- package/build/components/highlight/easing.d.ts +0 -2
- package/build/components/highlight/easing.js +0 -19
- package/build/components/pull-to-refresh/index.d.ts +0 -18
- package/build/components/pull-to-refresh/index.js +0 -222
- package/build/components/pull-to-refresh/scss/index.scss +0 -2
- package/src/components/banner/scss/index.scss +0 -37
- package/src/components/banner/scss/variables.scss +0 -16
- package/src/components/button/fan.ts +0 -170
- package/src/components/button/hold.ts +0 -154
- package/src/components/button/icons.ts +0 -21
- package/src/components/button/loading.ts +0 -77
- package/src/components/button/morph.ts +0 -153
- package/src/components/button/scss/_fan.scss +0 -121
- package/src/components/button/scss/_kbd.scss +0 -11
- package/src/components/button/scss/_morph.scss +0 -107
- package/src/components/button/scss/_sidebar.scss +0 -61
- package/src/components/button/scss/_split.scss +0 -53
- package/src/components/card/expand.ts +0 -141
- package/src/components/card/index.ts +0 -8
- package/src/components/card/scss/_expand.scss +0 -234
- package/src/components/chat-minimap/scss/variables.scss +0 -97
- package/src/components/clipboard/copy.ts +0 -49
- package/src/components/copy/index.ts +0 -69
- package/src/components/copy/scss/index.scss +0 -52
- package/src/components/copy/scss/variables.scss +0 -19
- package/src/components/editor/workspace/scss/keybindings.scss +0 -190
- package/src/components/editor/workspace/scss/tabs.scss +0 -56
- package/src/components/highlight/easing.ts +0 -33
- package/src/components/pagination/scss/_arrows.scss +0 -69
- package/src/components/pagination/scss/_cards.scss +0 -121
- package/src/components/pagination/scss/_dots.scss +0 -64
- package/src/components/progress/scss/_text.scss +0 -135
- package/src/components/pull-to-refresh/index.ts +0 -316
- package/src/components/pull-to-refresh/scss/index.scss +0 -128
- package/src/components/pull-to-refresh/scss/variables.scss +0 -38
- package/src/components/typewriter/scss/_caret.scss +0 -34
- package/src/components/typewriter/scss/_retype.scss +0 -68
- package/src/components/typewriter/scss/_rotate.scss +0 -29
- package/src/tokens/scss/transition.scss +0 -21
- /package/build/components/{chat-minimap/range.d.ts → chat/minimap/model.d.ts} +0 -0
- /package/src/components/{chat-minimap/range.ts → chat/minimap/model.ts} +0 -0
|
@@ -0,0 +1,2810 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"component": "error",
|
|
4
|
+
"file": "src/components/error/scss/index.scss",
|
|
5
|
+
"line": 32,
|
|
6
|
+
"rule": "index.scss vs variables.scss / Variables (timing pair)",
|
|
7
|
+
"issue": "Shake animation uses literal timing '320ms ease-out' (also line 36) instead of --shake-duration / --shake-timing-function variables defined in variables.scss.",
|
|
8
|
+
"severity": "medium"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"component": "error",
|
|
12
|
+
"file": "src/components/error/scss/variables.scss",
|
|
13
|
+
"line": 4,
|
|
14
|
+
"rule": "Variables (live on the consuming selector, no parent prefix)",
|
|
15
|
+
"issue": "--error-background, --error-font-size, --error-max-width, --error-padding-horizontal/-vertical, --error-spacer, --error-text are set on .error with a prefix and reach down into .error-message, where index.scss remaps them (index.scss lines 15-21). They should be unprefixed variables on &-message itself, which also avoids the inheritance problem the comment describes.",
|
|
16
|
+
"severity": "medium"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"component": "error",
|
|
20
|
+
"file": "src/components/error/scss/index.scss",
|
|
21
|
+
"line": 55,
|
|
22
|
+
"rule": "Keyframes naming",
|
|
23
|
+
"issue": "Keyframes 'error-shake-1' / 'error-shake-2' are used by .error--shake-1 / .error--shake-2 and should be named after the class ('error--shake-1', 'error--shake-2').",
|
|
24
|
+
"severity": "low"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"component": "error",
|
|
28
|
+
"file": "src/components/error/scss/index.scss",
|
|
29
|
+
"line": 27,
|
|
30
|
+
"rule": "Ordering (modifiers before elements) / SCSS nesting",
|
|
31
|
+
"issue": "Modifier rules (&.error--invalid, &.error--shake-1, &.error--shake-2) come after the elements &-live / &-message. They also repeat the block name ('&.error--invalid', '&.error--shake-N', and '&:is(.error--shake-1, .error--shake-2)' on line 47) instead of using &-- nesting.",
|
|
32
|
+
"severity": "low"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"component": "error",
|
|
36
|
+
"file": "src/components/error/scss/index.scss",
|
|
37
|
+
"line": 31,
|
|
38
|
+
"rule": "SCSS style (@each for symmetric variants)",
|
|
39
|
+
"issue": "The shake-1/shake-2 rules (lines 31-37) and their two identical keyframes (lines 55-89) are duplicated by hand instead of being generated with an @each loop.",
|
|
40
|
+
"severity": "low"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"component": "error",
|
|
44
|
+
"file": "src/components/error/scss/index.scss",
|
|
45
|
+
"line": 46,
|
|
46
|
+
"rule": "Ordering (block @media in group 2)",
|
|
47
|
+
"issue": "The block's own @media (prefers-reduced-motion) comes last in the block. It belongs before the modifiers and elements.",
|
|
48
|
+
"severity": "low"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"component": "error",
|
|
52
|
+
"file": "src/components/error/index.ts",
|
|
53
|
+
"line": 95,
|
|
54
|
+
"rule": "TypeScript (no direct DOM manipulation)",
|
|
55
|
+
"issue": "element.style.borderRadius is written imperatively. The read needs getComputedStyle, but the write could be a reactive style binding on the wrapper's attribute object. No comment explains why raw DOM is used.",
|
|
56
|
+
"severity": "low"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"component": "error",
|
|
60
|
+
"file": "src/components/error/index.ts",
|
|
61
|
+
"line": 124,
|
|
62
|
+
"rule": "TypeScript (raw DOM needs a why comment)",
|
|
63
|
+
"issue": "control?.setAttribute('aria-invalid', ...) writes directly to the slotted control's DOM without a comment explaining why template cannot handle it.",
|
|
64
|
+
"severity": "low"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"component": "filter",
|
|
68
|
+
"file": "src/components/filter/scss/variables.scss",
|
|
69
|
+
"line": 4,
|
|
70
|
+
"rule": "Variables (timing pair --{name}-duration / --{name}-timing-function)",
|
|
71
|
+
"issue": "Animation timings use --enter-easing, --leave-easing and --move-easing (lines 4, 7, 10) instead of --enter-timing-function, --leave-timing-function and --move-timing-function. The shared timing() helper reads '-easing', so it has the same problem.",
|
|
72
|
+
"severity": "medium"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"component": "filter",
|
|
76
|
+
"file": "src/components/filter/scss/index.scss",
|
|
77
|
+
"line": 4,
|
|
78
|
+
"rule": "Naming / SCSS nesting",
|
|
79
|
+
"issue": "'.filter-announcer' is written as a top-level selector that repeats the block name, instead of '.filter { &-announcer { ... } }'.",
|
|
80
|
+
"severity": "low"
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"component": "filter",
|
|
84
|
+
"file": "src/components/filter/index.ts",
|
|
85
|
+
"line": 374,
|
|
86
|
+
"rule": "TypeScript (no direct DOM manipulation / reactive attributes)",
|
|
87
|
+
"issue": "Item visibility is toggled with imperative element.style.display writes (lines 216, 239, 257, 374) rather than a reactive attribute or class binding in item() (e.g. hidden or class: () => ...). The FLIP lift styles need raw DOM, but the plain show/hide does not.",
|
|
88
|
+
"severity": "medium"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"component": "filter",
|
|
92
|
+
"file": "src/components/filter/index.ts",
|
|
93
|
+
"line": 395,
|
|
94
|
+
"rule": "TypeScript (no direct DOM manipulation)",
|
|
95
|
+
"issue": "list.style.position = 'relative' is set from JS in onconnect. A zero-specificity SCSS default ':where(.filter) { position: relative }' would do the same job, as highlight does.",
|
|
96
|
+
"severity": "low"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"component": "form",
|
|
100
|
+
"file": "src/components/form/index.ts",
|
|
101
|
+
"line": 6,
|
|
102
|
+
"rule": "Directory structure (index.ts barrel shape)",
|
|
103
|
+
"issue": "The barrel does 'export default { action, input };'. It should declare a typed object, 'const form: { action: typeof action, input: typeof input } = { action, input }; export default form;'.",
|
|
104
|
+
"severity": "medium"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"component": "frame",
|
|
108
|
+
"file": "src/components/frame/scss/index.scss",
|
|
109
|
+
"line": 74,
|
|
110
|
+
"rule": "Ordering (block @media in group 2)",
|
|
111
|
+
"issue": "The block's own @media (prefers-reduced-motion) sits after all the modifiers. It should come before the &-- modifiers.",
|
|
112
|
+
"severity": "low"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"component": "frame",
|
|
116
|
+
"file": "src/components/frame/scss/index.scss",
|
|
117
|
+
"line": 82,
|
|
118
|
+
"rule": "SCSS style (nesting) / Ordering (state selectors last in block)",
|
|
119
|
+
"issue": "'.frame:not(.frame--scroll, .frame--slide, .frame--swap):not(.--active)' is a separate top-level rule that repeats the block name. It should be nested in .frame as a state selector, e.g. '&:not(&--scroll, &--slide, &--swap):not(.--active)'. The same applies to the top-level ':is(.frame--scroll, .frame--slide, .frame--swap)' rule on line 89.",
|
|
120
|
+
"severity": "low"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"component": "frame",
|
|
124
|
+
"file": "src/components/frame/scss/index.scss",
|
|
125
|
+
"line": 69,
|
|
126
|
+
"rule": "SCSS style (nesting, don't repeat block name)",
|
|
127
|
+
"issue": "'&.frame--leaving' inside &--swap hard-codes the block name instead of building the modifier from the block via &/@at-root.",
|
|
128
|
+
"severity": "low"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"component": "grid",
|
|
132
|
+
"file": "src/components/grid/scss/index.scss",
|
|
133
|
+
"line": 9,
|
|
134
|
+
"rule": "Naming / SCSS nesting",
|
|
135
|
+
"issue": "'.grid-item' is written as a descendant selector that repeats the block name. It should be the element '&-item'.",
|
|
136
|
+
"severity": "low"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
"component": "heatmap",
|
|
140
|
+
"file": "src/components/heatmap/scss/index.scss",
|
|
141
|
+
"line": 36,
|
|
142
|
+
"rule": "index.scss vs variables.scss (no literal tunables)",
|
|
143
|
+
"issue": "The focus and hover rings use literal widths and offsets ('2px solid', 'outline-offset: 1px', '1px solid' on lines 36-37 and 42-43) instead of variables such as --focus-width, --focus-offset and --hover-width.",
|
|
144
|
+
"severity": "medium"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"component": "heatmap",
|
|
148
|
+
"file": "src/components/heatmap/scss/index.scss",
|
|
149
|
+
"line": 62,
|
|
150
|
+
"rule": "index.scss vs variables.scss (values from variables)",
|
|
151
|
+
"issue": "Spacing values are computed inline from tokens in the logic file: calc(var(--size-200) / 2) on line 62 and calc(var(--size-100) / 2) on lines 77, 80 and 84. They should be variables (gap and margin variables) defined in variables.scss.",
|
|
152
|
+
"severity": "low"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"component": "heatmap",
|
|
156
|
+
"file": "src/components/heatmap/scss/variables.scss",
|
|
157
|
+
"line": 41,
|
|
158
|
+
"rule": "Variables (live on the consuming selector, no parent prefix)",
|
|
159
|
+
"issue": "--cell-opacity and --cell-scale are set on &-grid / &-grid--shown with a 'cell-' prefix and consumed by .heatmap-cell. --cell-radius is likewise prefixed on the block. They should live on the consuming element (&-cell) as --opacity, --scale and --border-radius.",
|
|
160
|
+
"severity": "medium"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"component": "heatmap",
|
|
164
|
+
"file": "src/components/heatmap/scss/index.scss",
|
|
165
|
+
"line": 46,
|
|
166
|
+
"rule": "Ordering (modifiers before state selectors)",
|
|
167
|
+
"issue": "Inside &-cell, the &--level-N modifiers generated by @for come after the &:focus-visible and &:hover state rules. All modifiers (&--empty, &--level-*) should come before the state selectors.",
|
|
168
|
+
"severity": "low"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"component": "heatmap",
|
|
172
|
+
"file": "src/components/heatmap/scss/index.scss",
|
|
173
|
+
"line": 124,
|
|
174
|
+
"rule": "Ordering (block @media in group 2)",
|
|
175
|
+
"issue": "The block's own @media (prefers-reduced-motion) sits at the bottom of .heatmap after every element. It belongs before the elements. There is also a stray blank line before the closing brace.",
|
|
176
|
+
"severity": "low"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"component": "heatmap",
|
|
180
|
+
"file": "src/components/heatmap/scss/variables.scss",
|
|
181
|
+
"line": 32,
|
|
182
|
+
"rule": "Ordering (elements alphabetical)",
|
|
183
|
+
"issue": "The element blocks are out of alphabetical order: &-scroll (line 32) comes before &-grid (line 40).",
|
|
184
|
+
"severity": "low"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"component": "heatmap",
|
|
188
|
+
"file": "src/components/heatmap/index.ts",
|
|
189
|
+
"line": 170,
|
|
190
|
+
"rule": "TypeScript (no direct DOM manipulation)",
|
|
191
|
+
"issue": "Cells are collected with querySelectorAll in the grid's onconnect, and the roving tabindex is written imperatively (previous.tabIndex / next.tabIndex in an effect, lines 191-207). Template could do this with a per-cell onconnect and a reactive tabindex binding. The single effect is a deliberate optimization, but it bypasses template.",
|
|
192
|
+
"severity": "low"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"component": "highlight",
|
|
196
|
+
"file": "src/components/highlight/scss/index.scss",
|
|
197
|
+
"line": 61,
|
|
198
|
+
"rule": "Ordering (pseudo elements before sub-elements)",
|
|
199
|
+
"issue": "Inside &--line, the shared '&::after' rule comes after the &-bottom / &-left / &-right / &-top rules. Pseudo elements belong in group 2, ahead of the nested names.",
|
|
200
|
+
"severity": "low"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"component": "highlight",
|
|
204
|
+
"file": "src/components/highlight/scss/index.scss",
|
|
205
|
+
"line": 26,
|
|
206
|
+
"rule": "Comments (no restating / must be accurate)",
|
|
207
|
+
"issue": "The comment 'Doubled to outrank the active state's own glide.' was copied from variables.scss. Nothing is doubled in this @media block, so the comment is wrong here.",
|
|
208
|
+
"severity": "low"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"component": "highlight",
|
|
212
|
+
"file": "src/components/highlight/scss/variables.scss",
|
|
213
|
+
"line": 61,
|
|
214
|
+
"rule": "Ordering (state selectors after modifiers)",
|
|
215
|
+
"issue": "@include tokens.state(active) comes before the block's @media and its &-- modifiers. State selectors belong last in the block.",
|
|
216
|
+
"severity": "low"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"component": "highlight",
|
|
220
|
+
"file": "src/components/highlight/scss/variables.scss",
|
|
221
|
+
"line": 110,
|
|
222
|
+
"rule": "SCSS style (nesting, don't repeat block name)",
|
|
223
|
+
"issue": "'.highlight-rule' is a separate top-level rule. It should be nested as '&-rule' inside .highlight.",
|
|
224
|
+
"severity": "low"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"component": "icon",
|
|
228
|
+
"file": "src/components/icon/scss/index.scss",
|
|
229
|
+
"line": 15,
|
|
230
|
+
"rule": "index.scss vs variables.scss / Variables (timing pair)",
|
|
231
|
+
"issue": "The &--rotate transition uses the literal '130ms cubic-bezier(0.23, 1, 0.32, 1)' instead of --transition-duration / --transition-timing-function variables defined in variables.scss.",
|
|
232
|
+
"severity": "medium"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"component": "icon",
|
|
236
|
+
"file": "src/components/icon/scss/index.scss",
|
|
237
|
+
"line": 30,
|
|
238
|
+
"rule": "SCSS style (nesting)",
|
|
239
|
+
"issue": "':where(.icon)' is a separate top-level rule that repeats the block name. It could be nested inside .icon as ':where(&)', as button does.",
|
|
240
|
+
"severity": "low"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"component": "cc",
|
|
244
|
+
"file": "src/components/cc/scss/variables.scss",
|
|
245
|
+
"line": 5,
|
|
246
|
+
"rule": "Variables: live on the consuming selector, not on a parent with a prefix",
|
|
247
|
+
"issue": "The .cc block defines many prefixed variables that only child elements read: --card-background/--card-border-radius/--card-color (used by .cc-face, .cc-ring, .cc-stripe, .cc-signature-value), --card-number-font-size (.cc-number), --digit-duration (.cc-digit), --error-color (.cc-error), --field-* (.cc-field.input, .cc-submit), --flip-* (.cc-card), --label-font-* (.cc-label), --muted-color, --outline-color, --ring-duration (.cc-ring), --submit-* (.cc-submit), --icon-swap-* (.cc-brand-mark). Each should be an unprefixed variable on the selector that uses it.",
|
|
248
|
+
"severity": "high"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
"component": "cc",
|
|
252
|
+
"file": "src/components/cc/scss/variables.scss",
|
|
253
|
+
"line": 87,
|
|
254
|
+
"rule": "Variables: no --icon-size on a parent (the rule's own counter-example)",
|
|
255
|
+
"issue": "&-submit sets --icon-size: var(--size-400). That is the exact anti-pattern RULES.md names, and nothing in button or cc reads --icon-size, so the variable is also dead. --face-duration and --face-timing-function (lines 83-84) are dead too, because .button-face reads --transition-duration and --transition-timing-function.",
|
|
256
|
+
"severity": "medium"
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
"component": "cc",
|
|
260
|
+
"file": "src/components/cc/scss/variables.scss",
|
|
261
|
+
"line": 57,
|
|
262
|
+
"rule": "Variables: every tunable value is a variable (defined)",
|
|
263
|
+
"issue": "&-field.input sets --background-default: var(--field-background), but cc never defines --field-background, so the value falls through to whatever is inherited.",
|
|
264
|
+
"severity": "low"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"component": "cc",
|
|
268
|
+
"file": "src/components/cc/scss/variables.scss",
|
|
269
|
+
"line": 32,
|
|
270
|
+
"rule": "Ordering: block-level @media (group 2) comes before elements (group 4)",
|
|
271
|
+
"issue": "The &-face element block (lines 32-34) comes before the block's own @media (prefers-reduced-motion) at line 37.",
|
|
272
|
+
"severity": "low"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"component": "cc",
|
|
276
|
+
"file": "src/components/cc/scss/variables.scss",
|
|
277
|
+
"line": 73,
|
|
278
|
+
"rule": "SCSS style: comments only for a non-obvious why (and must be accurate)",
|
|
279
|
+
"issue": "The comment says the selector is \"Chained through '.button'\", but the selector is &-note-icon.icon, which is chained through .icon. The comment is wrong.",
|
|
280
|
+
"severity": "low"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"component": "cc",
|
|
284
|
+
"file": "src/components/cc/scss/index.scss",
|
|
285
|
+
"line": 29,
|
|
286
|
+
"rule": "index.scss vs variables.scss: values come from var(--*), not literals",
|
|
287
|
+
"issue": "index.scss hardcodes many tunable values. Brand sizes 32px/48px/24px/36px (29-35). Opacities 0.6/0.45/0.7/0.35 (52, 95, 203, 272). right: 12px (76). margin 0.6em (91). Padding/gap 24px/12px (111, 163, 169, 299, 320-321, 336). Transitions 200ms cubic-bezier (120-122), opacity 200ms ease-out (155), 150ms ease-out (200), opacity 120ms/200ms ease-out (282, 291). padding-inline-end 64px (190). outline-offset -1px (208). perspective 1200px (264). Heights 40px/44px (334, 342). margin-top 24px (343).",
|
|
288
|
+
"severity": "medium"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"component": "cc",
|
|
292
|
+
"file": "src/components/cc/scss/index.scss",
|
|
293
|
+
"line": 99,
|
|
294
|
+
"rule": "Variables: timing is always a pair (--{name}-duration + --{name}-timing-function)",
|
|
295
|
+
"issue": "The digit roll animations use var(--digit-duration) with a literal ease-out (lines 99 and 103), and there is no --digit-timing-function. In the same way, .cc-ring pairs --ring-duration with --spring instead of --ring-timing-function.",
|
|
296
|
+
"severity": "low"
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"component": "cc",
|
|
300
|
+
"file": "src/components/cc/scss/index.scss",
|
|
301
|
+
"line": 376,
|
|
302
|
+
"rule": "SCSS style: nest @media inside the selector it affects; always use &--/&- instead of repeating the block name; Variables placement",
|
|
303
|
+
"issue": "The reduced-motion @media sits at the root and repeats the block name (.cc-card--flipped, .cc-digit--roll-1, .cc-digit--roll-2) instead of nesting under .cc with &-. It also declares --face-back-opacity and --face-front-opacity in index.scss on .cc-card--flipped, from where they pass down to the .cc-face children (read with fallbacks at 386/391).",
|
|
304
|
+
"severity": "medium"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"component": "cc",
|
|
308
|
+
"file": "src/components/cc/scss/index.scss",
|
|
309
|
+
"line": 359,
|
|
310
|
+
"rule": "Keyframes: name after the class using them",
|
|
311
|
+
"issue": "Keyframes cc-digit-1 and cc-digit-2 are used by .cc-digit--roll-1 and .cc-digit--roll-2, so they should be named cc-digit--roll-1 and cc-digit--roll-2. cc-fade (line 407) is used only by .cc-digit--roll-* and lacks the element path (it should be cc-digit-fade).",
|
|
312
|
+
"severity": "low"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"component": "cc",
|
|
316
|
+
"file": "src/components/cc/scss/index.scss",
|
|
317
|
+
"line": 346,
|
|
318
|
+
"rule": "SCSS style: comments only for a non-obvious why (accurate)",
|
|
319
|
+
"issue": "The comment says \"Chained through '.button'\", but &-submit is not chained. The comment does not match the code.",
|
|
320
|
+
"severity": "low"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
"component": "cc",
|
|
324
|
+
"file": "src/components/cc/index.ts",
|
|
325
|
+
"line": 386,
|
|
326
|
+
"rule": "TypeScript: fine-grained reactivity, never re-render templates for a small change",
|
|
327
|
+
"issue": "The error slot is a function that returns a new <span> template every time the error text changes (for example 'Too short' to 'Not a valid number'). A persistent span with a reactive text binding would avoid rebuilding it.",
|
|
328
|
+
"severity": "low"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"component": "chat",
|
|
332
|
+
"file": "src/components/chat/minimap/scss/index.scss",
|
|
333
|
+
"line": 1,
|
|
334
|
+
"rule": "Directory structure / index.scss vs variables.scss / Ordering of @use",
|
|
335
|
+
"issue": "All of the logic lives in the partial _chat-minimap.scss, which is only 136 lines, and index.scss is just two @use lines. Partials are meant only for when index.scss grows too large. The @use order is also not alphabetical: 'variables' comes before 'chat-minimap'. The SCSS sits in chat/minimap/scss rather than under {component}/scss.",
|
|
336
|
+
"severity": "medium"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"component": "chat",
|
|
340
|
+
"file": "src/components/chat/minimap/scss/_chat-minimap.scss",
|
|
341
|
+
"line": 104,
|
|
342
|
+
"rule": "SCSS style / index.scss holds logic, variables.scss holds variables",
|
|
343
|
+
"issue": "&-nav has two separate &:focus-visible blocks (104 and 108) that should be merged. The first one sets the variable --color: var(--color-hover) inside the logic file instead of variables.scss.",
|
|
344
|
+
"severity": "medium"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"component": "chat",
|
|
348
|
+
"file": "src/components/chat/minimap/scss/_chat-minimap.scss",
|
|
349
|
+
"line": 60,
|
|
350
|
+
"rule": "index.scss: values come from var(--*), not literals",
|
|
351
|
+
"issue": "Several tunable values are literals: outline 2px and outline-offset -1px (60-61, 110-111), the disabled opacity 0.4 (123), and the line clamp of 2 (32, 36).",
|
|
352
|
+
"severity": "low"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"component": "chat",
|
|
356
|
+
"file": "src/components/chat/minimap/scss/_chat-minimap.scss",
|
|
357
|
+
"line": 132,
|
|
358
|
+
"rule": "SCSS style: reuse css-utilities placeholders via @extend",
|
|
359
|
+
"issue": "&-title hand-writes overflow: hidden, text-overflow: ellipsis and white-space: nowrap instead of using @extend %text-truncate, which cc and breadcrumb both use.",
|
|
360
|
+
"severity": "low"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"component": "chat",
|
|
364
|
+
"file": "src/components/chat/minimap/scss/_chat-minimap.scss",
|
|
365
|
+
"line": 119,
|
|
366
|
+
"rule": "Ordering: @media (group 2) before state selectors (group 5)",
|
|
367
|
+
"issue": "In &-nav, the @media (pointer: coarse) block comes after the &:disabled, &:focus-visible and &:hover state selectors.",
|
|
368
|
+
"severity": "low"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"component": "chat",
|
|
372
|
+
"file": "src/components/chat/minimap/scss/variables.scss",
|
|
373
|
+
"line": 26,
|
|
374
|
+
"rule": "Variables: live on the consuming selector, not on a parent with a prefix",
|
|
375
|
+
"issue": "&-item sets --length and --line-color (and their -far/-near/-peak/-rest families), but only the child .chat-minimap-line reads them (width: var(--length), background: var(--line-color)). The comment at 17-18 admits this. The prefixed --line-color passes down from the parent.",
|
|
376
|
+
"severity": "medium"
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
"component": "chat",
|
|
380
|
+
"file": "src/components/chat/minimap/index.ts",
|
|
381
|
+
"line": 200,
|
|
382
|
+
"rule": "TypeScript: let template handle cleanup and lifecycle",
|
|
383
|
+
"issue": "The subscription is stored in a local unsubscribe variable and torn down by hand in ondisconnect. onCleanup inside onconnect, as breadcrumb does, would remove the manual cleanup state.",
|
|
384
|
+
"severity": "low"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"component": "breadcrumb",
|
|
388
|
+
"file": "src/components/breadcrumb/scss/index.scss",
|
|
389
|
+
"line": 125,
|
|
390
|
+
"rule": "index.scss: no literals; Variables: timing pairs",
|
|
391
|
+
"issue": "The same long linear(...) easing is hardcoded five times (125, 127, 142, 201, 205). --enter-duration and --exit-duration have no matching --enter-timing-function or --exit-timing-function, and the slide easing is named --slide-easing (variables.scss:62) instead of --slide-timing-function.",
|
|
392
|
+
"severity": "medium"
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"component": "breadcrumb",
|
|
396
|
+
"file": "src/components/breadcrumb/scss/index.scss",
|
|
397
|
+
"line": 35,
|
|
398
|
+
"rule": "index.scss: values come from var(--*), not literals",
|
|
399
|
+
"issue": "Transitions are literals (color/text-decoration-color 0.15s ease-out at 35-36, background-color/color 0.15s ease-out at 180-181). So are the outlines (2px at 41 and 186), the option height 36px (85), and padding: 0 var(--size-100) with gap var(--size-200) (84-87). All of these should be per-element variables.",
|
|
400
|
+
"severity": "low"
|
|
401
|
+
},
|
|
402
|
+
{
|
|
403
|
+
"component": "breadcrumb",
|
|
404
|
+
"file": "src/components/breadcrumb/scss/index.scss",
|
|
405
|
+
"line": 198,
|
|
406
|
+
"rule": "Ordering: @media in group 2 (or nested in the selector it affects)",
|
|
407
|
+
"issue": "The reduced-motion @media comes at the end of the .breadcrumb block, after all the elements, instead of nested in &-segment or placed before the modifiers and elements.",
|
|
408
|
+
"severity": "low"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"component": "card",
|
|
412
|
+
"file": "src/components/card/scss/index.scss",
|
|
413
|
+
"line": 1,
|
|
414
|
+
"rule": "Ordering: @use statements alphabetical",
|
|
415
|
+
"issue": "@use '../../frame/scss/index' comes after 'css-utilities/*' and 'variables'. Sorted alphabetically it would come first.",
|
|
416
|
+
"severity": "low"
|
|
417
|
+
},
|
|
418
|
+
{
|
|
419
|
+
"component": "card",
|
|
420
|
+
"file": "src/components/card/scss/index.scss",
|
|
421
|
+
"line": 88,
|
|
422
|
+
"rule": "Ordering: pseudo elements (group 2) before modifiers and elements",
|
|
423
|
+
"issue": "&::after comes last in the block, after the &--morph and &--ring modifiers and the &-morph elements.",
|
|
424
|
+
"severity": "medium"
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"component": "card",
|
|
428
|
+
"file": "src/components/card/scss/index.scss",
|
|
429
|
+
"line": 46,
|
|
430
|
+
"rule": "Naming: build names with &--/&- rather than repeating the block name",
|
|
431
|
+
"issue": "Inside &--morph, the selector &.card--instant repeats the block name.",
|
|
432
|
+
"severity": "low"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"component": "card",
|
|
436
|
+
"file": "src/components/card/scss/index.scss",
|
|
437
|
+
"line": 62,
|
|
438
|
+
"rule": "index.scss vs variables.scss",
|
|
439
|
+
"issue": "&--ring:focus-visible sets --box-shadow: var(--box-shadow-hover) in index.scss. This is a variable-only state override and belongs in variables.scss.",
|
|
440
|
+
"severity": "low"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"component": "card",
|
|
444
|
+
"file": "src/components/card/scss/variables.scss",
|
|
445
|
+
"line": 19,
|
|
446
|
+
"rule": "Variables: live on the consuming selector, not on a parent with a prefix",
|
|
447
|
+
"issue": "&--morph defines --morph-blur, --morph-enter-duration, --morph-exit-duration, --morph-shift and --morph-swap-timing-function, but card--morph never uses them. They only feed the child &-morph-layer.frame's --swap-* variables (62-71), so values are passed down from the parent with a prefix.",
|
|
448
|
+
"severity": "medium"
|
|
449
|
+
},
|
|
450
|
+
{
|
|
451
|
+
"component": "card",
|
|
452
|
+
"file": "src/components/card/scss/variables.scss",
|
|
453
|
+
"line": 40,
|
|
454
|
+
"rule": "SCSS style: comments only for a non-obvious why (accurate)",
|
|
455
|
+
"issue": "The comment says \"Doubled class so the ring's colors outrank...\", but the &--ring selector is not doubled. The comment is stale.",
|
|
456
|
+
"severity": "low"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"component": "announcement",
|
|
460
|
+
"file": "src/components/announcement/scss/index.scss",
|
|
461
|
+
"line": 8,
|
|
462
|
+
"rule": "index.scss: no literals; Variables: timing is always a pair",
|
|
463
|
+
"issue": "The grid-template-rows transition hardcodes 240ms (line 8) and 280ms (line 12) and pairs them with --translate-timing-function, which has no --translate-duration. The same mismatch is at lines 37-38, where --transition-duration is paired with --translate-timing-function.",
|
|
464
|
+
"severity": "medium"
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
"component": "announcement",
|
|
468
|
+
"file": "src/components/announcement/scss/variables.scss",
|
|
469
|
+
"line": 4,
|
|
470
|
+
"rule": "Variables: live on the consuming selector",
|
|
471
|
+
"issue": "The block-level --fade-timing-function is never read, because &-content.overlay overrides it before use. --translate-timing-function lives on .announcement but is mostly read by the child &-content.overlay.",
|
|
472
|
+
"severity": "low"
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"component": "capslock",
|
|
476
|
+
"file": "src/components/capslock/scss/index.scss",
|
|
477
|
+
"line": 19,
|
|
478
|
+
"rule": "index.scss: values come from var(--*), not literals",
|
|
479
|
+
"issue": "The active state hardcodes transition-duration: 200ms. &-key-light hardcodes background-color/box-shadow 300ms ease-out (40-41) and border-radius: 50% (33), and has no --transition-duration/--transition-timing-function pair.",
|
|
480
|
+
"severity": "medium"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"component": "capslock",
|
|
484
|
+
"file": "src/components/capslock/scss/index.scss",
|
|
485
|
+
"line": 54,
|
|
486
|
+
"rule": "Ordering: block @media in group 2 before elements",
|
|
487
|
+
"issue": "The block's reduced-motion @media comes after the &-key, &-live and &-text elements.",
|
|
488
|
+
"severity": "low"
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
"component": "accordion",
|
|
492
|
+
"file": "src/components/accordion/scss/index.scss",
|
|
493
|
+
"line": 43,
|
|
494
|
+
"rule": "Ordering: block @media in group 2 before modifiers and elements",
|
|
495
|
+
"issue": "The block's reduced-motion @media comes at the end, after &--more and &-content.",
|
|
496
|
+
"severity": "low"
|
|
497
|
+
},
|
|
498
|
+
{
|
|
499
|
+
"component": "accordion",
|
|
500
|
+
"file": "src/components/accordion/scss/index.scss",
|
|
501
|
+
"line": 23,
|
|
502
|
+
"rule": "Naming: build names with &--/&- rather than repeating the block name",
|
|
503
|
+
"issue": "&.accordion--instant (index.scss:23) and &.accordion--scrollable (variables.scss:13) repeat the block name inside nested rules.",
|
|
504
|
+
"severity": "low"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"component": "button",
|
|
508
|
+
"file": "src/components/button/scss/index.scss",
|
|
509
|
+
"line": 87,
|
|
510
|
+
"rule": "index.scss: values come from var(--*), not literals",
|
|
511
|
+
"issue": "Even the reference hardcodes tunable values. &--morph has transition 200ms ease-out (88-89), an animation delay of 150ms (94), and outline 2px (104). The &--sidebar path transition uses an inline linear(...) easing with no timing-function variable (160-161). &-morph-icon--loading spins at 700ms linear (262). &-morph-text has 150ms/200ms ease-out (277-284).",
|
|
512
|
+
"severity": "medium"
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
"component": "button",
|
|
516
|
+
"file": "src/components/button/scss/variables.scss",
|
|
517
|
+
"line": 71,
|
|
518
|
+
"rule": "Variables: timing is always a pair (--{name}-duration / --{name}-timing-function)",
|
|
519
|
+
"issue": "--resize-duration is paired with --resize-easing. It should be --resize-timing-function.",
|
|
520
|
+
"severity": "low"
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"component": "button",
|
|
524
|
+
"file": "src/components/button/morph/template.ts",
|
|
525
|
+
"line": 102,
|
|
526
|
+
"rule": "TypeScript: raw DOM only when needed, minimal, with a why comment",
|
|
527
|
+
"issue": "onconnect writes element.style.width = 'var(--height)' with no comment explaining why. The initial compact width could be a reactive style binding; only the WAAPI measure in resize() needs raw DOM.",
|
|
528
|
+
"severity": "low"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"component": "inline-edit",
|
|
532
|
+
"file": "src/components/inline-edit/scss/variables.scss",
|
|
533
|
+
"line": 8,
|
|
534
|
+
"rule": "Variables: live on the consuming selector, not on a parent with a prefix",
|
|
535
|
+
"issue": "The .inline-edit block defines many prefixed variables that only its children read: --box-*, --heading-1/2/3-size (editor h1-h3), --icon-color/--icon-color-saved/--icon-size (&-icon), --link-underline-color, --mark-background, --quote-*, --task-*, --status-margin-top, and the whole --toolbar-* family (button size, colors, select/url widths, format/link display). Each should be set on the selector that uses it (&-toolbar-button, &-icon, &-editor h1, ...).",
|
|
536
|
+
"severity": "high"
|
|
537
|
+
},
|
|
538
|
+
{
|
|
539
|
+
"component": "metric",
|
|
540
|
+
"file": "src/components/metric/scss/variables.scss",
|
|
541
|
+
"line": 9,
|
|
542
|
+
"rule": "Variables: live on the consuming selector, not on a parent with a prefix",
|
|
543
|
+
"issue": ".metric sets prefixed variables that only its children read: --area-color (&-area), --cursor-color (&-cursor), --dot-color/--dot-ring-color/--dot-size (&-dot), --line-color/--line-width (&-line), --overlay-duration/--overlay-opacity (&-overlay), --plot-height/--plot-offset (&-plot), --tip-background/--tip-color/--tip-font-size (&-tip), and --value-font-size/--value-font-weight/--value-font-size-compact (&-value).",
|
|
544
|
+
"severity": "high"
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
"component": "input",
|
|
548
|
+
"file": "src/components/input/scss/variables.scss",
|
|
549
|
+
"line": 59,
|
|
550
|
+
"rule": "Variables: live on the consuming selector, not on a parent with a prefix",
|
|
551
|
+
"issue": ".input-tag sets child-only variables with a prefix: --box-border-radius, --chip-* (height, colors, border-radius, remove colors), --entry-min-width, --hint-color/--hint-font-size, --label-font-size/--label-font-weight, --placeholder-color. Each belongs on &-box, &-chip, &-entry, &-hint, &-label, or the field.",
|
|
552
|
+
"severity": "high"
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
"component": "input",
|
|
556
|
+
"file": "src/components/input/scss/variables.scss",
|
|
557
|
+
"line": 18,
|
|
558
|
+
"rule": "Variables: live on the consuming selector, not on a parent with a prefix",
|
|
559
|
+
"issue": ".input-scrub sets child-only prefixed variables: --field-padding-horizontal (&-field), --label-color/--label-width (&-label), --needle-color (&-needle), and --tape-* / --tick (&-tape, &-ticks).",
|
|
560
|
+
"severity": "medium"
|
|
561
|
+
},
|
|
562
|
+
{
|
|
563
|
+
"component": "inline-edit",
|
|
564
|
+
"file": "src/components/inline-edit/scss/variables.scss",
|
|
565
|
+
"line": 86,
|
|
566
|
+
"rule": "Variables: live on the consuming selector, not on a parent with a prefix",
|
|
567
|
+
"issue": "&-status sets --check-color, --check-delay, --check-duration, --check-stroke-width, and --dot-size, but only &-status-check and &-status-dot read them. The block-level --icon-swap-duration/--icon-swap-timing-function (line 23) also reach down into the icons.",
|
|
568
|
+
"severity": "medium"
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"component": "metric",
|
|
572
|
+
"file": "src/components/metric/scss/variables.scss",
|
|
573
|
+
"line": 68,
|
|
574
|
+
"rule": "Variables: live on the consuming selector, not on a parent with a prefix",
|
|
575
|
+
"issue": ".metric-flash sets --arrow-offset/--arrow-size (read by &-arrow and &-icon.icon), --roll-offset/--drop-offset (read by &-text), and --tint-opacity (read by &-tint) on the block instead of on those elements.",
|
|
576
|
+
"severity": "medium"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
"component": "metric",
|
|
580
|
+
"file": "src/components/metric/scss/variables.scss",
|
|
581
|
+
"line": 71,
|
|
582
|
+
"rule": "Variables: timing is always a pair --{name}-duration + --{name}-timing-function",
|
|
583
|
+
"issue": "The easings are named --cell, --clear, --lift, --pop, --roll, and --settle instead of --cell-timing-function and so on. --drop-duration borrows --clear, and --tone-duration is paired with an undefined --transition-timing-function (_flash.scss:17).",
|
|
584
|
+
"severity": "medium"
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
"component": "metric",
|
|
588
|
+
"file": "src/components/metric/scss/index.scss",
|
|
589
|
+
"line": 85,
|
|
590
|
+
"rule": "Variables: timing pair / index.scss values come from var(--*), not literals",
|
|
591
|
+
"issue": "&-overlay uses `transition: opacity var(--overlay-duration) ease-out`, a literal easing with no --overlay-timing-function. &-line (line 77) hard-codes `opacity 0.05s`.",
|
|
592
|
+
"severity": "medium"
|
|
593
|
+
},
|
|
594
|
+
{
|
|
595
|
+
"component": "inline-edit",
|
|
596
|
+
"file": "src/components/inline-edit/scss/variables.scss",
|
|
597
|
+
"line": 102,
|
|
598
|
+
"rule": "Variables: timing is always a pair --{name}-duration + --{name}-timing-function",
|
|
599
|
+
"issue": "&-status has five durations (--check-, --enter-, --exit-, --move-, --pulse-duration) that all share one generic --timing-function, and the pulse animation (index.scss:208) uses a literal ease-in-out.",
|
|
600
|
+
"severity": "medium"
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
"component": "image",
|
|
604
|
+
"file": "src/components/image/scss/variables.scss",
|
|
605
|
+
"line": 42,
|
|
606
|
+
"rule": "Variables: timing is always a pair --transition-duration + --transition-timing-function",
|
|
607
|
+
"issue": "&-lazyload pairs --transition-duration with --timing-function instead of --transition-timing-function, and index.scss:77 reads var(--timing-function). There is also no prefers-reduced-motion handling for the placeholder fade.",
|
|
608
|
+
"severity": "medium"
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
"component": "loading",
|
|
612
|
+
"file": "src/components/loading/scss/index.scss",
|
|
613
|
+
"line": 5,
|
|
614
|
+
"rule": "Variables: timing pair; index.scss values from var(--*) not literals",
|
|
615
|
+
"issue": "The spin animation uses --animation-duration with a literal `linear` easing. The bar animation (line 25) pairs --animation-duration with a generic --timing-function instead of --animation-timing-function. The bar's sweep width is a literal `width: 40%` (line 29) rather than a variable.",
|
|
616
|
+
"severity": "medium"
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"component": "input",
|
|
620
|
+
"file": "src/components/input/scss/variables.scss",
|
|
621
|
+
"line": 77,
|
|
622
|
+
"rule": "Variables: timing pair naming",
|
|
623
|
+
"issue": "--chip-slide-duration is paired with --chip-slide-easing; it should be --chip-slide-timing-function (also read in tag.ts:82).",
|
|
624
|
+
"severity": "low"
|
|
625
|
+
},
|
|
626
|
+
{
|
|
627
|
+
"component": "marquee",
|
|
628
|
+
"file": "src/components/marquee/scss/index.scss",
|
|
629
|
+
"line": 73,
|
|
630
|
+
"rule": "Variables: timing is always a pair",
|
|
631
|
+
"issue": "The &-item--link transition list uses only var(--transition-duration) for each property, with no --transition-timing-function.",
|
|
632
|
+
"severity": "medium"
|
|
633
|
+
},
|
|
634
|
+
{
|
|
635
|
+
"component": "metric",
|
|
636
|
+
"file": "src/components/metric/scss/_flash.scss",
|
|
637
|
+
"line": 46,
|
|
638
|
+
"rule": "Keyframes: name after the class that uses them",
|
|
639
|
+
"issue": "metric-flash-pop-2/-pop-1 (used by .metric-flash-arrow--even/--odd), metric-flash-clear (used only by .metric-flash-arrow--off, line 54), and metric-flash-drop (used only by .metric-flash-text--leaving, line 68) are not named after their classes. metric-flash-roll (line 63) lacks the element path (metric-flash-text-roll).",
|
|
640
|
+
"severity": "medium"
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
"component": "inline-edit",
|
|
644
|
+
"file": "src/components/inline-edit/scss/index.scss",
|
|
645
|
+
"line": 476,
|
|
646
|
+
"rule": "Keyframes: name after the class that uses them",
|
|
647
|
+
"issue": "inline-edit-status-enter/-exit are each used by a single class (.inline-edit-status-label-text--enter/--exit, lines 277/281), so they should be named inline-edit-status-label-text--enter/--exit.",
|
|
648
|
+
"severity": "low"
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
"component": "inline-edit",
|
|
652
|
+
"file": "src/components/inline-edit/scss/index.scss",
|
|
653
|
+
"line": 57,
|
|
654
|
+
"rule": "Ordering: elements &-* alphabetical",
|
|
655
|
+
"issue": "Elements are out of order: &-anchor (57) comes after &-display (30), and &-status (181) and &-task (289) come before & > &-field (297), &-icon (316), and &-label (359).",
|
|
656
|
+
"severity": "medium"
|
|
657
|
+
},
|
|
658
|
+
{
|
|
659
|
+
"component": "inline-edit",
|
|
660
|
+
"file": "src/components/inline-edit/scss/variables.scss",
|
|
661
|
+
"line": 158,
|
|
662
|
+
"rule": "Ordering: modifiers &--* before elements &-*, alphabetical",
|
|
663
|
+
"issue": "The &--multiline and &--seamless modifiers sit at the end, after all elements. The elements are also unordered: & > &-field (142) and &-task (148) come after &-toolbar*.",
|
|
664
|
+
"severity": "medium"
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
"component": "inline-edit",
|
|
668
|
+
"file": "src/components/inline-edit/scss/index.scss",
|
|
669
|
+
"line": 371,
|
|
670
|
+
"rule": "index.scss vs variables.scss: variables.scss holds css variables",
|
|
671
|
+
"issue": "index.scss defines variable overrides that belong in variables.scss: &-toolbar-block.select --background-*/--box-shadow-*/--height/--width (371-380), &-toolbar-button --background-*/--border-radius/--icon-size/--padding-* (385-390) and its [aria-pressed] overrides (405-407), &-toolbar-url.input vars (448-451, 459), and the editor active background (74-75).",
|
|
672
|
+
"severity": "medium"
|
|
673
|
+
},
|
|
674
|
+
{
|
|
675
|
+
"component": "inline-edit",
|
|
676
|
+
"file": "src/components/inline-edit/scss/index.scss",
|
|
677
|
+
"line": 101,
|
|
678
|
+
"rule": "index.scss: values come from var(--*), not literals",
|
|
679
|
+
"issue": "Many tunable literals: blockquote `2px` border and `padding-inline-start: 12px` (99-101), code `padding: 0.125em 0.3em` (117), `font-size: 0.875em` (125), heading `line-height: 1.3` (136), list indent `1.5em` (160), pre `12px` (165), task `margin-inline-end: 0.5em` (291), icon `24px` size (319/325), `stroke-width: 2.25` (332/440), toolbar `outline: 2px` (401), and divider `width: 1px` (420).",
|
|
680
|
+
"severity": "low"
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
"component": "inline-edit",
|
|
684
|
+
"file": "src/components/inline-edit/scss/index.scss",
|
|
685
|
+
"line": 507,
|
|
686
|
+
"rule": "SCSS style: @media nested inside the selector it affects",
|
|
687
|
+
"issue": "The prefers-reduced-motion block is a separate top-level rule that re-opens .inline-edit, instead of being nested in &-status and &-toolbar.tooltip-content.",
|
|
688
|
+
"severity": "low"
|
|
689
|
+
},
|
|
690
|
+
{
|
|
691
|
+
"component": "inline-edit",
|
|
692
|
+
"file": "src/components/inline-edit/scss/index.scss",
|
|
693
|
+
"line": 434,
|
|
694
|
+
"rule": "Comments: only for a non-obvious why; never restate/mislead",
|
|
695
|
+
"issue": "&-toolbar-icon repeats the &-icon comment ('Only the shared check takes the stroke...'), which does not describe toolbar icons. It is a copy-paste comment that misdescribes the rule.",
|
|
696
|
+
"severity": "low"
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
"component": "metric",
|
|
700
|
+
"file": "src/components/metric/scss/index.scss",
|
|
701
|
+
"line": 152,
|
|
702
|
+
"rule": "Ordering / SCSS style: @media/@container nested inside the selector they affect",
|
|
703
|
+
"issue": "@container (width < 320px) { &-value } and @media (prefers-reduced-motion) { &-line } sit at the end of the block instead of nested inside &-value and &-line. The reduced-motion rule also overrides properties rather than zeroing duration variables.",
|
|
704
|
+
"severity": "low"
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"component": "metric",
|
|
708
|
+
"file": "src/components/metric/scss/variables.scss",
|
|
709
|
+
"line": 135,
|
|
710
|
+
"rule": "Ordering: block @media goes in group 2, before modifiers/elements",
|
|
711
|
+
"issue": "In .metric-flash, the block's own prefers-reduced-motion @media comes after the &--down/&--up modifiers and the &-arrow/&-icon/&-text elements.",
|
|
712
|
+
"severity": "low"
|
|
713
|
+
},
|
|
714
|
+
{
|
|
715
|
+
"component": "metric",
|
|
716
|
+
"file": "src/components/metric/scss/variables.scss",
|
|
717
|
+
"line": 67,
|
|
718
|
+
"rule": "SCSS style: use nesting rather than repeating the block name",
|
|
719
|
+
"issue": ".metric-flash is a separate top-level block that repeats the .metric name instead of being nested as &-flash inside .metric.",
|
|
720
|
+
"severity": "low"
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
"component": "metric",
|
|
724
|
+
"file": "src/components/metric/scss/index.scss",
|
|
725
|
+
"line": 118,
|
|
726
|
+
"rule": "index.scss: values come from var(--*), not literals",
|
|
727
|
+
"issue": "Tunable literals in the logic: tip `border-radius: 999px` (118) and `padding ... 12px` (125), tip label `opacity: 0.7` (131), value `line-height: 1.2` (148), dot ring `2px` (51), plot outline `2px` (99), cursor `width: 1px` (34), the container breakpoint `320px` (152), and header gap tokens hard-coded (63).",
|
|
728
|
+
"severity": "low"
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
"component": "input",
|
|
732
|
+
"file": "src/components/input/scss/variables.scss",
|
|
733
|
+
"line": 103,
|
|
734
|
+
"rule": "Ordering: elements &-* alphabetical",
|
|
735
|
+
"issue": "In &-tag, &-chip (103) and &-entry > &-field (120) come before &-box (124). The file also splits .input across three separate top-level blocks (lines 7, 12, 137) instead of one.",
|
|
736
|
+
"severity": "low"
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
"component": "input",
|
|
740
|
+
"file": "src/components/input/scss/_tag.scss",
|
|
741
|
+
"line": 30,
|
|
742
|
+
"rule": "index.scss vs variables.scss: variables.scss holds css variables",
|
|
743
|
+
"issue": "The logic partial sets variables: &-chip sets --color-active/--color-default (30-31) and &-chip-button sets --background-hover/--background-pressed/--color-* (55-59). The button's 24px size (68/76) is also a literal.",
|
|
744
|
+
"severity": "low"
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"component": "input",
|
|
748
|
+
"file": "src/components/input/scss/_scrub.scss",
|
|
749
|
+
"line": 14,
|
|
750
|
+
"rule": "Ordering: state/relational selectors (&:has) last; avoid repeating block name",
|
|
751
|
+
"issue": "&:has(.input-scrub-field:focus-visible) comes before the elements instead of last, and it repeats the block name. The reduced-motion @media (84-88) sits outside the selector and overrides `translate` directly rather than nesting it and zeroing --tape-translate/duration.",
|
|
752
|
+
"severity": "low"
|
|
753
|
+
},
|
|
754
|
+
{
|
|
755
|
+
"component": "input",
|
|
756
|
+
"file": "src/components/input/scrub.ts",
|
|
757
|
+
"line": 246,
|
|
758
|
+
"rule": "TypeScript: don't manipulate the DOM directly",
|
|
759
|
+
"issue": "Writes document.documentElement.style.cursor = 'ew-resize' and removes it in end() (line 116), a manual global style write and cleanup. A reactive --active state class, plus the pointer capture already in place, could cover it.",
|
|
760
|
+
"severity": "medium"
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"component": "input",
|
|
764
|
+
"file": "src/components/input/tag.ts",
|
|
765
|
+
"line": 46,
|
|
766
|
+
"rule": "index.scss vs variables.scss: every tunable value is a variable",
|
|
767
|
+
"issue": "The LEAVE/POP/SHAKE/SWAP animation durations and easings are hard-coded in TS, while the other chip motion values are read from CSS variables. Consumers cannot tune them.",
|
|
768
|
+
"severity": "low"
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"component": "input",
|
|
772
|
+
"file": "src/components/input/tag.ts",
|
|
773
|
+
"line": 231,
|
|
774
|
+
"rule": "TypeScript: don't manipulate the DOM directly",
|
|
775
|
+
"issue": "form() finds the chip parts with chip.querySelector('.input-tag-chip-body'/'-remove') and add() clears the field with field.value = '' (212), instead of using onconnect refs and a reactive value binding.",
|
|
776
|
+
"severity": "low"
|
|
777
|
+
},
|
|
778
|
+
{
|
|
779
|
+
"component": "marquee",
|
|
780
|
+
"file": "src/components/marquee/index.ts",
|
|
781
|
+
"line": 341,
|
|
782
|
+
"rule": "Variables: every tunable value is a variable so consumers can control it",
|
|
783
|
+
"issue": "An inline style always sets --gap-horizontal on .marquee-track from the `gap = 40` prop default. This duplicates variables.scss:31 and beats any stylesheet override, which contradicts the comment at line 109 that a CSS override of --gap-horizontal is supported.",
|
|
784
|
+
"severity": "medium"
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
"component": "marquee",
|
|
788
|
+
"file": "src/components/marquee/scss/index.scss",
|
|
789
|
+
"line": 25,
|
|
790
|
+
"rule": "Naming: build names with &-/&-- nesting rather than repeating the block name",
|
|
791
|
+
"issue": "&--still nests a literal `.marquee { &-group--copy ... }`, repeating the block name. The focus ring also uses literals: `8%`/`1px` (76-77) and `1px` (110).",
|
|
792
|
+
"severity": "low"
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"component": "nav",
|
|
796
|
+
"file": "src/components/nav/scss/index.scss",
|
|
797
|
+
"line": 23,
|
|
798
|
+
"rule": "Naming: states use tokens.state(...), not hand-written state classes",
|
|
799
|
+
"issue": "&.--hidden is a hand-written state class (toggled from tree.ts/toc.ts) that is not part of the tokens.state map.",
|
|
800
|
+
"severity": "low"
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
"component": "nav",
|
|
804
|
+
"file": "src/components/nav/spy.ts",
|
|
805
|
+
"line": 158,
|
|
806
|
+
"rule": "TypeScript: drop to raw DOM only when needed, keep it minimal and say why",
|
|
807
|
+
"issue": "connect() adds scroll/scrollend listeners with addEventListener and removes them by hand (172-173). navigate() calls setAttribute('tabindex', '-1') on the target (189). Neither has a comment explaining why template bindings cannot be used.",
|
|
808
|
+
"severity": "low"
|
|
809
|
+
},
|
|
810
|
+
{
|
|
811
|
+
"component": "image",
|
|
812
|
+
"file": "src/components/image/index.ts",
|
|
813
|
+
"line": 5,
|
|
814
|
+
"rule": "Directory structure: index.ts exports a typed object",
|
|
815
|
+
"issue": "`export default { lazyload }` is an untyped literal with an extra named export, not `const image: { lazyload: typeof lazyload } = { lazyload }; export default image;`.",
|
|
816
|
+
"severity": "low"
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
"component": "json",
|
|
820
|
+
"file": "src/components/json/index.ts",
|
|
821
|
+
"line": 4,
|
|
822
|
+
"rule": "Directory structure: index.ts exports a typed object",
|
|
823
|
+
"issue": "`export default { download }` is an untyped literal, not a typed const like button's barrel.",
|
|
824
|
+
"severity": "low"
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
"component": "nav",
|
|
828
|
+
"file": "src/components/nav/index.ts",
|
|
829
|
+
"line": 7,
|
|
830
|
+
"rule": "Directory structure: index.ts exports a typed object",
|
|
831
|
+
"issue": "`export default { spy, toc, tree }` is an untyped literal, not `const nav: { spy: typeof spy, ... } = {...}`.",
|
|
832
|
+
"severity": "low"
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
"component": "input",
|
|
836
|
+
"file": "src/components/input/index.ts",
|
|
837
|
+
"line": 7,
|
|
838
|
+
"rule": "Directory structure: index.ts exports a typed object",
|
|
839
|
+
"issue": "The barrel builds its export with Object.assign(field, { scrub, tag }) instead of the typed object shape. inline-edit/index.ts:180 does the same with Object.assign(plain, { rich }).",
|
|
840
|
+
"severity": "low"
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
"component": "shell",
|
|
844
|
+
"file": "src/components/shell/index.ts",
|
|
845
|
+
"line": 58,
|
|
846
|
+
"rule": "TypeScript: don't manipulate the DOM directly; use reactive class/style bindings",
|
|
847
|
+
"issue": "Drag state is toggled by hand with classList.add/remove ('shell-sidebar--dragging' at 58/151, 'shell--dragging' at 222, removed at 238/240) instead of a reactive flag bound via `class: () => ...` on the sidebar and shell templates.",
|
|
848
|
+
"severity": "high"
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"component": "shell",
|
|
852
|
+
"file": "src/components/shell/index.ts",
|
|
853
|
+
"line": 221,
|
|
854
|
+
"rule": "TypeScript: don't manipulate the DOM directly; fine-grained reactivity",
|
|
855
|
+
"issue": "reveal()/settle() write element.style.translate and shell.style.setProperty/removeProperty for --{edge}-edge/-gap-horizontal/-space (221-243) by hand. Drag offsets could live in reactive state bound with `style: () => ...`, and no comment explains why raw DOM is needed.",
|
|
856
|
+
"severity": "high"
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
"component": "shell",
|
|
860
|
+
"file": "src/components/shell/index.ts",
|
|
861
|
+
"line": 102,
|
|
862
|
+
"rule": "TypeScript: don't manipulate the DOM directly",
|
|
863
|
+
"issue": "onpointermove writes `this.style.setProperty('--offset', ...)` directly. A reactive value bound through the edge's `style` attribute would do this.",
|
|
864
|
+
"severity": "medium"
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
"component": "shell",
|
|
868
|
+
"file": "src/components/shell/index.ts",
|
|
869
|
+
"line": 37,
|
|
870
|
+
"rule": "TypeScript: don't manipulate the DOM directly",
|
|
871
|
+
"issue": "Elements are looked up with document.getElementById (37-38, 77, 116) instead of keeping references through onconnect.",
|
|
872
|
+
"severity": "medium"
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"component": "shell",
|
|
876
|
+
"file": "src/components/shell/index.ts",
|
|
877
|
+
"line": 30,
|
|
878
|
+
"rule": "Ordering: alphabetize everything",
|
|
879
|
+
"issue": "Constants are out of order: NARROW is declared before FIELDS.",
|
|
880
|
+
"severity": "low"
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
"component": "shell",
|
|
884
|
+
"file": "src/components/shell/scss/variables.scss",
|
|
885
|
+
"line": 18,
|
|
886
|
+
"rule": "Variables: timing is always a --{name}-duration / --{name}-timing-function pair",
|
|
887
|
+
"issue": "Uses --slide-easing instead of --slide-timing-function. The same variable is consumed in index.scss at lines 9, 87-89, 110-112, 131 and 171-172.",
|
|
888
|
+
"severity": "medium"
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
"component": "shell",
|
|
892
|
+
"file": "src/components/shell/scss/variables.scss",
|
|
893
|
+
"line": 22,
|
|
894
|
+
"rule": "Ordering: block-internal order (modifiers, elements alphabetical, then state selectors; @media in group 2)",
|
|
895
|
+
"issue": "&-sidebar and &-surface (22-28) come before the &.--left-open/&.--right-open state rules and the block's @media (30-42). The remaining elements &-edge, &-handle, &-main, &-toggle (45-73) follow after those, so the elements are split into two groups and are not alphabetical.",
|
|
896
|
+
"severity": "medium"
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
"component": "shell",
|
|
900
|
+
"file": "src/components/shell/scss/index.scss",
|
|
901
|
+
"line": 19,
|
|
902
|
+
"rule": "Ordering: @media for the block belongs in group 2, before &-- modifiers",
|
|
903
|
+
"issue": "The block's @media (max-width: 1024px) is placed after the &--dragging modifier rule.",
|
|
904
|
+
"severity": "low"
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
"component": "shell",
|
|
908
|
+
"file": "src/components/shell/scss/index.scss",
|
|
909
|
+
"line": 24,
|
|
910
|
+
"rule": "Ordering: alphabetize selectors",
|
|
911
|
+
"issue": "The selector list `&-backdrop, &-sidebar, &-main` is not alphabetical; &-main should come before &-sidebar.",
|
|
912
|
+
"severity": "low"
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
"component": "shell",
|
|
916
|
+
"file": "src/components/shell/scss/index.scss",
|
|
917
|
+
"line": 81,
|
|
918
|
+
"rule": "index.scss: values come from var(--*), not literals",
|
|
919
|
+
"issue": "Tunable literals in the logic: handle border-radius 4px (81) and height 10svh (82), edge width 24px (42), and toggle focus outline `2px solid var(--color-blue-400)` (197). These should be variables.",
|
|
920
|
+
"severity": "medium"
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
"component": "range",
|
|
924
|
+
"file": "src/components/range/scss/variables.scss",
|
|
925
|
+
"line": 21,
|
|
926
|
+
"rule": "Variables live on the selector that consumes them, not on a parent with a prefix",
|
|
927
|
+
"issue": "&-filter defines prefixed variables that its child elements consume: --clear-*, --field-*, --ghost-*, --header-align, --heading-display, --label-*, --range-*, --root-cursor, --thumb-*, --tick-color, --track-*, --value-* (21-63). Each should be unprefixed on .range-filter-clear, -field, -ghost, -thumb, etc. --clear-hover also breaks the -default/-hover state family naming.",
|
|
928
|
+
"severity": "high"
|
|
929
|
+
},
|
|
930
|
+
{
|
|
931
|
+
"component": "range",
|
|
932
|
+
"file": "src/components/range/scss/variables.scss",
|
|
933
|
+
"line": 41,
|
|
934
|
+
"rule": "Variables: timing is always a --{name}-duration / --{name}-timing-function pair",
|
|
935
|
+
"issue": "--roll-ease should be --roll-timing-function. --thumb-transition (57) puts a whole transition shorthand in one variable instead of a duration/timing-function pair.",
|
|
936
|
+
"severity": "medium"
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
"component": "range",
|
|
940
|
+
"file": "src/components/range/scss/variables.scss",
|
|
941
|
+
"line": 122,
|
|
942
|
+
"rule": "SCSS style: use nesting instead of repeating the block name",
|
|
943
|
+
"issue": "A second top-level `.range-filter { &-clear, &-thumb }` block repeats the name. It should be merged into the existing `.range { &-filter { ... } }` block above.",
|
|
944
|
+
"severity": "medium"
|
|
945
|
+
},
|
|
946
|
+
{
|
|
947
|
+
"component": "range",
|
|
948
|
+
"file": "src/components/range/scss/variables.scss",
|
|
949
|
+
"line": 111,
|
|
950
|
+
"rule": "Ordering: elements alphabetical",
|
|
951
|
+
"issue": "`&-field .range-filter-input` comes after &-track. It should sit between &-column and &-header.",
|
|
952
|
+
"severity": "low"
|
|
953
|
+
},
|
|
954
|
+
{
|
|
955
|
+
"component": "range",
|
|
956
|
+
"file": "src/components/range/scss/_filter.scss",
|
|
957
|
+
"line": 183,
|
|
958
|
+
"rule": "Ordering: alphabetize transition lists",
|
|
959
|
+
"issue": "The &--vertical ghost transition list is `bottom, opacity, height`; height must come before opacity.",
|
|
960
|
+
"severity": "medium"
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
"component": "range",
|
|
964
|
+
"file": "src/components/range/scss/_filter.scss",
|
|
965
|
+
"line": 361,
|
|
966
|
+
"rule": "Naming: states use the tokens.state(...) mixin, not hand-written state classes",
|
|
967
|
+
"issue": "`&.--disabled` is hand-written; it should be `@include tokens.state(disabled)`. Its opacity 0.5 is also a literal, and the block's @media (365) is placed last instead of in group 2.",
|
|
968
|
+
"severity": "medium"
|
|
969
|
+
},
|
|
970
|
+
{
|
|
971
|
+
"component": "range",
|
|
972
|
+
"file": "src/components/range/scss/_filter.scss",
|
|
973
|
+
"line": 27,
|
|
974
|
+
"rule": "index.scss vs variables.scss: css variables belong in variables.scss",
|
|
975
|
+
"issue": "The logic partial sets variables: --background-default/-hover/-pressed on &-clear (27-29), overrides in &-clear:disabled (53-56), --box-shadow-active/-default on &-thumb (269-270), and on &-thumb:focus-visible (301).",
|
|
976
|
+
"severity": "medium"
|
|
977
|
+
},
|
|
978
|
+
{
|
|
979
|
+
"component": "range",
|
|
980
|
+
"file": "src/components/range/scss/_filter.scss",
|
|
981
|
+
"line": 32,
|
|
982
|
+
"rule": "index.scss: values come from var(--*), not literals; per-axis padding variables",
|
|
983
|
+
"issue": "Many tunable literals: clear border 1px (32), height 24px (43), shorthand `padding: 0 var(--size-100)` (46), transitions 150ms ease-out (47-50), opacity 0.5 (58), field border 1px (110), padding-inline 12px (120), input 72px (144/150), fields gap 12px (157), ghost border-radius 999px (162), ghost transitions 75ms/100ms (170-172), separator 12px (248), track radius 999px (331).",
|
|
984
|
+
"severity": "medium"
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
"component": "range",
|
|
988
|
+
"file": "src/components/range/scss/_filter.scss",
|
|
989
|
+
"line": 6,
|
|
990
|
+
"rule": "SCSS style: use nesting (&-) instead of repeating the block name",
|
|
991
|
+
"issue": "The filter partial opens a top-level `.range-filter` block instead of nesting it as `&-filter` under `.range`.",
|
|
992
|
+
"severity": "low"
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
"component": "range",
|
|
996
|
+
"file": "src/components/range/scss/_slider.scss",
|
|
997
|
+
"line": 16,
|
|
998
|
+
"rule": "index.scss vs variables.scss: variables only in variables.scss",
|
|
999
|
+
"issue": "The partial mixes variable blocks (`.range--slider` 16-31 and `.range-filter.range--slider` 33-73) with logic rules. Those variant overrides belong in variables.scss.",
|
|
1000
|
+
"severity": "medium"
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
"component": "range",
|
|
1004
|
+
"file": "src/components/range/scss/_slider.scss",
|
|
1005
|
+
"line": 106,
|
|
1006
|
+
"rule": "index.scss: values come from var(--*), not literals",
|
|
1007
|
+
"issue": "Native thumb states hard-code `scale: 1.2`, `box-shadow: none` (106-117), `0 0 0 3px var(--focus-color)` (134/141), and opacity 0.64 (121) instead of reusing --thumb-scale-active/--thumb-shadow-focus. The mixin also uses literals: `1px` border (5) and `150ms ease-out` transitions (10-12).",
|
|
1008
|
+
"severity": "medium"
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
"component": "range",
|
|
1012
|
+
"file": "src/components/range/scss/_vertical.scss",
|
|
1013
|
+
"line": 2,
|
|
1014
|
+
"rule": "Variables live on the consuming selector; variables only in variables.scss",
|
|
1015
|
+
"issue": "--vertical-size is set on `.range--vertical` but consumed by the child `.range-filter-root--vertical` (_filter.scss:238), and it is defined in a logic partial rather than variables.scss.",
|
|
1016
|
+
"severity": "low"
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
"component": "range",
|
|
1020
|
+
"file": "src/components/range/scss/index.scss",
|
|
1021
|
+
"line": 20,
|
|
1022
|
+
"rule": "index.scss: values come from var(--*), not literals",
|
|
1023
|
+
"issue": "`border-radius: 240px` is a literal; it should be a --border-radius variable.",
|
|
1024
|
+
"severity": "low"
|
|
1025
|
+
},
|
|
1026
|
+
{
|
|
1027
|
+
"component": "range",
|
|
1028
|
+
"file": "src/components/range/index.ts",
|
|
1029
|
+
"line": 52,
|
|
1030
|
+
"rule": "Directory structure: index.ts barrel exports a typed object of sub-components",
|
|
1031
|
+
"issue": "index.ts defines the `plain` component inline and exports `Object.assign(plain, { filter })`. It should be a barrel exporting `const range: { ... } = { ... }`, with the plain range in its own file.",
|
|
1032
|
+
"severity": "medium"
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
"component": "range",
|
|
1036
|
+
"file": "src/components/range/filter.ts",
|
|
1037
|
+
"line": 369,
|
|
1038
|
+
"rule": "TypeScript: don't manipulate the DOM directly",
|
|
1039
|
+
"issue": "Thumbs get an expando `element[INDEX] = index` in onconnect, and the root's pointerdown finds them with `closest('.range-filter-thumb')` (274). The index could be passed through bindings instead of stored on DOM nodes.",
|
|
1040
|
+
"severity": "low"
|
|
1041
|
+
},
|
|
1042
|
+
{
|
|
1043
|
+
"component": "range",
|
|
1044
|
+
"file": "src/components/range/filter.ts",
|
|
1045
|
+
"line": 230,
|
|
1046
|
+
"rule": "Naming (BEM-like)",
|
|
1047
|
+
"issue": "The `.range-filter` element carries the parent block's modifier `range--vertical` (and is styled via `.range-filter.range--slider`/`.range-filter.range--vertical`) instead of its own `range-filter--vertical`. Its children additionally repeat `--vertical` modifiers.",
|
|
1048
|
+
"severity": "low"
|
|
1049
|
+
},
|
|
1050
|
+
{
|
|
1051
|
+
"component": "select",
|
|
1052
|
+
"file": "src/components/select/scss/variables.scss",
|
|
1053
|
+
"line": 52,
|
|
1054
|
+
"rule": "Variables live on the selector that consumes them, not on a parent",
|
|
1055
|
+
"issue": "Several variables live on a parent instead of the selector that uses them. On &-panel: --fade, --pad and --highlight/--highlight-pressed, used by the scroller and option. On .select: --item-height, --trigger-border-radius, --focus-width and --color-muted (19-24), used by option, scroller, trigger, detail and scroll. On &-option: --icon-swap-* (43-44), used by the child .select-menu-check.",
|
|
1056
|
+
"severity": "medium"
|
|
1057
|
+
},
|
|
1058
|
+
{
|
|
1059
|
+
"component": "select",
|
|
1060
|
+
"file": "src/components/select/scss/index.scss",
|
|
1061
|
+
"line": 144,
|
|
1062
|
+
"rule": "Variables: per-axis --padding-horizontal/--padding-vertical; no literals in index.scss",
|
|
1063
|
+
"issue": "The trigger uses a hard-coded shorthand `padding: 0 var(--size-200) 0 var(--size-300)` and the option uses `padding: 0 var(--size-100)` (37) instead of padding variables.",
|
|
1064
|
+
"severity": "medium"
|
|
1065
|
+
},
|
|
1066
|
+
{
|
|
1067
|
+
"component": "select",
|
|
1068
|
+
"file": "src/components/select/scss/index.scss",
|
|
1069
|
+
"line": 102,
|
|
1070
|
+
"rule": "index.scss: values come from var(--*), not literals; timing pair",
|
|
1071
|
+
"issue": "The scroll arrow uses `transition: opacity 150ms ease-out` and `height: 24px` (96) as literals. Other literals: z-index 9/50 (15/83), max-width calc(90vw - ...) (71), stroke-width 2.25 (22).",
|
|
1072
|
+
"severity": "low"
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
"component": "select",
|
|
1076
|
+
"file": "src/components/select/scss/index.scss",
|
|
1077
|
+
"line": 44,
|
|
1078
|
+
"rule": "index.scss vs variables.scss",
|
|
1079
|
+
"issue": "`--background-default: var(--highlight)` is set in index.scss on &-option--highlighted/:focus; it belongs in variables.scss.",
|
|
1080
|
+
"severity": "low"
|
|
1081
|
+
},
|
|
1082
|
+
{
|
|
1083
|
+
"component": "select",
|
|
1084
|
+
"file": "src/components/select/index.ts",
|
|
1085
|
+
"line": 468,
|
|
1086
|
+
"rule": "TypeScript: don't manipulate the DOM directly",
|
|
1087
|
+
"issue": "The scroller's onconnect finds the first option/label with querySelector; their own onconnect bindings could capture them.",
|
|
1088
|
+
"severity": "low"
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
"component": "select",
|
|
1092
|
+
"file": "src/components/select/index.ts",
|
|
1093
|
+
"line": 66,
|
|
1094
|
+
"rule": "Ordering: alphabetize everything",
|
|
1095
|
+
"issue": "SELECT_OPTION is declared before SELECT_ARROW. In the attribute objects, `class` follows `onscroll` (475) and `onactivewheel` follows `onconnect` (447).",
|
|
1096
|
+
"severity": "low"
|
|
1097
|
+
},
|
|
1098
|
+
{
|
|
1099
|
+
"component": "relative-time",
|
|
1100
|
+
"file": "src/components/relative-time/index.ts",
|
|
1101
|
+
"line": 286,
|
|
1102
|
+
"rule": "TypeScript: don't manipulate the DOM directly; reactive style bindings",
|
|
1103
|
+
"issue": "nudge() writes message.style.right directly (286, 294) from an effect. The measured shift could go into reactive state bound with `style: () => ...` on the tooltip span, and no comment explains why raw DOM is needed.",
|
|
1104
|
+
"severity": "medium"
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
"component": "relative-time",
|
|
1108
|
+
"file": "src/components/relative-time/index.ts",
|
|
1109
|
+
"line": 94,
|
|
1110
|
+
"rule": "TypeScript: don't manipulate the DOM directly",
|
|
1111
|
+
"issue": "Items are stored as an expando on DOM nodes (`element[ITEM] = item`) so retire() can recover them from e.target. An onanimationend bound per item in bind() would avoid this.",
|
|
1112
|
+
"severity": "low"
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
"component": "relative-time",
|
|
1116
|
+
"file": "src/components/relative-time/scss/variables.scss",
|
|
1117
|
+
"line": 10,
|
|
1118
|
+
"rule": "Variables live on the selector that consumes them",
|
|
1119
|
+
"issue": "--placeholder is set on .relative-time but only consumed by `.relative-time-roll--placeholder::before`. The prefixed --roll-* variables (11-17) on the block are consumed by the digit/rest/slot elements.",
|
|
1120
|
+
"severity": "medium"
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
"component": "relative-time",
|
|
1124
|
+
"file": "src/components/relative-time/scss/index.scss",
|
|
1125
|
+
"line": 81,
|
|
1126
|
+
"rule": "SCSS style / comments only for non-obvious why",
|
|
1127
|
+
"issue": "There are two separate `&:focus-visible` blocks (81 and 85) that should be merged. The comment above the first says 'Brightens on hover', but the selector is :focus-visible.",
|
|
1128
|
+
"severity": "low"
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
"component": "relative-time",
|
|
1132
|
+
"file": "src/components/relative-time/scss/index.scss",
|
|
1133
|
+
"line": 10,
|
|
1134
|
+
"rule": "index.scss: values come from var(--*), not literals; timing pair",
|
|
1135
|
+
"issue": "`transition: color 0.15s ease-out` and the focus outline `2px` (86) are literals instead of --transition-duration/--transition-timing-function and a focus-width variable.",
|
|
1136
|
+
"severity": "low"
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
"component": "shortcut-recorder",
|
|
1140
|
+
"file": "src/components/shortcut-recorder/scss/variables.scss",
|
|
1141
|
+
"line": 26,
|
|
1142
|
+
"rule": "Variables: timing is always a --{name}-duration / --{name}-timing-function pair",
|
|
1143
|
+
"issue": "Uses --timing-function-out and --timing-function-spring instead of --transition-timing-function. In index.scss the animation durations are literals: 1.1s (38), 300ms (50, 54), 30ms stagger (54), 180ms (68).",
|
|
1144
|
+
"severity": "medium"
|
|
1145
|
+
},
|
|
1146
|
+
{
|
|
1147
|
+
"component": "shortcut-recorder",
|
|
1148
|
+
"file": "src/components/shortcut-recorder/scss/index.scss",
|
|
1149
|
+
"line": 38,
|
|
1150
|
+
"rule": "Keyframes: name after the class using them, or prefix with block/element path",
|
|
1151
|
+
"issue": "Keyframes leave out the element path. `shortcut-recorder-blink` is used by &-dot, `-enter`/`-settle` by &-key--enter/--settle, and `-fade` by &-placeholder--fade. They should be e.g. `shortcut-recorder-key--enter` or `shortcut-recorder-dot-blink`.",
|
|
1152
|
+
"severity": "low"
|
|
1153
|
+
},
|
|
1154
|
+
{
|
|
1155
|
+
"component": "shortcut-recorder",
|
|
1156
|
+
"file": "src/components/shortcut-recorder/scss/variables.scss",
|
|
1157
|
+
"line": 13,
|
|
1158
|
+
"rule": "Variables live on the selector that consumes them",
|
|
1159
|
+
"issue": "--color-dot, --color-muted and --font-size-small are defined on the block but consumed only by &-dot and &-placeholder.",
|
|
1160
|
+
"severity": "medium"
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
"component": "shortcut-recorder",
|
|
1164
|
+
"file": "src/components/shortcut-recorder/scss/index.scss",
|
|
1165
|
+
"line": 41,
|
|
1166
|
+
"rule": "index.scss: values come from var(--*), not literals",
|
|
1167
|
+
"issue": "The dot size `6px` (41-42) and the placeholder padding/gap derived from tokens (63-64) are not variables.",
|
|
1168
|
+
"severity": "low"
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
"component": "shortcut-recorder",
|
|
1172
|
+
"file": "src/components/shortcut-recorder/scss/index.scss",
|
|
1173
|
+
"line": 32,
|
|
1174
|
+
"rule": "Ordering: state selectors come after elements",
|
|
1175
|
+
"issue": "The `#{tokens.state(inactive)}:focus-visible` state rule comes before the &-dot/&-key/&-placeholder elements.",
|
|
1176
|
+
"severity": "low"
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
"component": "sortable",
|
|
1180
|
+
"file": "src/components/sortable/scss/variables.scss",
|
|
1181
|
+
"line": 4,
|
|
1182
|
+
"rule": "Variables live on the selector that consumes them, not on a parent with a prefix",
|
|
1183
|
+
"issue": "These prefixed variables sit on .sortable but are consumed by children: --drag-animation, --drag-scale and --drop-* by .sortable-drag; --overlay-transition-duration by .sortable-overlay; --placeholder-* by `> .sortable-item--held`.",
|
|
1184
|
+
"severity": "medium"
|
|
1185
|
+
},
|
|
1186
|
+
{
|
|
1187
|
+
"component": "sortable",
|
|
1188
|
+
"file": "src/components/sortable/scss/variables.scss",
|
|
1189
|
+
"line": 8,
|
|
1190
|
+
"rule": "Variables: timing is always a --{name}-duration / --{name}-timing-function pair",
|
|
1191
|
+
"issue": "--drop-easing and --shift-easing (15) should be --drop-timing-function and --shift-timing-function. In index.scss the drop transition also hard-codes `ease-out` and the 0.75/4 fractions (65, 67).",
|
|
1192
|
+
"severity": "medium"
|
|
1193
|
+
},
|
|
1194
|
+
{
|
|
1195
|
+
"component": "sortable",
|
|
1196
|
+
"file": "src/components/sortable/scss/variables.scss",
|
|
1197
|
+
"line": 52,
|
|
1198
|
+
"rule": "Ordering: modifiers (&--) before elements (&-)",
|
|
1199
|
+
"issue": "The &-drag element comes before the @each loops that generate the &--{swing}/&--{animation} modifiers.",
|
|
1200
|
+
"severity": "low"
|
|
1201
|
+
},
|
|
1202
|
+
{
|
|
1203
|
+
"component": "sortable",
|
|
1204
|
+
"file": "src/components/sortable/scss/index.scss",
|
|
1205
|
+
"line": 349,
|
|
1206
|
+
"rule": "SCSS style: nest @media inside the selector it affects",
|
|
1207
|
+
"issue": "A top-level `@media (prefers-reduced-motion) { .sortable-drag { ... } }` at the end of the file repeats the class name; it should be nested in &-drag.",
|
|
1208
|
+
"severity": "low"
|
|
1209
|
+
},
|
|
1210
|
+
{
|
|
1211
|
+
"component": "sortable",
|
|
1212
|
+
"file": "src/components/sortable/scss/index.scss",
|
|
1213
|
+
"line": 117,
|
|
1214
|
+
"rule": "SCSS style: build names with &- rather than repeating the block name",
|
|
1215
|
+
"issue": "`> .sortable-item--held` and `> .sortable-item--revealing` (136-137) hard-code the block name instead of `& > &-item--held`.",
|
|
1216
|
+
"severity": "low"
|
|
1217
|
+
},
|
|
1218
|
+
{
|
|
1219
|
+
"component": "sortable",
|
|
1220
|
+
"file": "src/components/sortable/index.ts",
|
|
1221
|
+
"line": 143,
|
|
1222
|
+
"rule": "TypeScript: don't manipulate the DOM directly",
|
|
1223
|
+
"issue": "`document.documentElement.classList.toggle('sortable-grabbing', ...)` toggles a root class by hand. The comment explains why CSS :has is avoided, but not why a template binding cannot do it.",
|
|
1224
|
+
"severity": "low"
|
|
1225
|
+
},
|
|
1226
|
+
{
|
|
1227
|
+
"component": "sticky-header",
|
|
1228
|
+
"file": "src/components/sticky-header/scss/variables.scss",
|
|
1229
|
+
"line": 26,
|
|
1230
|
+
"rule": "Variables live on the selector that consumes them",
|
|
1231
|
+
"issue": "--edge-shadow (used only by &-edge--shadow), --max-height (only &-scroll) and --padding-top (only &-before) are defined on the block rather than on the selectors that consume them.",
|
|
1232
|
+
"severity": "low"
|
|
1233
|
+
},
|
|
1234
|
+
{
|
|
1235
|
+
"component": "sticky-header",
|
|
1236
|
+
"file": "src/components/sticky-header/scss/index.scss",
|
|
1237
|
+
"line": 17,
|
|
1238
|
+
"rule": "index.scss: values come from var(--*), not literals",
|
|
1239
|
+
"issue": "Tunable literals in the logic: after-reveal travel 6px (17), fade thresholds 0.45 (37) and scale 0.05 (39), edge heights 1px (57, 62), scroll-padding offset 10px (81), focus tint 0.06 and inset 1px (85-86).",
|
|
1240
|
+
"severity": "low"
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
"component": "root",
|
|
1244
|
+
"file": "src/components/root/scss/variables.scss",
|
|
1245
|
+
"line": 43,
|
|
1246
|
+
"rule": "variables.scss holds only css variables",
|
|
1247
|
+
"issue": "`:where(:root) { color-scheme: light; }` is a property rule inside variables.scss; it belongs in index.scss.",
|
|
1248
|
+
"severity": "medium"
|
|
1249
|
+
},
|
|
1250
|
+
{
|
|
1251
|
+
"component": "root",
|
|
1252
|
+
"file": "src/components/root/scss/index.scss",
|
|
1253
|
+
"line": 85,
|
|
1254
|
+
"rule": "index.scss: values come from var(--*), not literals",
|
|
1255
|
+
"issue": "Sub/sup sizes and offsets are hard-coded: 0.64em (85), -0.48em (115, 124) and 0.8em (120) instead of variables.",
|
|
1256
|
+
"severity": "low"
|
|
1257
|
+
},
|
|
1258
|
+
{
|
|
1259
|
+
"component": "dock",
|
|
1260
|
+
"file": "src/components/dock/scss/variables.scss",
|
|
1261
|
+
"line": 39,
|
|
1262
|
+
"rule": "Variables: live on the consuming selector, not a parent with a prefix",
|
|
1263
|
+
"issue": "--icon-ratio is set on .dock and only consumed by .dock-button > svg / .dock-button > .icon (index.scss 172-173, variables.scss 186). This is the --icon-size anti-pattern; it should be --ratio (or --size) on the icon/button selector.",
|
|
1264
|
+
"severity": "high"
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
"component": "dock",
|
|
1268
|
+
"file": "src/components/dock/scss/variables.scss",
|
|
1269
|
+
"line": 44,
|
|
1270
|
+
"rule": "Variables: live on the consuming selector, not a parent with a prefix",
|
|
1271
|
+
"issue": "--item-align, --item-justify (44-45) and --item-radius (46, also in the squircle mixin line 22 and &--square line 93) are set on .dock and consumed by .dock-item (index.scss 178, 182) and .dock-button (variables.scss 157). They are prefixed parent variables reaching into children. Direction modifiers should set them as &--e &-item { --align ... } and so on.",
|
|
1272
|
+
"severity": "high"
|
|
1273
|
+
},
|
|
1274
|
+
{
|
|
1275
|
+
"component": "dock",
|
|
1276
|
+
"file": "src/components/dock/scss/variables.scss",
|
|
1277
|
+
"line": 47,
|
|
1278
|
+
"rule": "Variables: live on the consuming selector, not a parent with a prefix",
|
|
1279
|
+
"issue": "--light-color, --light-delay and --light-size are set on .dock but only consumed by .dock-light (index.scss 279-293, 30). They should be --background, --delay and --size on &-light.",
|
|
1280
|
+
"severity": "high"
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
"component": "dock",
|
|
1284
|
+
"file": "src/components/dock/scss/variables.scss",
|
|
1285
|
+
"line": 35,
|
|
1286
|
+
"rule": "Variables: live on the consuming selector, not a parent with a prefix",
|
|
1287
|
+
"issue": "The launch-animation variables --hop-duration, --hop-x, --hop-y, --squash and --origin, and --magnify-duration/--magnify-timing-function, are on .dock but consumed by .dock-button (index.scss 149-158). They are parent-level prefixed variables for a child's animation and transition.",
|
|
1288
|
+
"severity": "medium"
|
|
1289
|
+
},
|
|
1290
|
+
{
|
|
1291
|
+
"component": "dock",
|
|
1292
|
+
"file": "src/components/dock/scss/index.scss",
|
|
1293
|
+
"line": 290,
|
|
1294
|
+
"rule": "Variables: tunable values are variables; timing is a --transition-duration/--transition-timing-function pair",
|
|
1295
|
+
"issue": "The .dock-light transition hardcodes '0.15s cubic-bezier(0.23, 1, 0.32, 1)' twice (291-292), and the active state hardcodes 'transition-duration: 0.2s' (299). scale: 0.5 (287) is also a literal. These should use var(--transition-duration)/var(--transition-timing-function) defined in variables.scss.",
|
|
1296
|
+
"severity": "medium"
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
"component": "dock",
|
|
1300
|
+
"file": "src/components/dock/scss/index.scss",
|
|
1301
|
+
"line": 156,
|
|
1302
|
+
"rule": "Timing pair --{name}-duration / --{name}-timing-function; no literals in index.scss",
|
|
1303
|
+
"issue": "The launch animation uses 'dock-hop var(--hop-duration)' with no timing-function variable and 'var(--squash) var(--hop-duration) ease-in-out' with a literal easing. --hop-duration has no --hop-timing-function partner.",
|
|
1304
|
+
"severity": "medium"
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
"component": "dock",
|
|
1308
|
+
"file": "src/components/dock/scss/index.scss",
|
|
1309
|
+
"line": 317,
|
|
1310
|
+
"rule": "Keyframes: named after the class using them or prefixed with the block/element path; values from variables",
|
|
1311
|
+
"issue": "Keyframes dock-hop, dock-squash and dock-squash-upright are used only by .dock-button--launching but are not prefixed with the element path (dock-button-hop and so on). The hop distances 22px and 9px (324, 332) are hardcoded tunables.",
|
|
1312
|
+
"severity": "low"
|
|
1313
|
+
},
|
|
1314
|
+
{
|
|
1315
|
+
"component": "dock",
|
|
1316
|
+
"file": "src/components/dock/scss/index.scss",
|
|
1317
|
+
"line": 133,
|
|
1318
|
+
"rule": "index.scss values come from var(--*), not literals",
|
|
1319
|
+
"issue": "Focus outlines on &-arrow (133) and &-button (166) use a literal '2px solid var(--color)' instead of --focus-width/--focus-color variables. The light offsets use a literal '+ 4px' (22, 71, 80, 289), and padding/gap use raw tokens instead of component variables (90, 92, 216, 227, 229, 236, 265, 267).",
|
|
1320
|
+
"severity": "low"
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
"component": "dock",
|
|
1324
|
+
"file": "src/components/dock/scss/variables.scss",
|
|
1325
|
+
"line": 289,
|
|
1326
|
+
"rule": "Ordering: @media for the block itself goes in group 2, before modifiers",
|
|
1327
|
+
"issue": "The block-level @media (prefers-reduced-motion) sits at the end of .dock, after all modifiers and elements. In the button reference it comes right after pseudo-elements.",
|
|
1328
|
+
"severity": "low"
|
|
1329
|
+
},
|
|
1330
|
+
{
|
|
1331
|
+
"component": "dock",
|
|
1332
|
+
"file": "src/components/dock/scss/variables.scss",
|
|
1333
|
+
"line": 4,
|
|
1334
|
+
"rule": "variables.scss holds only css variables (plus themed %placeholder extends)",
|
|
1335
|
+
"issue": "variables.scss defines Sass $variables ($color-muted, $divider, $label-font-size) and @mixin plain / @mixin squircle (4-27) instead of only css custom properties.",
|
|
1336
|
+
"severity": "low"
|
|
1337
|
+
},
|
|
1338
|
+
{
|
|
1339
|
+
"component": "dock",
|
|
1340
|
+
"file": "src/components/dock/scss/variables.scss",
|
|
1341
|
+
"line": 80,
|
|
1342
|
+
"rule": "Naming: build names with &-/&-- nesting rather than repeating the block name",
|
|
1343
|
+
"issue": "'&--plain .dock-button' repeats the block name and should be '&--plain &-button'.",
|
|
1344
|
+
"severity": "low"
|
|
1345
|
+
},
|
|
1346
|
+
{
|
|
1347
|
+
"component": "dock",
|
|
1348
|
+
"file": "src/components/dock/scss/variables.scss",
|
|
1349
|
+
"line": 228,
|
|
1350
|
+
"rule": "Comments only for a non-obvious why; never misleading/restating",
|
|
1351
|
+
"issue": "The comment above &-launcher says \"The command palette's layout ... Doubled so it wins\". It was copied from command: this is the dock launcher and nothing here is a doubled selector.",
|
|
1352
|
+
"severity": "low"
|
|
1353
|
+
},
|
|
1354
|
+
{
|
|
1355
|
+
"component": "dock",
|
|
1356
|
+
"file": "src/components/dock/index.ts",
|
|
1357
|
+
"line": 394,
|
|
1358
|
+
"rule": "TS: don't manipulate the DOM directly when template/reactivity can do it",
|
|
1359
|
+
"issue": "Enter finds the selected app with grid.querySelector('.dock-app.--active') / ':not(.dock-app--hidden)' and then calls .click() on its button. The selected item is already in state (shown()[selected()]), so the launch logic could be called directly instead of round-tripping through the DOM. Line 377 also queries the grid via panel.querySelector instead of keeping a ref.",
|
|
1360
|
+
"severity": "medium"
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
"component": "dock",
|
|
1364
|
+
"file": "src/components/dock/index.ts",
|
|
1365
|
+
"line": 490,
|
|
1366
|
+
"rule": "TS: prefer template refs/lifecycle over manual DOM querying and manual cleanup",
|
|
1367
|
+
"issue": "onconnect gets track and viewport through element.querySelector(':scope > .dock-viewport > .dock-items') and parentElement instead of onconnect refs on those elements. It also creates a resize observer and disconnects it by hand in ondisconnect (494-502), and has to forward the popup's onconnect/ondisconnect manually (483, 501). Line 282 focuses the input through panel.querySelector('.dock-launcher-input') rather than a ref.",
|
|
1368
|
+
"severity": "low"
|
|
1369
|
+
},
|
|
1370
|
+
{
|
|
1371
|
+
"component": "dock",
|
|
1372
|
+
"file": "src/components/dock/index.ts",
|
|
1373
|
+
"line": 264,
|
|
1374
|
+
"rule": "TS: fine-grained reactivity",
|
|
1375
|
+
"issue": "Every launcher app's class binding runs shown()[selected()] === item. shown() filters the whole drawer, so each keystroke or arrow press re-filters the full list once per app (O(n^2)). A single selected-item signal with signal.selector would touch only the two affected nodes.",
|
|
1376
|
+
"severity": "low"
|
|
1377
|
+
},
|
|
1378
|
+
{
|
|
1379
|
+
"component": "color-picker",
|
|
1380
|
+
"file": "src/components/color-picker/index.ts",
|
|
1381
|
+
"line": 204,
|
|
1382
|
+
"rule": "TS: don't manipulate the DOM directly when template has a way (reactive value binding)",
|
|
1383
|
+
"issue": "The hex input is held as a DOM ref (parts.hex, set in onconnect at 568) and its value is written imperatively at 204, 215, 344, 569 and 582, with a document.activeElement check at 343. A reactive text state bound via value: () => ... (as command does with value: () => state.query) would replace this.",
|
|
1384
|
+
"severity": "medium"
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
"component": "color-picker",
|
|
1388
|
+
"file": "src/components/color-picker/index.ts",
|
|
1389
|
+
"line": 375,
|
|
1390
|
+
"rule": "TS: fine-grained reactivity; avoid unnecessary effects",
|
|
1391
|
+
"issue": "The alpha/hue channel state duplicates color.a/color.h and is kept in sync two ways: three effects (375, 381, 387) write color from the channels, and sync() (339-340) writes the channels back from color. The value lives in two reactive stores glued by effects instead of one source.",
|
|
1392
|
+
"severity": "low"
|
|
1393
|
+
},
|
|
1394
|
+
{
|
|
1395
|
+
"component": "color-picker",
|
|
1396
|
+
"file": "src/components/color-picker/scss/index.scss",
|
|
1397
|
+
"line": 56,
|
|
1398
|
+
"rule": "SCSS nesting / naming: build names with & nesting",
|
|
1399
|
+
"issue": "'.color { &-picker-channel {...} &-picker-copy {...} }' builds descendant names by nesting under a fragment of the block name ('.color'). It should be '& &-channel' / '& &-copy', as variables.scss does at lines 72 and 118.",
|
|
1400
|
+
"severity": "medium"
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
"component": "color-picker",
|
|
1404
|
+
"file": "src/components/color-picker/scss/index.scss",
|
|
1405
|
+
"line": 244,
|
|
1406
|
+
"rule": "Ordering: modifiers (&--*) come before elements (&-*); descendant selectors last",
|
|
1407
|
+
"issue": "The modifier rule '&#{&}--compact .color-picker-channel' is placed after all elements, at the end of the block. The '.color { ... }' descendant block (56-94) sits in the middle of the element list, between &-fields and &-field > &-hex.",
|
|
1408
|
+
"severity": "low"
|
|
1409
|
+
},
|
|
1410
|
+
{
|
|
1411
|
+
"component": "color-picker",
|
|
1412
|
+
"file": "src/components/color-picker/scss/index.scss",
|
|
1413
|
+
"line": 263,
|
|
1414
|
+
"rule": "Ordering: @media for the block goes in group 2",
|
|
1415
|
+
"issue": "The reduced-motion @media is at the end of .color-picker instead of after the block's properties. It also repeats the block name ('.color-picker-channel', 268) instead of '& &-channel'.",
|
|
1416
|
+
"severity": "low"
|
|
1417
|
+
},
|
|
1418
|
+
{
|
|
1419
|
+
"component": "color-picker",
|
|
1420
|
+
"file": "src/components/color-picker/scss/index.scss",
|
|
1421
|
+
"line": 194,
|
|
1422
|
+
"rule": "Ordering within a block: pseudo elements before modifiers",
|
|
1423
|
+
"issue": "In &-swatch, the modifier &--leaving (194) comes before the pseudo-element &::after (201).",
|
|
1424
|
+
"severity": "low"
|
|
1425
|
+
},
|
|
1426
|
+
{
|
|
1427
|
+
"component": "color-picker",
|
|
1428
|
+
"file": "src/components/color-picker/scss/index.scss",
|
|
1429
|
+
"line": 195,
|
|
1430
|
+
"rule": "Keyframes named after the class using them; timing pair --{name}-duration/--{name}-timing-function",
|
|
1431
|
+
"issue": "Keyframes 'color-picker-swatch-leave' are used by .color-picker-swatch--leaving and should be named color-picker-swatch--leaving. The animation reads bare --duration/--easing (set at variables.scss 197-198) instead of --{name}-duration/--{name}-timing-function. Likewise --enter-easing and --shift-easing (variables.scss 207, 210) use '-easing' rather than '-timing-function'.",
|
|
1432
|
+
"severity": "low"
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
"component": "color-picker",
|
|
1436
|
+
"file": "src/components/color-picker/scss/index.scss",
|
|
1437
|
+
"line": 83,
|
|
1438
|
+
"rule": "index.scss values come from var(--*), not literals",
|
|
1439
|
+
"issue": "Literal tunables in the logic: 'outline-offset: 1px' (83), 'outline-offset: -1px' (115), 'border-top: 1px solid' (153), plus raw token gaps/margins (41, 104, 159, 168, 216) instead of component variables.",
|
|
1440
|
+
"severity": "low"
|
|
1441
|
+
},
|
|
1442
|
+
{
|
|
1443
|
+
"component": "color-picker",
|
|
1444
|
+
"file": "src/components/color-picker/scss/index.scss",
|
|
1445
|
+
"line": 223,
|
|
1446
|
+
"rule": "Variables: split multi-value properties",
|
|
1447
|
+
"issue": "&-thumb uses a single shorthand 'border: var(--border)', with --border set to '2px solid white' at variables.scss 215, instead of separate --border-width/--border-color variables.",
|
|
1448
|
+
"severity": "low"
|
|
1449
|
+
},
|
|
1450
|
+
{
|
|
1451
|
+
"component": "color-picker",
|
|
1452
|
+
"file": "src/components/color-picker/scss/variables.scss",
|
|
1453
|
+
"line": 5,
|
|
1454
|
+
"rule": "variables.scss holds only css variables",
|
|
1455
|
+
"issue": "Lines 5-19 define Sass $variables ($checker, $control-height, $thumb-shadow, ...) holding literal values (36px, 2px, 1px, 8px), instead of css variables only.",
|
|
1456
|
+
"severity": "low"
|
|
1457
|
+
},
|
|
1458
|
+
{
|
|
1459
|
+
"component": "color-picker",
|
|
1460
|
+
"file": "src/components/color-picker/scss/variables.scss",
|
|
1461
|
+
"line": 142,
|
|
1462
|
+
"rule": "Ordering: selectors alphabetical",
|
|
1463
|
+
"issue": "Element rules are out of order: '&--compact &-thumb' (142) sits between pad (138) and icon (147), and &-icon.icon (147) comes after the first &-pad rule (138) although 'icon' sorts before 'pad'. '&--compact &-recent' (39) is grouped with the modifiers, while '&--compact &-pad' and '&--compact &-thumb' are grouped with the elements.",
|
|
1464
|
+
"severity": "low"
|
|
1465
|
+
},
|
|
1466
|
+
{
|
|
1467
|
+
"component": "color-picker",
|
|
1468
|
+
"file": "src/components/color-picker/scss/variables.scss",
|
|
1469
|
+
"line": 225,
|
|
1470
|
+
"rule": "Ordering: @media for the block goes in group 2",
|
|
1471
|
+
"issue": "The block-level reduced-motion @media is placed at the end of .color-picker, after the elements.",
|
|
1472
|
+
"severity": "low"
|
|
1473
|
+
},
|
|
1474
|
+
{
|
|
1475
|
+
"component": "counter",
|
|
1476
|
+
"file": "src/components/counter/index.ts",
|
|
1477
|
+
"line": 26,
|
|
1478
|
+
"rule": "TS: build components with @esportsplus/template component()",
|
|
1479
|
+
"issue": "The default export is a plain arrow function rather than component(...), unlike every other component (button, color-picker, datalist, dock).",
|
|
1480
|
+
"severity": "medium"
|
|
1481
|
+
},
|
|
1482
|
+
{
|
|
1483
|
+
"component": "counter",
|
|
1484
|
+
"file": "src/components/counter/scss/variables.scss",
|
|
1485
|
+
"line": 9,
|
|
1486
|
+
"rule": "Variables: live on the consuming selector, not a parent with a prefix",
|
|
1487
|
+
"issue": "--roll-1-animation and --roll-2-animation (9-10, set by &--blur at 17-18) and --blur, --stagger and --timing-function are on .counter but consumed only by .counter-character-track(--roll-N) (index.scss 32, 39, keyframes 77/87). These are prefixed parent variables reaching into the child.",
|
|
1488
|
+
"severity": "medium"
|
|
1489
|
+
},
|
|
1490
|
+
{
|
|
1491
|
+
"component": "counter",
|
|
1492
|
+
"file": "src/components/counter/scss/index.scss",
|
|
1493
|
+
"line": 32,
|
|
1494
|
+
"rule": "Timing is always a --transition-duration + --transition-timing-function pair",
|
|
1495
|
+
"issue": "The track transition pairs --transition-duration with a bare --timing-function (defined at variables.scss 13 and in the modifiers). The roll animation (39) reuses --transition-duration with a literal 'ease-out' instead of --{name}-duration/--{name}-timing-function. The block transition (9) passes --transition-duration as the delay and has no timing-function at all.",
|
|
1496
|
+
"severity": "medium"
|
|
1497
|
+
},
|
|
1498
|
+
{
|
|
1499
|
+
"component": "counter",
|
|
1500
|
+
"file": "src/components/counter/scss/index.scss",
|
|
1501
|
+
"line": 7,
|
|
1502
|
+
"rule": "Variables: per-axis gap variables; variants are variable overrides",
|
|
1503
|
+
"issue": "The block hardcodes 'gap: calc(var(--size-100) / 4)' with no --gap-horizontal/--gap-vertical variables, and &--ticker overrides it with a rule ('gap: 0', line 12) in index.scss instead of a variable override in variables.scss. 'margin-inline-end: 0.1ch' (25) is also a literal.",
|
|
1504
|
+
"severity": "medium"
|
|
1505
|
+
},
|
|
1506
|
+
{
|
|
1507
|
+
"component": "counter",
|
|
1508
|
+
"file": "src/components/counter/scss/index.scss",
|
|
1509
|
+
"line": 63,
|
|
1510
|
+
"rule": "Ordering: @media for the block goes in group 2",
|
|
1511
|
+
"issue": "The block-level reduced-motion @media is at the end of .counter, after the elements.",
|
|
1512
|
+
"severity": "low"
|
|
1513
|
+
},
|
|
1514
|
+
{
|
|
1515
|
+
"component": "counter",
|
|
1516
|
+
"file": "src/components/counter/scss/index.scss",
|
|
1517
|
+
"line": 71,
|
|
1518
|
+
"rule": "Keyframes: named after the class or prefixed with block/element path",
|
|
1519
|
+
"issue": "counter-blur-1/counter-blur-2 are used by .counter-character-track--roll-1/2, so they should carry the element path (e.g. counter-character-track--roll-1 or counter-character-track-blur-1).",
|
|
1520
|
+
"severity": "low"
|
|
1521
|
+
},
|
|
1522
|
+
{
|
|
1523
|
+
"component": "checkbox",
|
|
1524
|
+
"file": "src/components/checkbox/index.ts",
|
|
1525
|
+
"line": 1,
|
|
1526
|
+
"rule": "Directory structure: index.ts barrel imports sub-components alphabetically, then './scss/index.scss', and exports a typed object",
|
|
1527
|
+
"issue": "index.ts only re-exports options.checkbox, and './scss/index.scss' is imported from options.ts (line 7) instead of the barrel. group/options are not exposed as a typed object.",
|
|
1528
|
+
"severity": "medium"
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
"component": "checkbox",
|
|
1532
|
+
"file": "src/components/checkbox/scss/variables.scss",
|
|
1533
|
+
"line": 24,
|
|
1534
|
+
"rule": "Variables: live on the consuming selector, not a parent with a prefix",
|
|
1535
|
+
"issue": "--check-linecap, --check-linejoin, --check-offset, --check-size, --check-stroke-width and --check-timing-function (24-29), and --dash-offset (30), are on .checkbox but consumed only by .checkbox-check / .checkbox-group-dash and their svg (index.scss 127-153). This is the --icon-size anti-pattern.",
|
|
1536
|
+
"severity": "medium"
|
|
1537
|
+
},
|
|
1538
|
+
{
|
|
1539
|
+
"component": "checkbox",
|
|
1540
|
+
"file": "src/components/checkbox/scss/variables.scss",
|
|
1541
|
+
"line": 93,
|
|
1542
|
+
"rule": "Variables: live on the consuming selector",
|
|
1543
|
+
"issue": "&-group sets --border-color and --color-muted, which are consumed by its children .checkbox-group-hint-key (index.scss 91), -counter (70) and -hint (85), not by the group itself.",
|
|
1544
|
+
"severity": "low"
|
|
1545
|
+
},
|
|
1546
|
+
{
|
|
1547
|
+
"component": "checkbox",
|
|
1548
|
+
"file": "src/components/checkbox/scss/index.scss",
|
|
1549
|
+
"line": 91,
|
|
1550
|
+
"rule": "index.scss values come from var(--*); split padding into per-axis variables",
|
|
1551
|
+
"issue": "&-group-hint-key hardcodes 'border: 1px solid' and a shorthand 'padding: 1px calc(var(--size-100) / 2)' (95) instead of --border-width and --padding-horizontal/--padding-vertical. '.checkbox-check { left: 1px }' (124) is also a literal.",
|
|
1552
|
+
"severity": "low"
|
|
1553
|
+
},
|
|
1554
|
+
{
|
|
1555
|
+
"component": "checkbox",
|
|
1556
|
+
"file": "src/components/checkbox/scss/index.scss",
|
|
1557
|
+
"line": 148,
|
|
1558
|
+
"rule": "Timing is always a pair --{name}-duration + --{name}-timing-function",
|
|
1559
|
+
"issue": "The check/dash stroke transition mixes the global --transition-duration with --check-timing-function. There is no --check-duration partner (variables.scss 29).",
|
|
1560
|
+
"severity": "low"
|
|
1561
|
+
},
|
|
1562
|
+
{
|
|
1563
|
+
"component": "checkbox",
|
|
1564
|
+
"file": "src/components/checkbox/scss/index.scss",
|
|
1565
|
+
"line": 156,
|
|
1566
|
+
"rule": "Ordering: @media for the block goes in group 2",
|
|
1567
|
+
"issue": "The block-level reduced-motion @media is at the end of .checkbox, after modifiers, elements and descendant selectors.",
|
|
1568
|
+
"severity": "low"
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
"component": "command",
|
|
1572
|
+
"file": "src/components/command/index.ts",
|
|
1573
|
+
"line": 897,
|
|
1574
|
+
"rule": "Directory structure: index.ts is a barrel exporting a typed object of sub-components",
|
|
1575
|
+
"issue": "index.ts holds the full palette implementation and attaches the search.ts sub-component as a named export ('export { search }'). The convention is a barrel that imports sub-components and exports a typed object.",
|
|
1576
|
+
"severity": "low"
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
"component": "command",
|
|
1580
|
+
"file": "src/components/command/scss/index.scss",
|
|
1581
|
+
"line": 226,
|
|
1582
|
+
"rule": "Ordering: @media for the block goes in group 2",
|
|
1583
|
+
"issue": "The block-level reduced-motion @media is at the end of .command, after all elements (the same applies in variables.scss line 191).",
|
|
1584
|
+
"severity": "low"
|
|
1585
|
+
},
|
|
1586
|
+
{
|
|
1587
|
+
"component": "command",
|
|
1588
|
+
"file": "src/components/command/scss/index.scss",
|
|
1589
|
+
"line": 113,
|
|
1590
|
+
"rule": "index.scss values come from var(--*), not literals",
|
|
1591
|
+
"issue": "&-list padding adds a literal '+ 2px' (also duplicated as '+ 2px' at variables.scss 149). &-empty uses shorthand 'padding: var(--size-700) var(--size-400)' (45), and gaps/paddings use raw tokens (55, 57, 63, 96, 130, 132, 151, 153). &-trigger:focus-visible hardcodes 'var(--border-width-500) solid var(--color-primary-500)' (188-189) instead of --focus-* variables.",
|
|
1592
|
+
"severity": "low"
|
|
1593
|
+
},
|
|
1594
|
+
{
|
|
1595
|
+
"component": "command",
|
|
1596
|
+
"file": "src/components/command/scss/variables.scss",
|
|
1597
|
+
"line": 4,
|
|
1598
|
+
"rule": "variables.scss holds only css variables",
|
|
1599
|
+
"issue": "Defines Sass $variables ($color-muted, $divider, $label-font-size, $list-height with the literal 'min(320px, 50vh)') instead of css variables only.",
|
|
1600
|
+
"severity": "low"
|
|
1601
|
+
},
|
|
1602
|
+
{
|
|
1603
|
+
"component": "command",
|
|
1604
|
+
"file": "src/components/command/scss/index.scss",
|
|
1605
|
+
"line": 162,
|
|
1606
|
+
"rule": "Variables: split multi-value properties",
|
|
1607
|
+
"issue": "Borders use a single shorthand variable --border (= width style color, variables.scss 146/186) via 'border-top: var(--border)' (162, 217) instead of separate width/color variables.",
|
|
1608
|
+
"severity": "low"
|
|
1609
|
+
},
|
|
1610
|
+
{
|
|
1611
|
+
"component": "datalist",
|
|
1612
|
+
"file": "src/components/datalist/scss/variables.scss",
|
|
1613
|
+
"line": 12,
|
|
1614
|
+
"rule": "Variables: live on the consuming selector, not a parent with a prefix",
|
|
1615
|
+
"issue": "--item-height (12), --opacity-falloff, --rotate, --scale and --scale-falloff (13-19) are set on .datalist but consumed by .datalist-option, -lens and -track (index.scss 17, 29, 31-33, 81, keyframes). --item-height is a prefixed parent variable reaching into children.",
|
|
1616
|
+
"severity": "medium"
|
|
1617
|
+
},
|
|
1618
|
+
{
|
|
1619
|
+
"component": "datalist",
|
|
1620
|
+
"file": "src/components/datalist/scss/index.scss",
|
|
1621
|
+
"line": 56,
|
|
1622
|
+
"rule": "index.scss values come from var(--*), not literals",
|
|
1623
|
+
"issue": "The scroller mask hardcodes its fade stops 'transparent 0, #000 30%, #000 70%, transparent 100%', which are tunable values.",
|
|
1624
|
+
"severity": "low"
|
|
1625
|
+
},
|
|
1626
|
+
{
|
|
1627
|
+
"component": "datalist",
|
|
1628
|
+
"file": "src/components/datalist/scss/index.scss",
|
|
1629
|
+
"line": 85,
|
|
1630
|
+
"rule": "Keyframes: named after the class or prefixed with block/element path",
|
|
1631
|
+
"issue": "'datalist-drum' is used by .datalist-option and should carry the element path (datalist-option-drum).",
|
|
1632
|
+
"severity": "low"
|
|
1633
|
+
},
|
|
1634
|
+
{
|
|
1635
|
+
"component": "clipboard",
|
|
1636
|
+
"file": "src/components/clipboard/index.ts",
|
|
1637
|
+
"line": 4,
|
|
1638
|
+
"rule": "Directory structure: index.ts exports a typed object",
|
|
1639
|
+
"issue": "The barrel exports an untyped object literal ('export default { write }') plus a redundant named export, instead of 'const clipboard: { write: typeof write } = { write }; export default clipboard;'.",
|
|
1640
|
+
"severity": "low"
|
|
1641
|
+
},
|
|
1642
|
+
{
|
|
1643
|
+
"component": "notification",
|
|
1644
|
+
"file": "src/components/notification/scss/index.scss",
|
|
1645
|
+
"line": 19,
|
|
1646
|
+
"rule": "index.scss vs variables.scss / Variables (per-axis split)",
|
|
1647
|
+
"issue": "`padding: calc(var(--size) * 0.25)` hard-codes a literal ratio in a single shorthand padding. It should be --padding-horizontal/--padding-vertical set in variables.scss.",
|
|
1648
|
+
"severity": "medium"
|
|
1649
|
+
},
|
|
1650
|
+
{
|
|
1651
|
+
"component": "notification",
|
|
1652
|
+
"file": "src/components/notification/scss/variables.scss",
|
|
1653
|
+
"line": 12,
|
|
1654
|
+
"rule": "Variables: timing is always a pair --transition-duration + --transition-timing-function",
|
|
1655
|
+
"issue": "Uses `--timing-function` (consumed at index.scss:22) instead of `--transition-timing-function`.",
|
|
1656
|
+
"severity": "medium"
|
|
1657
|
+
},
|
|
1658
|
+
{
|
|
1659
|
+
"component": "notification",
|
|
1660
|
+
"file": "src/components/notification/scss/variables.scss",
|
|
1661
|
+
"line": 4,
|
|
1662
|
+
"rule": "Variables live on the selector that consumes them",
|
|
1663
|
+
"issue": "`--dot-size` is set on .notification but only consumed by `&--dot`. It should be `--size` overridden on `.notification--dot`.",
|
|
1664
|
+
"severity": "medium"
|
|
1665
|
+
},
|
|
1666
|
+
{
|
|
1667
|
+
"component": "notification",
|
|
1668
|
+
"file": "src/components/notification/scss/variables.scss",
|
|
1669
|
+
"line": 9,
|
|
1670
|
+
"rule": "Variables live on the selector that consumes them",
|
|
1671
|
+
"issue": "`--roll-duration`/`--roll-timing-function` are set on .notification with a prefix but consumed only by `.notification-character-track`. They should be --transition-duration/--transition-timing-function on `&-character-track`.",
|
|
1672
|
+
"severity": "medium"
|
|
1673
|
+
},
|
|
1674
|
+
{
|
|
1675
|
+
"component": "notification",
|
|
1676
|
+
"file": "src/components/notification/scss/variables.scss",
|
|
1677
|
+
"line": 25,
|
|
1678
|
+
"rule": "Variables live on the selector that consumes them",
|
|
1679
|
+
"issue": "`--ring-angle`, `--ring-animation-name` and `--ring-duration` are set on `.notification-bell`, but the animation that uses them is on `&-bell-icon.icon` (index.scss:68). The ring modifiers pass them down through the parent with a prefix.",
|
|
1680
|
+
"severity": "medium"
|
|
1681
|
+
},
|
|
1682
|
+
{
|
|
1683
|
+
"component": "notification",
|
|
1684
|
+
"file": "src/components/notification/scss/index.scss",
|
|
1685
|
+
"line": 68,
|
|
1686
|
+
"rule": "index.scss values come from var(--*), not literals; timing pair",
|
|
1687
|
+
"issue": "The ring animation hard-codes `ease-in-out` as its timing function (there is no --ring-timing-function), and `transform-origin: 50% 8%` is a literal.",
|
|
1688
|
+
"severity": "medium"
|
|
1689
|
+
},
|
|
1690
|
+
{
|
|
1691
|
+
"component": "notification",
|
|
1692
|
+
"file": "src/components/notification/scss/index.scss",
|
|
1693
|
+
"line": 53,
|
|
1694
|
+
"rule": "Ordering: block @media belongs in group 2, before modifiers/elements",
|
|
1695
|
+
"issue": "The block's `@media (prefers-reduced-motion)` comes after `&--dot` and `&-character`, between elements.",
|
|
1696
|
+
"severity": "low"
|
|
1697
|
+
},
|
|
1698
|
+
{
|
|
1699
|
+
"component": "notification",
|
|
1700
|
+
"file": "src/components/notification/scss/index.scss",
|
|
1701
|
+
"line": 60,
|
|
1702
|
+
"rule": "Ordering: elements alphabetical",
|
|
1703
|
+
"issue": "`&-bell` comes after `&-character` (line 35). Alphabetically, bell must come before character.",
|
|
1704
|
+
"severity": "low"
|
|
1705
|
+
},
|
|
1706
|
+
{
|
|
1707
|
+
"component": "notification",
|
|
1708
|
+
"file": "src/components/notification/scss/index.scss",
|
|
1709
|
+
"line": 89,
|
|
1710
|
+
"rule": "Ordering: @media in group 2, before elements/state selectors",
|
|
1711
|
+
"issue": "Inside `&-bell`, the reduced-motion @media comes last, after the `&-icon.icon` element, `&:focus-visible` and the `.notification` descendant.",
|
|
1712
|
+
"severity": "low"
|
|
1713
|
+
},
|
|
1714
|
+
{
|
|
1715
|
+
"component": "notification",
|
|
1716
|
+
"file": "src/components/notification/scss/index.scss",
|
|
1717
|
+
"line": 103,
|
|
1718
|
+
"rule": "Keyframes named after the class using them",
|
|
1719
|
+
"issue": "The keyframes `notification-bell-ring-#{$i}` are applied by the class `.notification-bell--ring-#{$i}`, so they should be named `notification-bell--ring-#{$i}`.",
|
|
1720
|
+
"severity": "low"
|
|
1721
|
+
},
|
|
1722
|
+
{
|
|
1723
|
+
"component": "notification",
|
|
1724
|
+
"file": "src/components/notification/scss/variables.scss",
|
|
1725
|
+
"line": 44,
|
|
1726
|
+
"rule": "Comments only for a non-obvious why / never restate",
|
|
1727
|
+
"issue": "The comment refers to a `--badge-size` hand-off that does not exist; the block sets `--size` directly. The comment is stale and misleading.",
|
|
1728
|
+
"severity": "low"
|
|
1729
|
+
},
|
|
1730
|
+
{
|
|
1731
|
+
"component": "notification",
|
|
1732
|
+
"file": "src/components/notification/index.ts",
|
|
1733
|
+
"line": 12,
|
|
1734
|
+
"rule": "Directory structure: index.ts is a barrel exporting a typed object",
|
|
1735
|
+
"issue": "The component is implemented inline in index.ts and exported as a bare function, not as a typed barrel object.",
|
|
1736
|
+
"severity": "low"
|
|
1737
|
+
},
|
|
1738
|
+
{
|
|
1739
|
+
"component": "overlay",
|
|
1740
|
+
"file": "src/components/overlay/index.ts",
|
|
1741
|
+
"line": 143,
|
|
1742
|
+
"rule": "TypeScript: don't manipulate the DOM directly when template can",
|
|
1743
|
+
"issue": "restack() toggles `overlay--covered`, `overlay--tracking` and `overlay--stacked` with classList (lines 143, 144, 162, 192) and writes `--depth` via style. Each layer could hold reactive state bound through `class: () => ...`/`style` in the dialog's attribute object. No comment explains why raw DOM is needed.",
|
|
1744
|
+
"severity": "medium"
|
|
1745
|
+
},
|
|
1746
|
+
{
|
|
1747
|
+
"component": "overlay",
|
|
1748
|
+
"file": "src/components/overlay/index.ts",
|
|
1749
|
+
"line": 100,
|
|
1750
|
+
"rule": "TypeScript: don't manipulate the DOM directly when template can",
|
|
1751
|
+
"issue": "measure() uses `classList.toggle('overlay--scrollable')`. The measurement is legitimately raw, but the class could be a reactive flag bound via `class: () => ...`.",
|
|
1752
|
+
"severity": "medium"
|
|
1753
|
+
},
|
|
1754
|
+
{
|
|
1755
|
+
"component": "overlay",
|
|
1756
|
+
"file": "src/components/overlay/index.ts",
|
|
1757
|
+
"line": 313,
|
|
1758
|
+
"rule": "TypeScript: don't manipulate the DOM directly when template can",
|
|
1759
|
+
"issue": "The drag capture/settle code adds and removes `overlay--dragging`/`overlay--edge-fill` with classList (lines 222, 277, 283, 313, 340) and writes many custom properties with style.setProperty/removeProperty (lines 229-234, 339; reset() lines 120-128). Bound reactive class/style would avoid the manual cleanup in reset().",
|
|
1760
|
+
"severity": "medium"
|
|
1761
|
+
},
|
|
1762
|
+
{
|
|
1763
|
+
"component": "overlay",
|
|
1764
|
+
"file": "src/components/overlay/scss/variables.scss",
|
|
1765
|
+
"line": 13,
|
|
1766
|
+
"rule": "Variables live on the selector that consumes them",
|
|
1767
|
+
"issue": "`--handle-color`, `--handle-length`, `--handle-offset` and `--handle-thickness` are set on `.overlay` with a prefix but consumed only by `.overlay-handle`. They should be unprefixed variables on `&-handle`.",
|
|
1768
|
+
"severity": "medium"
|
|
1769
|
+
},
|
|
1770
|
+
{
|
|
1771
|
+
"component": "overlay",
|
|
1772
|
+
"file": "src/components/overlay/scss/index.scss",
|
|
1773
|
+
"line": 301,
|
|
1774
|
+
"rule": "Ordering: block @media in group 2; modifiers before elements; state selectors last",
|
|
1775
|
+
"issue": "The block's reduced-motion @media comes after modifiers, after `&-handle` and after the chained `&.overlay--*` rules. `&-page` (line 324) is split away from `&-handle`. The chained modifier rules (`&.overlay--covered` ... `&.overlay--stacked`, lines 214-298) come after an element and repeat the block name.",
|
|
1776
|
+
"severity": "low"
|
|
1777
|
+
},
|
|
1778
|
+
{
|
|
1779
|
+
"component": "overlay",
|
|
1780
|
+
"file": "src/components/overlay/scss/index.scss",
|
|
1781
|
+
"line": 302,
|
|
1782
|
+
"rule": "variables.scss holds css variables only / index.scss holds logic",
|
|
1783
|
+
"issue": "The reduced-motion overrides `--opacity`, `--scale` and `--translate` are declared in index.scss. They belong in variables.scss, as with `--fling-duration`.",
|
|
1784
|
+
"severity": "low"
|
|
1785
|
+
},
|
|
1786
|
+
{
|
|
1787
|
+
"component": "overlay",
|
|
1788
|
+
"file": "src/components/overlay/scss/index.scss",
|
|
1789
|
+
"line": 150,
|
|
1790
|
+
"rule": "Ordering: alphabetize selectors",
|
|
1791
|
+
"issue": "The selector list `&--w, &--nw, &--sw` is not alphabetical; it should be `&--nw, &--sw, &--w`.",
|
|
1792
|
+
"severity": "low"
|
|
1793
|
+
},
|
|
1794
|
+
{
|
|
1795
|
+
"component": "overlay",
|
|
1796
|
+
"file": "src/components/overlay/scss/variables.scss",
|
|
1797
|
+
"line": 85,
|
|
1798
|
+
"rule": "Naming: states use tokens.state(...) mixin, not hand-written state classes",
|
|
1799
|
+
"issue": "`&:where(:not(.--active))` hand-writes the inactive state instead of using `tokens.state(inactive)`. index.scss uses the mixin for the same state.",
|
|
1800
|
+
"severity": "low"
|
|
1801
|
+
},
|
|
1802
|
+
{
|
|
1803
|
+
"component": "progress",
|
|
1804
|
+
"file": "src/components/progress/scss/variables.scss",
|
|
1805
|
+
"line": 3,
|
|
1806
|
+
"rule": "Variables live on the selector that consumes them",
|
|
1807
|
+
"issue": "`--duration`, `--ease`, `--height`, `--indicator-color`, `--muted-color`, `--status-font-size` and `--track-color` are set on `.progress` but consumed by `&-indicator`, `&-track`, `&-percent` and `&-status`. Many carry consumer prefixes passed down from the parent.",
|
|
1808
|
+
"severity": "medium"
|
|
1809
|
+
},
|
|
1810
|
+
{
|
|
1811
|
+
"component": "progress",
|
|
1812
|
+
"file": "src/components/progress/scss/variables.scss",
|
|
1813
|
+
"line": 3,
|
|
1814
|
+
"rule": "Variables: timing is always a pair --transition-duration + --transition-timing-function",
|
|
1815
|
+
"issue": "Uses `--duration`/`--ease` (and `--ease-in-out`/`--ease-out` at lines 18-19, `--check-duration` without a timing function at line 14) instead of `--transition-duration`/`--transition-timing-function` pairs.",
|
|
1816
|
+
"severity": "medium"
|
|
1817
|
+
},
|
|
1818
|
+
{
|
|
1819
|
+
"component": "progress",
|
|
1820
|
+
"file": "src/components/progress/scss/variables.scss",
|
|
1821
|
+
"line": 14,
|
|
1822
|
+
"rule": "Variables live on the selector that consumes them",
|
|
1823
|
+
"issue": "`--check-duration`, `--check-offset` and `--check-size` are set on `.progress-text` and toggled by `&--done`, but consumed by `&-check(.icon)`. `--track-color` and `--muted-color` (lines 22, 28) are likewise passed down to `&-track`/`&-percent`.",
|
|
1824
|
+
"severity": "medium"
|
|
1825
|
+
},
|
|
1826
|
+
{
|
|
1827
|
+
"component": "progress",
|
|
1828
|
+
"file": "src/components/progress/scss/index.scss",
|
|
1829
|
+
"line": 82,
|
|
1830
|
+
"rule": "index.scss values come from var(--*), not literals",
|
|
1831
|
+
"issue": "The progress-text transitions hard-code durations and delays: 150ms (lines 82-84), 300ms/100ms (lines 93-95, 108-110, 130-131, 156), 200ms (lines 116, 136) and 150ms (line 70). The offsets `translate: 0 4px`/`-4px` (lines 85, 117), `stroke-width: 3` (line 69) and `border-radius: 999px` (line 40) are also literals.",
|
|
1832
|
+
"severity": "medium"
|
|
1833
|
+
},
|
|
1834
|
+
{
|
|
1835
|
+
"component": "progress",
|
|
1836
|
+
"file": "src/components/progress/scss/index.scss",
|
|
1837
|
+
"line": 11,
|
|
1838
|
+
"rule": "Variables: per-axis gap; values from var(--*)",
|
|
1839
|
+
"issue": "`.progress` uses `gap: var(--size-100)` directly, with no `--gap-vertical`/`--gap-horizontal` variables.",
|
|
1840
|
+
"severity": "low"
|
|
1841
|
+
},
|
|
1842
|
+
{
|
|
1843
|
+
"component": "progress",
|
|
1844
|
+
"file": "src/components/progress/scss/index.scss",
|
|
1845
|
+
"line": 55,
|
|
1846
|
+
"rule": "Ordering: elements alphabetical; block @media in group 2",
|
|
1847
|
+
"issue": "`&-text` comes after `&-track`, and the block's reduced-motion @media (line 47) sits between elements. Inside `&-text`, the @media (line 168) comes last, after all elements.",
|
|
1848
|
+
"severity": "low"
|
|
1849
|
+
},
|
|
1850
|
+
{
|
|
1851
|
+
"component": "progress",
|
|
1852
|
+
"file": "src/components/progress/scss/index.scss",
|
|
1853
|
+
"line": 88,
|
|
1854
|
+
"rule": "Naming: states use tokens.state(...) mixin, not hand-written state classes",
|
|
1855
|
+
"issue": "`&.--done` (lines 88, 113, 133, 175) hand-writes a `--done` state class that text.ts toggles on each child. It should go through the state mixin or the existing `.progress-text--done` block modifier.",
|
|
1856
|
+
"severity": "low"
|
|
1857
|
+
},
|
|
1858
|
+
{
|
|
1859
|
+
"component": "progress",
|
|
1860
|
+
"file": "src/components/progress/scss/variables.scss",
|
|
1861
|
+
"line": 22,
|
|
1862
|
+
"rule": "Ordering: variables alphabetical",
|
|
1863
|
+
"issue": "`--muted-color` is declared before `--gap-horizontal`/`--gap-vertical`.",
|
|
1864
|
+
"severity": "low"
|
|
1865
|
+
},
|
|
1866
|
+
{
|
|
1867
|
+
"component": "progress",
|
|
1868
|
+
"file": "src/components/progress/index.ts",
|
|
1869
|
+
"line": 62,
|
|
1870
|
+
"rule": "Directory structure: index.ts is a barrel exporting a typed object",
|
|
1871
|
+
"issue": "The bar component is implemented in index.ts and exported via `Object.assign(bar, { text })` instead of the `const x: {...} = {...}` barrel shape.",
|
|
1872
|
+
"severity": "low"
|
|
1873
|
+
},
|
|
1874
|
+
{
|
|
1875
|
+
"component": "pagination",
|
|
1876
|
+
"file": "src/components/pagination/scss/index.scss",
|
|
1877
|
+
"line": 125,
|
|
1878
|
+
"rule": "Naming: states use tokens.state(...) mixin; values from variables",
|
|
1879
|
+
"issue": "`&--tactile` hand-writes `&:active` and `&:hover`/`&:focus-visible` instead of `tokens.state(pressed)`/`(hover)`. It uses literal `translateY(1px)`/`-1px` offsets and `transform: none !important` under reduced motion.",
|
|
1880
|
+
"severity": "medium"
|
|
1881
|
+
},
|
|
1882
|
+
{
|
|
1883
|
+
"component": "pagination",
|
|
1884
|
+
"file": "src/components/pagination/scss/variables.scss",
|
|
1885
|
+
"line": 77,
|
|
1886
|
+
"rule": "Variables live on the selector that consumes them (the explicit --icon-size anti-pattern)",
|
|
1887
|
+
"issue": "`--icon-size` is set on `.pagination-card` and passed to the arrow (`--size: var(--icon-size)`). This is the exact pattern RULES.md forbids, even though the card's padding also reads it.",
|
|
1888
|
+
"severity": "medium"
|
|
1889
|
+
},
|
|
1890
|
+
{
|
|
1891
|
+
"component": "pagination",
|
|
1892
|
+
"file": "src/components/pagination/scss/index.scss",
|
|
1893
|
+
"line": 171,
|
|
1894
|
+
"rule": "index.scss values come from var(--*), not literals; per-axis gap",
|
|
1895
|
+
"issue": "Hard-coded tunables: `gap: var(--size-100)` on `&-control` and `&-pages` (lines 171, 241), `opacity: 0.64` (line 174), `border-radius: 999px` (lines 190, 217, 248), `outline-offset: calc(var(--size-100) / 4)` (lines 60, 157) and `outline: var(--border-width-500)` (line 205).",
|
|
1896
|
+
"severity": "medium"
|
|
1897
|
+
},
|
|
1898
|
+
{
|
|
1899
|
+
"component": "pagination",
|
|
1900
|
+
"file": "src/components/pagination/scss/index.scss",
|
|
1901
|
+
"line": 69,
|
|
1902
|
+
"rule": "Ordering: modifiers before state selectors",
|
|
1903
|
+
"issue": "In `&-arrow`, the modifier rules `&--next &-icon`/`&--previous &-icon` come after `&:focus-visible` and `@include tokens.state(disabled)`.",
|
|
1904
|
+
"severity": "low"
|
|
1905
|
+
},
|
|
1906
|
+
{
|
|
1907
|
+
"component": "pagination",
|
|
1908
|
+
"file": "src/components/pagination/scss/index.scss",
|
|
1909
|
+
"line": 89,
|
|
1910
|
+
"rule": "Ordering: modifiers (&--) before elements (&-)",
|
|
1911
|
+
"issue": "In `&-card`, the `& &-arrow` element comes before the modifiers `&--next`, `&--previous` and `&--tactile`.",
|
|
1912
|
+
"severity": "low"
|
|
1913
|
+
},
|
|
1914
|
+
{
|
|
1915
|
+
"component": "pagination",
|
|
1916
|
+
"file": "src/components/pagination/scss/variables.scss",
|
|
1917
|
+
"line": 85,
|
|
1918
|
+
"rule": "Ordering: modifiers, then elements, then state selectors",
|
|
1919
|
+
"issue": "In `&-card`, `& &-arrow` comes before the `&--next`/`&--previous`/`&--tactile` modifiers, and the `&-subtitle`/`&-title` elements (line 122) come after the `&:focus-visible`/`&:hover` state selectors.",
|
|
1920
|
+
"severity": "low"
|
|
1921
|
+
},
|
|
1922
|
+
{
|
|
1923
|
+
"component": "pagination",
|
|
1924
|
+
"file": "src/components/pagination/scss/index.scss",
|
|
1925
|
+
"line": 14,
|
|
1926
|
+
"rule": "Variants should mostly be variable overrides",
|
|
1927
|
+
"issue": "`&--arrows` repeats `gap: var(--gap-vertical) var(--gap-horizontal)`, which the block already declares. Only the variable override in variables.scss is needed.",
|
|
1928
|
+
"severity": "low"
|
|
1929
|
+
},
|
|
1930
|
+
{
|
|
1931
|
+
"component": "pagination",
|
|
1932
|
+
"file": "src/components/pagination/scss/index.scss",
|
|
1933
|
+
"line": 222,
|
|
1934
|
+
"rule": "Reduced motion zeroes durations or removes transitions",
|
|
1935
|
+
"issue": "The `&-mark` reduced-motion block re-declares the same transition it already has (plus `scale: none` on something never scaled), so it does nothing.",
|
|
1936
|
+
"severity": "low"
|
|
1937
|
+
},
|
|
1938
|
+
{
|
|
1939
|
+
"component": "pagination",
|
|
1940
|
+
"file": "src/components/pagination/index.ts",
|
|
1941
|
+
"line": 117,
|
|
1942
|
+
"rule": "Directory structure: index.ts is a barrel exporting a typed object",
|
|
1943
|
+
"issue": "The plain pagination component is implemented in index.ts and exported via `Object.assign(plain, {...})` instead of the barrel `const pagination: {...} = {...}` shape.",
|
|
1944
|
+
"severity": "low"
|
|
1945
|
+
},
|
|
1946
|
+
{
|
|
1947
|
+
"component": "panels",
|
|
1948
|
+
"file": "src/components/panels/dnd.ts",
|
|
1949
|
+
"line": 88,
|
|
1950
|
+
"rule": "TypeScript: don't add manual document listeners when template can bind them",
|
|
1951
|
+
"issue": "The drag adds document keydown, pointercancel, pointermove and pointerup listeners by hand with AbortController cleanup. Template's `ondocument*` bindings on the panels root, gated on `pressed`, would handle lifecycle. No comment explains why raw DOM is needed.",
|
|
1952
|
+
"severity": "medium"
|
|
1953
|
+
},
|
|
1954
|
+
{
|
|
1955
|
+
"component": "panels",
|
|
1956
|
+
"file": "src/components/panels/dnd.ts",
|
|
1957
|
+
"line": 157,
|
|
1958
|
+
"rule": "TypeScript: don't manipulate the DOM directly when template can",
|
|
1959
|
+
"issue": "The drag ghost is built with createElement, className and style.left/top, attached with appendChild to body, and moved with a per-move `host.style.translate` write inside an effect. A template with a reactive `style: () => ...` binding could render it.",
|
|
1960
|
+
"severity": "medium"
|
|
1961
|
+
},
|
|
1962
|
+
{
|
|
1963
|
+
"component": "panels",
|
|
1964
|
+
"file": "src/components/panels/scss/variables.scss",
|
|
1965
|
+
"line": 5,
|
|
1966
|
+
"rule": "Variables live on the selector that consumes them",
|
|
1967
|
+
"issue": "Prefixed variables on `.panels` reach down into children: `--action-size` and `--add-size` (to &-action/&-add), `--handle-color`, `--handle-color-hover`, `--handle-color-pressed` and `--handle-size` (to &-handle), `--header-height` (to &-header), and `--tab-font-size`, `--tab-height` and `--tab-max-width` (to &-tab). Each should be unprefixed on its consumer, e.g. `--size`, `--height`.",
|
|
1968
|
+
"severity": "medium"
|
|
1969
|
+
},
|
|
1970
|
+
{
|
|
1971
|
+
"component": "panels",
|
|
1972
|
+
"file": "src/components/panels/scss/index.scss",
|
|
1973
|
+
"line": 257,
|
|
1974
|
+
"rule": "variables.scss holds css variables; index.scss holds logic",
|
|
1975
|
+
"issue": "css variables are declared in index.scss: `--size: 16px` on `&-launcher-card-icon` (line 257), and `--size: 12px` on `&-tab-close .icon` (line 371) and `&-tab-icon` (line 376).",
|
|
1976
|
+
"severity": "medium"
|
|
1977
|
+
},
|
|
1978
|
+
{
|
|
1979
|
+
"component": "panels",
|
|
1980
|
+
"file": "src/components/panels/scss/index.scss",
|
|
1981
|
+
"line": 237,
|
|
1982
|
+
"rule": "index.scss values come from var(--*), not literals; per-axis padding/gap",
|
|
1983
|
+
"issue": "Launcher and ghost hard-code tunables: `padding: var(--size-600)` (237), gap/size/font literals (243, 252-253, 261-262, 269-272, 278-279, 283, 289, 295-296, 301-302), ghost `padding: calc(...) var(--size-200)` shorthand plus font-size and z-index (120-125). Also `min-width: 200px` (46), `min-height: 80px` (53), `height: 48px` (67), 2px/1px drop rings (32, 143, 152), `opacity: 0.45` (356) and 16px close size (367-368).",
|
|
1984
|
+
"severity": "medium"
|
|
1985
|
+
},
|
|
1986
|
+
{
|
|
1987
|
+
"component": "panels",
|
|
1988
|
+
"file": "src/components/panels/scss/index.scss",
|
|
1989
|
+
"line": 146,
|
|
1990
|
+
"rule": "Naming: states use tokens.state(...) mixin",
|
|
1991
|
+
"issue": "`&.--active` on `&-group` should be `@include tokens.state(active)`. `&-handle` hand-writes `&:active::after`/`&:hover:not(:active)::after` (lines 200, 204) with `--handle-color-hover`/`-pressed` instead of the state mixin with a `--background-default/-hover/-pressed` family.",
|
|
1992
|
+
"severity": "low"
|
|
1993
|
+
},
|
|
1994
|
+
{
|
|
1995
|
+
"component": "panels",
|
|
1996
|
+
"file": "src/components/panels/scss/index.scss",
|
|
1997
|
+
"line": 192,
|
|
1998
|
+
"rule": "Ordering: pseudo elements in group 2, before modifiers",
|
|
1999
|
+
"issue": "In `&-handle`, `&::after` comes after the `&--x`/`&--y` modifiers.",
|
|
2000
|
+
"severity": "low"
|
|
2001
|
+
},
|
|
2002
|
+
{
|
|
2003
|
+
"component": "panels",
|
|
2004
|
+
"file": "src/components/panels/scss/index.scss",
|
|
2005
|
+
"line": 28,
|
|
2006
|
+
"rule": "Ordering: elements alphabetical",
|
|
2007
|
+
"issue": "`&-dock-target, &-edge` comes before `&-add` (36) and `&-body` (41). `&-dock-target` is also styled in two places: here and nested under `&-dock` at line 65.",
|
|
2008
|
+
"severity": "low"
|
|
2009
|
+
},
|
|
2010
|
+
{
|
|
2011
|
+
"component": "panels",
|
|
2012
|
+
"file": "src/components/panels/scss/index.scss",
|
|
2013
|
+
"line": 197,
|
|
2014
|
+
"rule": "index.scss values come from variables defined in variables.scss",
|
|
2015
|
+
"issue": "The `&-handle::after` transition uses `--transition-duration`/`--transition-timing-function`, which panels' variables.scss never defines.",
|
|
2016
|
+
"severity": "low"
|
|
2017
|
+
},
|
|
2018
|
+
{
|
|
2019
|
+
"component": "panels",
|
|
2020
|
+
"file": "src/components/panels/group.ts",
|
|
2021
|
+
"line": 96,
|
|
2022
|
+
"rule": "TypeScript: fine-grained reactivity",
|
|
2023
|
+
"issue": "The tab class (lines 96-100) and group class (lines 320-325) are a single function that rebuilds and joins every class whenever any input changes. Template accepts arrays of per-class functions (as overlay/index.ts:369 does), so each class can update independently.",
|
|
2024
|
+
"severity": "low"
|
|
2025
|
+
},
|
|
2026
|
+
{
|
|
2027
|
+
"component": "panels",
|
|
2028
|
+
"file": "src/components/panels/resize.ts",
|
|
2029
|
+
"line": 82,
|
|
2030
|
+
"rule": "TypeScript: don't manipulate the DOM directly",
|
|
2031
|
+
"issue": "Manual `document.documentElement.classList.add/remove('panels-resizing', ...)` (lines 43, 82) toggles global state outside the template.",
|
|
2032
|
+
"severity": "low"
|
|
2033
|
+
},
|
|
2034
|
+
{
|
|
2035
|
+
"component": "panels",
|
|
2036
|
+
"file": "src/components/panels/index.ts",
|
|
2037
|
+
"line": 674,
|
|
2038
|
+
"rule": "Directory structure: index.ts is a barrel exporting a typed object",
|
|
2039
|
+
"issue": "The component is implemented in index.ts and exported via an untyped `Object.assign(panels, { state })`.",
|
|
2040
|
+
"severity": "low"
|
|
2041
|
+
},
|
|
2042
|
+
{
|
|
2043
|
+
"component": "preview",
|
|
2044
|
+
"file": "src/components/preview/scss/index.scss",
|
|
2045
|
+
"line": 123,
|
|
2046
|
+
"rule": "variables.scss holds css variables; index.scss holds logic",
|
|
2047
|
+
"issue": "`--background-hover: transparent` on `&-view-button` is declared in index.scss instead of variables.scss.",
|
|
2048
|
+
"severity": "low"
|
|
2049
|
+
},
|
|
2050
|
+
{
|
|
2051
|
+
"component": "preview",
|
|
2052
|
+
"file": "src/components/preview/scss/variables.scss",
|
|
2053
|
+
"line": 112,
|
|
2054
|
+
"rule": "Ordering: block's own variables first, then modifiers, then elements",
|
|
2055
|
+
"issue": "The block-level `&.card` variables (`--intrinsic-height`, `--scroll-margin-vertical`, ...) come last, after every element.",
|
|
2056
|
+
"severity": "low"
|
|
2057
|
+
},
|
|
2058
|
+
{
|
|
2059
|
+
"component": "preview",
|
|
2060
|
+
"file": "src/components/preview/index.ts",
|
|
2061
|
+
"line": 107,
|
|
2062
|
+
"rule": "Directory structure: index.ts is a barrel exporting a typed object",
|
|
2063
|
+
"issue": "The card component is implemented in index.ts and exported via an untyped `Object.assign(preview, {...})` instead of the typed barrel object.",
|
|
2064
|
+
"severity": "low"
|
|
2065
|
+
},
|
|
2066
|
+
{
|
|
2067
|
+
"component": "surface-field",
|
|
2068
|
+
"file": "src/components/surface-field/scss/variables.scss",
|
|
2069
|
+
"line": 9,
|
|
2070
|
+
"rule": "Variables: variables live on the consuming selector, not a parent with a prefix",
|
|
2071
|
+
"issue": "The block `.surface-field` defines `--surface-body-color`, `--surface-body-font-size`, `--surface-border-color`, `--surface-border-radius`, `--surface-box-shadow(-active)`, `--surface-grip-color/-width`, `--surface-handle-height`, `--surface-header-cursor`, `--surface-lift-duration/-opacity` and `--surface-title-color` (lines 9-21). Only `.surface-field-surface` and its elements read them, so they reach down from the parent. Each should be an unprefixed variable on `&-surface`, `&-surface-body`, `&-surface-title` and so on.",
|
|
2072
|
+
"severity": "high"
|
|
2073
|
+
},
|
|
2074
|
+
{
|
|
2075
|
+
"component": "uptime",
|
|
2076
|
+
"file": "src/components/uptime/scss/variables.scss",
|
|
2077
|
+
"line": 2,
|
|
2078
|
+
"rule": "Variables: variables live on the consuming selector, not a parent with a prefix",
|
|
2079
|
+
"issue": "The `.uptime` block defines `--axis-line-color`, `--bar-active-scale`, `--bar-border-radius`, `--bar-dim`, `--bar-height`, `--bar-opacity`, `--caption-blur`, `--caption-offset` and `--dot-size`. They are only read by `.uptime-bar`, `.uptime-bars`, `.uptime-service-message(::before)` and `.uptime-service-percentage::before`. Each should be an unprefixed variable (`--border-radius`, `--height`, `--size`...) on its consuming element. `--bar-color` on `&-bar` itself (line 25) should be `--background`.",
|
|
2080
|
+
"severity": "high"
|
|
2081
|
+
},
|
|
2082
|
+
{
|
|
2083
|
+
"component": "tooltip",
|
|
2084
|
+
"file": "src/components/tooltip/shared.ts",
|
|
2085
|
+
"line": 282,
|
|
2086
|
+
"rule": "TypeScript: don't manipulate the DOM directly when template can",
|
|
2087
|
+
"issue": "The surface element is rendered by this module, yet `element.classList.remove/toggle` is called for `tooltip-shared--instant`, `tooltip-shared--{side}` and `tooltip-shared--gliding` (lines 282, 452, 512, 671-672). A reactive state plus `class: () => ...` bindings in `render()` should replace these calls.",
|
|
2088
|
+
"severity": "high"
|
|
2089
|
+
},
|
|
2090
|
+
{
|
|
2091
|
+
"component": "tooltip",
|
|
2092
|
+
"file": "src/components/tooltip/shared.ts",
|
|
2093
|
+
"line": 361,
|
|
2094
|
+
"rule": "TypeScript: don't manipulate the DOM directly when template can",
|
|
2095
|
+
"issue": "`describe()` calls `trigger.setAttribute/removeAttribute` for `aria-expanded`, `aria-controls` and `aria-describedby` (lines 361-377). `bind()` already returns the trigger's attribute object, so these could be reactive bindings (`'aria-expanded': () => ...`). As written, `bind()` sets a static `'aria-expanded': 'false'` and then mutates it by hand.",
|
|
2096
|
+
"severity": "medium"
|
|
2097
|
+
},
|
|
2098
|
+
{
|
|
2099
|
+
"component": "tooltip",
|
|
2100
|
+
"file": "src/components/tooltip/shared.ts",
|
|
2101
|
+
"line": 430,
|
|
2102
|
+
"rule": "TypeScript: manual window listeners / manual cleanup",
|
|
2103
|
+
"issue": "`listen()` adds and removes a capture-phase `scroll` listener on `window` by hand (lines 430-433). Template offers `onwindowscroll` on the rendered surface. The comment explains why capture is needed but not why template can't be used.",
|
|
2104
|
+
"severity": "medium"
|
|
2105
|
+
},
|
|
2106
|
+
{
|
|
2107
|
+
"component": "tooltip",
|
|
2108
|
+
"file": "src/components/tooltip/shared.ts",
|
|
2109
|
+
"line": 455,
|
|
2110
|
+
"rule": "TypeScript: don't manipulate the DOM directly when template can",
|
|
2111
|
+
"issue": "`measure()` writes `--shared-height/-width/-x/-y` with `style.setProperty` and sets `box.style.transformOrigin` directly (lines 455-463). The values come from measuring, but writing them could go through a reactive `style` binding on the rendered element and box.",
|
|
2112
|
+
"severity": "medium"
|
|
2113
|
+
},
|
|
2114
|
+
{
|
|
2115
|
+
"component": "tooltip",
|
|
2116
|
+
"file": "src/components/tooltip/menu.ts",
|
|
2117
|
+
"line": 450,
|
|
2118
|
+
"rule": "TypeScript: don't manipulate the DOM directly when template can",
|
|
2119
|
+
"issue": "`--shift-x` is written with `root.panel.style.setProperty` (lines 450, 524) and read back from `element.style`. The root panel already binds a reactive `placement.style`, which could carry `--shift-x`. `host.style.setProperty('anchor-name', ...)` (lines 621, 639) writes to the parent element with no comment explaining why raw DOM is needed.",
|
|
2120
|
+
"severity": "medium"
|
|
2121
|
+
},
|
|
2122
|
+
{
|
|
2123
|
+
"component": "surface-field",
|
|
2124
|
+
"file": "src/components/surface-field/index.ts",
|
|
2125
|
+
"line": 727,
|
|
2126
|
+
"rule": "TypeScript: manual window listeners / manual cleanup",
|
|
2127
|
+
"issue": "Each press adds `window.addEventListener('pointercancel'/'pointerup')` and removes them by hand (lines 727-733). `button/kbd.ts` handles the same case with `onwindowpointerup`-style bindings and reactive press state. The always-on `window.addEventListener('scroll', ...)` (line 675) could also be `onwindowscroll`, and there is no comment saying why template can't cover these.",
|
|
2128
|
+
"severity": "medium"
|
|
2129
|
+
},
|
|
2130
|
+
{
|
|
2131
|
+
"component": "surface-field",
|
|
2132
|
+
"file": "src/components/surface-field/scss/index.scss",
|
|
2133
|
+
"line": 51,
|
|
2134
|
+
"rule": "index.scss: values come from var(--*), not literals; Timing pair",
|
|
2135
|
+
"issue": "Literal timing and tunable values: `transition: scale var(--surface-lift-duration) ease` (51) and `opacity ... ease` (135) hard-code the timing function, and there is no `--*-timing-function` pair. Also `scale: 1.01` (54), `line-height: 1.5` (60), a padding shorthand of tokens instead of `--padding-horizontal/-vertical` (72), grip `2px`/`18px`/`opacity: 0.7`/`999px` (84-93), and resize `22px`/`opacity: 0.7` (146-147).",
|
|
2136
|
+
"severity": "medium"
|
|
2137
|
+
},
|
|
2138
|
+
{
|
|
2139
|
+
"component": "theme-picker",
|
|
2140
|
+
"file": "src/components/theme-picker/scss/variables.scss",
|
|
2141
|
+
"line": 64,
|
|
2142
|
+
"rule": "Variables: variables live on the consuming selector (no --icon-size on parent)",
|
|
2143
|
+
"issue": "`&-toggle-trigger` sets `--icon-size: var(--size-400)`, which is the exact anti-pattern RULES.md names. Nothing in the repo reads it apart from cc's own definition, so it is dead too. The icon size should be `--size` on `.theme-picker-icon`, chained through `.icon`.",
|
|
2144
|
+
"severity": "medium"
|
|
2145
|
+
},
|
|
2146
|
+
{
|
|
2147
|
+
"component": "toast",
|
|
2148
|
+
"file": "src/components/toast/scss/variables.scss",
|
|
2149
|
+
"line": 12,
|
|
2150
|
+
"rule": "Variables: variables live on the consuming selector (no --icon-size on parent)",
|
|
2151
|
+
"issue": "`.toast-close` defines `--icon-size` and passes it to `&-icon.icon { --size: var(--icon-size) }`. The value should be set as `--size` directly on `&-close-icon.icon`, as button does with `&-kbd-icon.icon`.",
|
|
2152
|
+
"severity": "medium"
|
|
2153
|
+
},
|
|
2154
|
+
{
|
|
2155
|
+
"component": "tooltip",
|
|
2156
|
+
"file": "src/components/tooltip/scss/variables.scss",
|
|
2157
|
+
"line": 79,
|
|
2158
|
+
"rule": "Variables: variables live on the consuming selector, not a parent with a prefix",
|
|
2159
|
+
"issue": "`.tooltip--menu` defines `--item-border-radius`, `--item-height`, `--item-padding-horizontal`, `--color-danger`, `--color-disabled` and `--color-hint` (lines 79-85). They are consumed only by `.tooltip-menu-item`, `-header` and `-hint`, so they should be unprefixed variables on those elements.",
|
|
2160
|
+
"severity": "medium"
|
|
2161
|
+
},
|
|
2162
|
+
{
|
|
2163
|
+
"component": "tooltip",
|
|
2164
|
+
"file": "src/components/tooltip/scss/variables.scss",
|
|
2165
|
+
"line": 139,
|
|
2166
|
+
"rule": "variables.scss holds only css variables",
|
|
2167
|
+
"issue": "`&-menu-panel > .highlight` declares the real property `border-radius: var(--item-border-radius)` inside variables.scss. It belongs in index.scss or `_menu.scss`.",
|
|
2168
|
+
"severity": "medium"
|
|
2169
|
+
},
|
|
2170
|
+
{
|
|
2171
|
+
"component": "tooltip",
|
|
2172
|
+
"file": "src/components/tooltip/scss/_menu.scss",
|
|
2173
|
+
"line": 25,
|
|
2174
|
+
"rule": "index.scss vs variables.scss: tunables belong in variables.scss",
|
|
2175
|
+
"issue": "The `--expand-*` tunables live in the logic partial rather than variables.scss: bleed 24px, delays, durations, stagger, the `linear()` easing, and `--offset`/`--scale`/`--width` overrides (lines 25-48). The same block repeats `--expand-duration: 0.4s` and `--expand-fade-duration: 0.15s` under `state(active)` (lines 59-61).",
|
|
2176
|
+
"severity": "medium"
|
|
2177
|
+
},
|
|
2178
|
+
{
|
|
2179
|
+
"component": "tooltip",
|
|
2180
|
+
"file": "src/components/tooltip/scss/_menu.scss",
|
|
2181
|
+
"line": 255,
|
|
2182
|
+
"rule": "index.scss: values come from var(--*), not literals; Timing pair",
|
|
2183
|
+
"issue": "`&-menu-item` hard-codes `transition: background 130ms linear(...)` instead of `--transition-duration`/`--transition-timing-function`. The chevron is also literal: `1.5px` border, `6px` size, `opacity: 0.6` (lines 165-172). So is the open sub-panel clip `inset(-48px round ... + 48px)` (line 204).",
|
|
2184
|
+
"severity": "medium"
|
|
2185
|
+
},
|
|
2186
|
+
{
|
|
2187
|
+
"component": "tooltip",
|
|
2188
|
+
"file": "src/components/tooltip/scss/index.scss",
|
|
2189
|
+
"line": 85,
|
|
2190
|
+
"rule": "index.scss: values come from var(--*), not literals",
|
|
2191
|
+
"issue": "The active state hard-codes `--transition-duration: 240ms` in index.scss, even though variables.scss says the open state swaps in the entrance duration. That value should be a variable in variables.scss. The `--morph` close transition also hard-codes `cubic-bezier(0.16, 1, 0.3, 1)` (line 136).",
|
|
2192
|
+
"severity": "medium"
|
|
2193
|
+
},
|
|
2194
|
+
{
|
|
2195
|
+
"component": "theme-picker",
|
|
2196
|
+
"file": "src/components/theme-picker/scss/index.scss",
|
|
2197
|
+
"line": 169,
|
|
2198
|
+
"rule": "index.scss: values come from var(--*), not literals; Timing pair",
|
|
2199
|
+
"issue": "Every transition hard-codes its duration (190ms, 130ms, 240ms, 100ms) and repeats the same long `linear(...)` spring inline 9 times (lines 169-172, 180-182, 189, 204-206, 222). They should be `--transition-duration`/`--transition-timing-function` variables. Other tunables are also literal: card preview 48px/64px/7px and bar 6px/0.8 and 4px/0.35 (51-80), swatch 36px (102-103), 999px radii, `2px solid var(--color-blue-400)` focus rings.",
|
|
2200
|
+
"severity": "medium"
|
|
2201
|
+
},
|
|
2202
|
+
{
|
|
2203
|
+
"component": "theme",
|
|
2204
|
+
"file": "src/components/theme/scss/variables.scss",
|
|
2205
|
+
"line": 67,
|
|
2206
|
+
"rule": "variables.scss holds only css variables",
|
|
2207
|
+
"issue": "variables.scss contains real rules: `color-scheme: light dark` on `:root` (line 67) and the `[data-theme='dark'|'light'] { color-scheme: ... }` selectors (71-77). index.scss is nothing but `@use 'variables'`, so the logic sits in the wrong file.",
|
|
2208
|
+
"severity": "medium"
|
|
2209
|
+
},
|
|
2210
|
+
{
|
|
2211
|
+
"component": "uptime",
|
|
2212
|
+
"file": "src/components/uptime/scss/variables.scss",
|
|
2213
|
+
"line": 20,
|
|
2214
|
+
"rule": "Variables: timing is always a pair --transition-duration + --transition-timing-function",
|
|
2215
|
+
"issue": "`--transition-duration` is paired with `--timing-function` instead of `--transition-timing-function`. index.scss lines 22-23 and 94 consume the mismatched pair.",
|
|
2216
|
+
"severity": "medium"
|
|
2217
|
+
},
|
|
2218
|
+
{
|
|
2219
|
+
"component": "uptime",
|
|
2220
|
+
"file": "src/components/uptime/scss/index.scss",
|
|
2221
|
+
"line": 68,
|
|
2222
|
+
"rule": "index.scss: values come from var(--*), not literals",
|
|
2223
|
+
"issue": "Element spacing uses tokens directly instead of variables: `-service-caption gap: var(--size-200)` (68), `-service-header gap/height/margin-bottom` (86-89), `-service-axis margin-top` (60), `-bars border-radius` (33), and `1px dotted` (134).",
|
|
2224
|
+
"severity": "low"
|
|
2225
|
+
},
|
|
2226
|
+
{
|
|
2227
|
+
"component": "tasklist",
|
|
2228
|
+
"file": "src/components/tasklist/scss/variables.scss",
|
|
2229
|
+
"line": 11,
|
|
2230
|
+
"rule": "Variables: timing is always a pair --{name}-duration / --{name}-timing-function",
|
|
2231
|
+
"issue": "`--check-duration` and `--strike-duration` share an unpaired `--timing-function`, with no `--check-timing-function` or `--strike-timing-function`. `--move-duration` pairs with `--move-easing` (line 55) instead of `--move-timing-function`. index.scss lines 51 and 98 use `var(--transition-duration)`, which tasklist never defines.",
|
|
2232
|
+
"severity": "medium"
|
|
2233
|
+
},
|
|
2234
|
+
{
|
|
2235
|
+
"component": "typewriter",
|
|
2236
|
+
"file": "src/components/typewriter/scss/variables.scss",
|
|
2237
|
+
"line": 40,
|
|
2238
|
+
"rule": "Variables: timing is always a pair --{name}-duration / --{name}-timing-function",
|
|
2239
|
+
"issue": "`--ink-duration` and `--select-duration` both use a shared `--ease-out` instead of `--ink-timing-function` and `--select-timing-function`. `--glide-duration` pairs with `--glide-easing` (line 65); the shared `timing()` helper forces that name.",
|
|
2240
|
+
"severity": "medium"
|
|
2241
|
+
},
|
|
2242
|
+
{
|
|
2243
|
+
"component": "typewriter",
|
|
2244
|
+
"file": "src/components/typewriter/rotate.ts",
|
|
2245
|
+
"line": 25,
|
|
2246
|
+
"rule": "index.scss vs variables.scss: every tunable value is a variable",
|
|
2247
|
+
"issue": "The enter and exit motion is hard-coded in TS: `EASE_OUT`, `ENTER_MS`, `EXIT_MS`, `STAGGER_MS`, the 90ms beat, and the `blur(4px)` / `translateY(-0.35em|0.4em)` keyframes (lines 25-36, 155-160, 198-208). Only `--glide-*` is read from CSS, so consumers can't tune enter or exit the way they can tune glide.",
|
|
2248
|
+
"severity": "medium"
|
|
2249
|
+
},
|
|
2250
|
+
{
|
|
2251
|
+
"component": "textarea",
|
|
2252
|
+
"file": "src/components/textarea/scss/index.scss",
|
|
2253
|
+
"line": 59,
|
|
2254
|
+
"rule": "SCSS style: use nesting (&-) rather than repeating the block name",
|
|
2255
|
+
"issue": "`.textarea-resize` is a separate top-level selector that repeats the block name. It should be `&-resize` nested inside `.textarea`.",
|
|
2256
|
+
"severity": "medium"
|
|
2257
|
+
},
|
|
2258
|
+
{
|
|
2259
|
+
"component": "textarea",
|
|
2260
|
+
"file": "src/components/textarea/index.ts",
|
|
2261
|
+
"line": 99,
|
|
2262
|
+
"rule": "TypeScript: raw DOM only when unavoidable, with a comment saying why",
|
|
2263
|
+
"issue": "`owner.addEventListener('reset', reset)` and `removeEventListener` in `ondisconnect` add a manual form listener with manual cleanup. A form's reset event never reaches the textarea's own bindings, so raw DOM may be needed here, but no comment says so.",
|
|
2264
|
+
"severity": "low"
|
|
2265
|
+
},
|
|
2266
|
+
{
|
|
2267
|
+
"component": "story",
|
|
2268
|
+
"file": "src/components/story/scss/variables.scss",
|
|
2269
|
+
"line": 11,
|
|
2270
|
+
"rule": "Variables: variables live on the consuming selector, not a parent with a prefix",
|
|
2271
|
+
"issue": "`.story` defines `--bar-color`, `--bar-height`, `--fill-color` and `--dim-opacity`, but only `.story-bar`, `.story-fill` and `.story-track--dimmed` read them. They should be `--background`, `--height` and `--opacity` on those elements.",
|
|
2272
|
+
"severity": "medium"
|
|
2273
|
+
},
|
|
2274
|
+
{
|
|
2275
|
+
"component": "story",
|
|
2276
|
+
"file": "src/components/story/scss/index.scss",
|
|
2277
|
+
"line": 45,
|
|
2278
|
+
"rule": "index.scss: values come from var(--*), not literals; Timing pair",
|
|
2279
|
+
"issue": "Tunables are hard-coded: `-bars` padding `12px 12px 0` is a shorthand literal, not `--padding-horizontal/-vertical` (45), with gap `calc(var(--size-100) / 2)` (43). `border-radius: 999px` appears on bar and fill (25, 56). `-track transition: opacity 0.2s ease-out` (83) is literal timing with no reduced-motion handling.",
|
|
2280
|
+
"severity": "medium"
|
|
2281
|
+
},
|
|
2282
|
+
{
|
|
2283
|
+
"component": "tooltip",
|
|
2284
|
+
"file": "src/components/tooltip/shared.ts",
|
|
2285
|
+
"line": 117,
|
|
2286
|
+
"rule": "Comments only for non-obvious why; never restate code",
|
|
2287
|
+
"issue": "An orphaned comment (\"The unit vector a layer moves along; 'frame--swap' scales it by '--swap-shift'.\") sits above a blank line and an unrelated comment, and documents nothing.",
|
|
2288
|
+
"severity": "low"
|
|
2289
|
+
},
|
|
2290
|
+
{
|
|
2291
|
+
"component": "tooltip",
|
|
2292
|
+
"file": "src/components/tooltip/scss/variables.scss",
|
|
2293
|
+
"line": 168,
|
|
2294
|
+
"rule": "Variables: timing is always a pair",
|
|
2295
|
+
"issue": "`.tooltip-shared` pairs `--open-duration` and `--close-duration` with one shared `--timing-function`. In `_menu.scss` lines 147 and 155, `--close-duration` is used with `--open-timing-function`. There is no `--close-timing-function`, and the fade uses a `linear` literal (line 56).",
|
|
2296
|
+
"severity": "low"
|
|
2297
|
+
},
|
|
2298
|
+
{
|
|
2299
|
+
"component": "tooltip",
|
|
2300
|
+
"file": "src/components/tooltip/scss/variables.scss",
|
|
2301
|
+
"line": 74,
|
|
2302
|
+
"rule": "Ordering / SCSS style",
|
|
2303
|
+
"issue": "The `.tooltip` block is declared twice in variables.scss (lines 6 and 74) instead of once. `--option-focus-background` on `&-content[role='menu']` (line 60) is never read anywhere.",
|
|
2304
|
+
"severity": "low"
|
|
2305
|
+
},
|
|
2306
|
+
{
|
|
2307
|
+
"component": "tooltip",
|
|
2308
|
+
"file": "src/components/tooltip/scss/index.scss",
|
|
2309
|
+
"line": 17,
|
|
2310
|
+
"rule": "Ordering: block-internal order (modifiers, elements, then state selectors)",
|
|
2311
|
+
"issue": "Selectors are out of order. In `.tooltip`, `@include tokens.state(active)` / `state(active hover)` come before the `&--context`/`&--menu` modifiers and the elements. In `&-content`, the `#{$active}`/`#{$not-active}` state selectors and `:where()` come before the `&--context` and `&--morph` modifiers. In `_shared.scss` (lines 19-34), `&:not(...)` and `state(active)` come before the modifiers.",
|
|
2312
|
+
"severity": "low"
|
|
2313
|
+
},
|
|
2314
|
+
{
|
|
2315
|
+
"component": "tooltip",
|
|
2316
|
+
"file": "src/components/tooltip/scss/_menu.scss",
|
|
2317
|
+
"line": 308,
|
|
2318
|
+
"rule": "Ordering: pseudo elements before modifiers",
|
|
2319
|
+
"issue": "In `&-panel`, the `&--covered::after` modifier comes before the `&::after` pseudo-element (line 315). In the expand panel block, `@include tokens.state(active)` (58) comes before `&::before` (85), and `@media` (128) comes last.",
|
|
2320
|
+
"severity": "low"
|
|
2321
|
+
},
|
|
2322
|
+
{
|
|
2323
|
+
"component": "tooltip",
|
|
2324
|
+
"file": "src/components/tooltip/scss/_shared.scss",
|
|
2325
|
+
"line": 7,
|
|
2326
|
+
"rule": "SCSS style: use nesting rather than repeating the block name",
|
|
2327
|
+
"issue": "The partial declares a top-level `.tooltip-shared`, not `.tooltip { &-shared }`. It also repeats the full block name in `&:not(.tooltip-shared--gliding) .tooltip-shared-layer` (19) and `&.tooltip-shared--instant > .tooltip-shared-box` (106).",
|
|
2328
|
+
"severity": "low"
|
|
2329
|
+
},
|
|
2330
|
+
{
|
|
2331
|
+
"component": "theme-picker",
|
|
2332
|
+
"file": "src/components/theme-picker/index.ts",
|
|
2333
|
+
"line": 230,
|
|
2334
|
+
"rule": "Directory structure: one file per sub-component; typed barrel export",
|
|
2335
|
+
"issue": "`cards`, `swatches` and `toggle` are all defined inside index.ts, not in their own files (cards.ts, swatches.ts, toggle.ts). The default export `{ cards, swatches, toggle }` is untyped, not `const themePicker: { cards: typeof cards, ... } = {...}`.",
|
|
2336
|
+
"severity": "low"
|
|
2337
|
+
},
|
|
2338
|
+
{
|
|
2339
|
+
"component": "theme-picker",
|
|
2340
|
+
"file": "src/components/theme-picker/scss/index.scss",
|
|
2341
|
+
"line": 177,
|
|
2342
|
+
"rule": "Naming: states use tokens.state(...), not hand-written state classes",
|
|
2343
|
+
"issue": "States are hand-written: `.theme-picker-toggle.--active > &` (177, 188, 225) and `&:hover` (208) instead of `tokens.state(active, ...)`/`state(hover)`. In `&-toggle-menu`, the `@media` block (186) comes after the state selector, when it belongs in group 2.",
|
|
2344
|
+
"severity": "low"
|
|
2345
|
+
},
|
|
2346
|
+
{
|
|
2347
|
+
"component": "theme-picker",
|
|
2348
|
+
"file": "src/components/theme-picker/scss/index.scss",
|
|
2349
|
+
"line": 4,
|
|
2350
|
+
"rule": "SCSS style: reuse css-utilities placeholders",
|
|
2351
|
+
"issue": "A local `%theme-picker-reset` placeholder rewrites a button reset (background, border, font, padding) and hard-codes a focus ring of `2px solid var(--color-blue-400)`, instead of using `css-utilities/reset` and focus variables.",
|
|
2352
|
+
"severity": "low"
|
|
2353
|
+
},
|
|
2354
|
+
{
|
|
2355
|
+
"component": "typewriter",
|
|
2356
|
+
"file": "src/components/typewriter/scss/index.scss",
|
|
2357
|
+
"line": 113,
|
|
2358
|
+
"rule": "Keyframes: named after the class, or block/element path for a motion",
|
|
2359
|
+
"issue": "`typewriter--blink` uses modifier syntax although no `.typewriter--blink` class exists; it should be `typewriter-blink`. `typewriter-retype--ink` (127) is used by `.typewriter-retype-letter`, so it should be `typewriter-retype-letter` or `typewriter-retype-ink`.",
|
|
2360
|
+
"severity": "low"
|
|
2361
|
+
},
|
|
2362
|
+
{
|
|
2363
|
+
"component": "typewriter",
|
|
2364
|
+
"file": "src/components/typewriter/scss/index.scss",
|
|
2365
|
+
"line": 67,
|
|
2366
|
+
"rule": "Ordering: pseudo elements before modifiers",
|
|
2367
|
+
"issue": "In `&-word`, the modifier `&--selecting::before` comes before the element's own `&::before` (line 72).",
|
|
2368
|
+
"severity": "low"
|
|
2369
|
+
},
|
|
2370
|
+
{
|
|
2371
|
+
"component": "uptime",
|
|
2372
|
+
"file": "src/components/uptime/scss/index.scss",
|
|
2373
|
+
"line": 155,
|
|
2374
|
+
"rule": "Keyframes: named after the class that uses them",
|
|
2375
|
+
"issue": "`uptime-caption` animates `.uptime-service-message`, but its name points at the unrelated element `.uptime-service-caption`. It should be `uptime-service-message` or a motion name under that path. The block's `@media` (140) also sits at the end rather than in group 2.",
|
|
2376
|
+
"severity": "low"
|
|
2377
|
+
},
|
|
2378
|
+
{
|
|
2379
|
+
"component": "usage-meter",
|
|
2380
|
+
"file": "src/components/usage-meter/scss/index.scss",
|
|
2381
|
+
"line": 65,
|
|
2382
|
+
"rule": "index.scss: values come from var(--*), not literals; per-axis gap variables",
|
|
2383
|
+
"issue": "`&-header` hard-codes `gap: var(--size-300)` instead of `--gap-horizontal/-vertical` variables, and `&-track` hard-codes `border-radius: 999px` (line 77).",
|
|
2384
|
+
"severity": "low"
|
|
2385
|
+
},
|
|
2386
|
+
{
|
|
2387
|
+
"component": "usage-meter",
|
|
2388
|
+
"file": "src/components/usage-meter/scss/variables.scss",
|
|
2389
|
+
"line": 30,
|
|
2390
|
+
"rule": "Ordering: alphabetical selectors",
|
|
2391
|
+
"issue": "`&--inline &-cost` (30) comes after `&--inline &-footer, &-header` (25); alphabetically, cost comes before footer. The block's `@media` (91) sits at the very end, not in group 2.",
|
|
2392
|
+
"severity": "low"
|
|
2393
|
+
},
|
|
2394
|
+
{
|
|
2395
|
+
"component": "toast",
|
|
2396
|
+
"file": "src/components/toast/scss/index.scss",
|
|
2397
|
+
"line": 259,
|
|
2398
|
+
"rule": "Ordering: alphabetical selectors; SCSS style: nest @media",
|
|
2399
|
+
"issue": "`.toast` (259) comes after `.toaster` (17); variables.scss uses the correct order. The reduced-motion `@media` (282-299) and `@starting-style` (250-256) are top-level blocks that repeat `.toaster > .toast`, not nested in the selector they affect.",
|
|
2400
|
+
"severity": "low"
|
|
2401
|
+
},
|
|
2402
|
+
{
|
|
2403
|
+
"component": "tasklist",
|
|
2404
|
+
"file": "src/components/tasklist/scss/variables.scss",
|
|
2405
|
+
"line": 72,
|
|
2406
|
+
"rule": "Ordering: @media for the block itself before modifiers/states",
|
|
2407
|
+
"issue": "In `&-item`, `@media (prefers-reduced-motion)` comes after the `&--checking` modifier and the `&:has(...)` state selector; it belongs in group 2.",
|
|
2408
|
+
"severity": "low"
|
|
2409
|
+
},
|
|
2410
|
+
{
|
|
2411
|
+
"component": "surface-field",
|
|
2412
|
+
"file": "src/components/surface-field/scss/index.scss",
|
|
2413
|
+
"line": 53,
|
|
2414
|
+
"rule": "Ordering: state selectors after elements; @media in group 2",
|
|
2415
|
+
"issue": "In `&-surface`, `@include tokens.state(active)` comes before all the `&-body`/`&-content`/... elements. The block's `@media` (167) sits at the end.",
|
|
2416
|
+
"severity": "low"
|
|
2417
|
+
},
|
|
2418
|
+
{
|
|
2419
|
+
"component": "surface-field",
|
|
2420
|
+
"file": "src/components/surface-field/index.ts",
|
|
2421
|
+
"line": 578,
|
|
2422
|
+
"rule": "TypeScript: fine-grained reactivity",
|
|
2423
|
+
"issue": "This effect deep-reads the whole links structure through `void JSON.stringify(links)` and touches camera fields so that any change triggers a full relink and measure. Tracking is coarse, and the effect serializes the whole list on every run.",
|
|
2424
|
+
"severity": "low"
|
|
2425
|
+
},
|
|
2426
|
+
{
|
|
2427
|
+
"component": "surface-field",
|
|
2428
|
+
"file": "src/components/surface-field/scss/variables.scss",
|
|
2429
|
+
"line": 5,
|
|
2430
|
+
"rule": "Variables: prefer tokens over raw values",
|
|
2431
|
+
"issue": "`--accent: #6683e8` is a raw hex value, not a `--color-*` token. The `--surface-border-radius: 14px` and `--surface-grip-width: 32px` lengths are also raw.",
|
|
2432
|
+
"severity": "low"
|
|
2433
|
+
},
|
|
2434
|
+
{
|
|
2435
|
+
"component": "textarea",
|
|
2436
|
+
"file": "src/components/textarea/scss/index.scss",
|
|
2437
|
+
"line": 12,
|
|
2438
|
+
"rule": "Ordering: @extend/@include first, then variables, then properties",
|
|
2439
|
+
"issue": "`@include field.base` comes after the `transition` property, and in variables.scss `@include field.variables` (line 6) comes after the variables.",
|
|
2440
|
+
"severity": "low"
|
|
2441
|
+
},
|
|
2442
|
+
{
|
|
2443
|
+
"component": "editor/tree",
|
|
2444
|
+
"file": "src/components/editor/tree/scss/variables.scss",
|
|
2445
|
+
"line": 194,
|
|
2446
|
+
"rule": "Variables: live on the consuming selector, not a prefixed parent (the --icon-size example)",
|
|
2447
|
+
"issue": "--icon-size is defined on .file-tree and reaches down into children: &-icon.icon sets --size: var(--icon-size) (267-269), &-spinner.loading uses it (303), `& &-icon.icon { --icon-size: inherit }` patches it (244-245), and index.scss:290 reads it too. RULES.md names this exact pattern as wrong.",
|
|
2448
|
+
"severity": "high"
|
|
2449
|
+
},
|
|
2450
|
+
{
|
|
2451
|
+
"component": "editor/workspace",
|
|
2452
|
+
"file": "src/components/editor/workspace/scss/variables.scss",
|
|
2453
|
+
"line": 208,
|
|
2454
|
+
"rule": "Variables: live on the consuming selector, not a prefixed parent (the --icon-size example)",
|
|
2455
|
+
"issue": "&-control sets --icon-size: var(--control-icon-size) to size the sidebar toggle's glyph that sits inside it. Also prefixed icon sizes on the block (--close-icon-size 16, --control-icon-size 26, --status-icon-size 72) feed --size on child .icon selectors. They should be --size set directly on those icon selectors.",
|
|
2456
|
+
"severity": "high"
|
|
2457
|
+
},
|
|
2458
|
+
{
|
|
2459
|
+
"component": "editor/tree",
|
|
2460
|
+
"file": "src/components/editor/tree/scss/variables.scss",
|
|
2461
|
+
"line": 130,
|
|
2462
|
+
"rule": "Ordering: extends, then variables, then properties; then modifiers; then elements",
|
|
2463
|
+
"issue": "Element blocks (&-badge, &-drag, &-find, &-input, &-message, &-sticky, lines 130-188) sit in the middle of the block's variable list. The variables pick up again at 190-241 (@each --icon-*, then --icon-size through --warning-color), and a second run of elements follows at 244-316.",
|
|
2464
|
+
"severity": "high"
|
|
2465
|
+
},
|
|
2466
|
+
{
|
|
2467
|
+
"component": "editor/workspace",
|
|
2468
|
+
"file": "src/components/editor/workspace/index.ts",
|
|
2469
|
+
"line": 508,
|
|
2470
|
+
"rule": "TypeScript: don't manipulate the DOM directly when template has a way",
|
|
2471
|
+
"issue": "element.ownerDocument.addEventListener('keydown', keydown) (non-capture) does what template's ondocumentkeydown does. Line 507 uses element.setAttribute('aria-keyshortcuts', ...) where a template attribute binding would work. Cleanup goes through a hand-made AbortController.",
|
|
2472
|
+
"severity": "high"
|
|
2473
|
+
},
|
|
2474
|
+
{
|
|
2475
|
+
"component": "editor/workspace",
|
|
2476
|
+
"file": "src/components/editor/workspace/statusbar.ts",
|
|
2477
|
+
"line": 138,
|
|
2478
|
+
"rule": "TypeScript: don't manipulate the DOM directly when template has a way",
|
|
2479
|
+
"issue": "defaultView.addEventListener('blur') should be onwindowblur, and element.addEventListener('focusout') at line 139 (bubbling, no capture) should be onfocusout in the attribute object. Cleanup is done by hand with an AbortController.",
|
|
2480
|
+
"severity": "high"
|
|
2481
|
+
},
|
|
2482
|
+
{
|
|
2483
|
+
"component": "editor/workspace",
|
|
2484
|
+
"file": "src/components/editor/workspace/session.ts",
|
|
2485
|
+
"line": 395,
|
|
2486
|
+
"rule": "TypeScript: don't manipulate the DOM directly when template has a way",
|
|
2487
|
+
"issue": "ownerDocument.defaultView.addEventListener('pagehide', flush) should be onwindowpagehide. The capture keyup/pointerup/scroll listeners at 391-393 are raw DOM, and the comment doesn't say why template can't do it (no comment on why capture is needed).",
|
|
2488
|
+
"severity": "medium"
|
|
2489
|
+
},
|
|
2490
|
+
{
|
|
2491
|
+
"component": "editor/tree",
|
|
2492
|
+
"file": "src/components/editor/tree/drag.ts",
|
|
2493
|
+
"line": 401,
|
|
2494
|
+
"rule": "TypeScript: drop to raw DOM only when neither library covers it, and say why in a comment",
|
|
2495
|
+
"issue": "document.addEventListener('keydown'/'keyup', key, { capture: true }) at 401-402 is added by hand with no comment saying why ondocumentkeydown/ondocumentkeyup can't be used. Line 559 also writes (e.currentTarget).draggable directly where a reactive draggable attribute would work.",
|
|
2496
|
+
"severity": "medium"
|
|
2497
|
+
},
|
|
2498
|
+
{
|
|
2499
|
+
"component": "editor/workspace",
|
|
2500
|
+
"file": "src/components/editor/workspace/model.ts",
|
|
2501
|
+
"line": 205,
|
|
2502
|
+
"rule": "TypeScript: fine-grained reactivity, keep state in reactive(...)",
|
|
2503
|
+
"issue": "The workspace model keeps a hand-rolled listeners Set with emit() (352) instead of reactive state. Every emit runs bridge() (workspace/index.ts:403), which rebuilds a string key over every tab and rewrites about 20 view fields. Any change re-derives the whole view rather than updating only the affected nodes.",
|
|
2504
|
+
"severity": "medium"
|
|
2505
|
+
},
|
|
2506
|
+
{
|
|
2507
|
+
"component": "editor/workspace",
|
|
2508
|
+
"file": "src/components/editor/workspace/statusbar.ts",
|
|
2509
|
+
"line": 161,
|
|
2510
|
+
"rule": "TypeScript: never re-render whole templates for a small change",
|
|
2511
|
+
"issue": "`${() => state.selections > 1 && html`<span ...>${state.selections} selections</span>`}` reads the count non-reactively inside the html, so the whole span is rebuilt every time the selection count changes. Only the text needs to change.",
|
|
2512
|
+
"severity": "medium"
|
|
2513
|
+
},
|
|
2514
|
+
{
|
|
2515
|
+
"component": "editor/tree",
|
|
2516
|
+
"file": "src/components/editor/tree/find.ts",
|
|
2517
|
+
"line": 303,
|
|
2518
|
+
"rule": "TypeScript: don't manipulate the DOM directly when template has a way",
|
|
2519
|
+
"issue": "this.input.value = state.text (and element.value = state.text in onconnect at 347) writes the input imperatively. A reactive value binding from state.text would do it.",
|
|
2520
|
+
"severity": "low"
|
|
2521
|
+
},
|
|
2522
|
+
{
|
|
2523
|
+
"component": "editor/markdown",
|
|
2524
|
+
"file": "src/components/editor/markdown/render.ts",
|
|
2525
|
+
"line": 399,
|
|
2526
|
+
"rule": "TypeScript: don't manipulate the DOM directly when template has a way",
|
|
2527
|
+
"issue": "onfirstpaint calls element.querySelector('input') and sets input.checked by hand, while [checkbox.input].checked gets a static value. A reactive checked: () => state.done binding would avoid the DOM query and write.",
|
|
2528
|
+
"severity": "low"
|
|
2529
|
+
},
|
|
2530
|
+
{
|
|
2531
|
+
"component": "editor",
|
|
2532
|
+
"file": "src/components/editor/tree/index.ts",
|
|
2533
|
+
"line": 31,
|
|
2534
|
+
"rule": "Directory structure: index.ts is a barrel",
|
|
2535
|
+
"issue": "tree/index.ts is the full 3438-line component implementation, not a barrel, and it imports another component's SCSS ('~/components/button/scss/index.scss'). workspace/index.ts (1491 lines; imports button and code SCSS at 52-53), viewer/index.ts and markdown/index.ts (which imports '../code/scss/index.scss' at line 6) also hold their implementations in index.ts.",
|
|
2536
|
+
"severity": "medium"
|
|
2537
|
+
},
|
|
2538
|
+
{
|
|
2539
|
+
"component": "editor/diffs",
|
|
2540
|
+
"file": "src/components/editor/diffs/index.ts",
|
|
2541
|
+
"line": 6,
|
|
2542
|
+
"rule": "Directory structure: index.ts exports a typed object of sub-components",
|
|
2543
|
+
"issue": "The barrel builds its export with Object.assign(view, { merge }) instead of the required `const diffs: { ... } = { ... }` object shape.",
|
|
2544
|
+
"severity": "low"
|
|
2545
|
+
},
|
|
2546
|
+
{
|
|
2547
|
+
"component": "editor/workspace",
|
|
2548
|
+
"file": "src/components/editor/workspace/shortcuts.ts",
|
|
2549
|
+
"line": 23,
|
|
2550
|
+
"rule": "Directory structure: index.ts imports './scss/index.scss'",
|
|
2551
|
+
"issue": "SCSS is imported from non-index sub-files ('~/components/button/scss/index.scss' here, and '~/components/inline-edit/scss/index.scss' in statusbar.ts:24) instead of from the barrel.",
|
|
2552
|
+
"severity": "low"
|
|
2553
|
+
},
|
|
2554
|
+
{
|
|
2555
|
+
"component": "editor/code",
|
|
2556
|
+
"file": "src/components/editor/code/scss/index.scss",
|
|
2557
|
+
"line": 2,
|
|
2558
|
+
"rule": "Ordering: alphabetize @use statements",
|
|
2559
|
+
"issue": "@use 'variables' comes before the 'editor', 'features' and 'services' partials. The reference (button, tooltip) keeps them alphabetical with 'variables' last. The same problem is in diffs/scss/index.scss:2 ('variables' before 'diffs' and 'merge').",
|
|
2560
|
+
"severity": "low"
|
|
2561
|
+
},
|
|
2562
|
+
{
|
|
2563
|
+
"component": "editor/code",
|
|
2564
|
+
"file": "src/components/editor/code/scss/variables.scss",
|
|
2565
|
+
"line": 58,
|
|
2566
|
+
"rule": "Variables: live on the consuming selector, not a prefixed parent",
|
|
2567
|
+
"issue": "--hover-max-height and --hover-max-width are on .code-editor even though an &-hover rule exists (156) where they could be --max-height and --max-width. The same pattern appears in: --completion-detail-color, --completion-height, --completion-rows, --completion-width (27-30, consumed by &-completion and &-completions); --bar-control-height, --bar-font-size, --bar-icon-size, --bar-input-width (12-15, consumed by the find/goto/peek elements); and --fold-icon-size (46).",
|
|
2568
|
+
"severity": "medium"
|
|
2569
|
+
},
|
|
2570
|
+
{
|
|
2571
|
+
"component": "editor/code",
|
|
2572
|
+
"file": "src/components/editor/code/scss/variables.scss",
|
|
2573
|
+
"line": 161,
|
|
2574
|
+
"rule": "Ordering: elements alphabetical",
|
|
2575
|
+
"issue": "&-find, &-goto (161) comes after &-hover (156). &-find-row (182) also comes before &-find-icon.icon (187) and &-find-input.input (191).",
|
|
2576
|
+
"severity": "low"
|
|
2577
|
+
},
|
|
2578
|
+
{
|
|
2579
|
+
"component": "editor/code",
|
|
2580
|
+
"file": "src/components/editor/code/scss/variables.scss",
|
|
2581
|
+
"line": 281,
|
|
2582
|
+
"rule": "Ordering: @media for the block itself in group 2, before modifiers",
|
|
2583
|
+
"issue": "The block's @media (forced-colors) and @media (prefers-reduced-motion) come after all modifiers and elements, at the end of the block. The same misplacement is in markdown/scss/variables.scss:155, viewer/scss/variables.scss:87, workspace/scss/variables.scss:360, diffs/scss/variables.scss:94 and tree/scss/index.scss:586-695.",
|
|
2584
|
+
"severity": "low"
|
|
2585
|
+
},
|
|
2586
|
+
{
|
|
2587
|
+
"component": "editor/code",
|
|
2588
|
+
"file": "src/components/editor/code/scss/_editor.scss",
|
|
2589
|
+
"line": 143,
|
|
2590
|
+
"rule": "Variables: timing is always a duration + timing-function pair",
|
|
2591
|
+
"issue": "`transition: rotate var(--fold-duration) ease-out` hard-codes the easing, and there is no --fold-timing-function. The same appears in markdown/scss/index.scss:193 and 371, and in tree/scss/index.scss:82, 411, 462, 593 and 613.",
|
|
2592
|
+
"severity": "medium"
|
|
2593
|
+
},
|
|
2594
|
+
{
|
|
2595
|
+
"component": "editor/viewer",
|
|
2596
|
+
"file": "src/components/editor/viewer/scss/_viewer.scss",
|
|
2597
|
+
"line": 69,
|
|
2598
|
+
"rule": "index.scss: values come from var(--*), not literals; timing pair",
|
|
2599
|
+
"issue": "The fold icon's transition hard-codes a long linear(...) easing curve as a literal in the logic file. It should be a --fold-timing-function variable next to --fold-duration.",
|
|
2600
|
+
"severity": "medium"
|
|
2601
|
+
},
|
|
2602
|
+
{
|
|
2603
|
+
"component": "editor/tree",
|
|
2604
|
+
"file": "src/components/editor/tree/scss/variables.scss",
|
|
2605
|
+
"line": 96,
|
|
2606
|
+
"rule": "Variables: timing is always a duration + timing-function pair",
|
|
2607
|
+
"issue": "--chevron-duration (96), --collapse-duration (98), --conceal-duration (100), --expand-duration (115), --indicator-duration (200) and --reveal-duration (222) have no matching -timing-function. They share --motion-easing or literal ease-out instead. --check-duration and --fold-duration in markdown/scss/variables.scss:19 and 32 also have no pair.",
|
|
2608
|
+
"severity": "medium"
|
|
2609
|
+
},
|
|
2610
|
+
{
|
|
2611
|
+
"component": "editor/code",
|
|
2612
|
+
"file": "src/components/editor/code/scss/_editor.scss",
|
|
2613
|
+
"line": 172,
|
|
2614
|
+
"rule": "index.scss vs variables.scss: css variables live in variables.scss",
|
|
2615
|
+
"issue": "The logic partial defines CSS variables: --scrollbar-behavior (172), --background-active on &-line (214), --background-active and --background-default on &-match (234-235), and --color-active and --color-default on &-number (277-278). The same applies to _features.scss (123, 127, 141-142, 157-158, 243-244) and _services.scss (15, 105-106).",
|
|
2616
|
+
"severity": "medium"
|
|
2617
|
+
},
|
|
2618
|
+
{
|
|
2619
|
+
"component": "editor/diffs",
|
|
2620
|
+
"file": "src/components/editor/diffs/scss/_diffs.scss",
|
|
2621
|
+
"line": 66,
|
|
2622
|
+
"rule": "Variants should be variable overrides in variables.scss; index.scss holds no variables",
|
|
2623
|
+
"issue": "&-button--primary is purely variable overrides but lives in the logic partial. The partial also defines state variables at 18-20, 48-50, 88-91, 149-154 and 208, and _merge.scss:19-21 and 58 do the same.",
|
|
2624
|
+
"severity": "medium"
|
|
2625
|
+
},
|
|
2626
|
+
{
|
|
2627
|
+
"component": "editor/diffs",
|
|
2628
|
+
"file": "src/components/editor/diffs/scss/variables.scss",
|
|
2629
|
+
"line": 41,
|
|
2630
|
+
"rule": "Variables: live on the consuming selector; stateful -default/-hover family",
|
|
2631
|
+
"issue": "--action-background and --action-hover-background on the block feed &-action, and they break the --background-default / --background-hover naming. Also, --button-icon-size and --button-size (48-49) are passed down to &-button-icon and &-gap-icon, and --gap-background, --gap-color and --gap-hover-background (66-68) are passed down to &-gap.",
|
|
2632
|
+
"severity": "medium"
|
|
2633
|
+
},
|
|
2634
|
+
{
|
|
2635
|
+
"component": "editor/diffs",
|
|
2636
|
+
"file": "src/components/editor/diffs/scss/_diffs.scss",
|
|
2637
|
+
"line": 107,
|
|
2638
|
+
"rule": "Ordering: modifiers, elements, then state/relational selectors",
|
|
2639
|
+
"issue": "The relational `& + &` comes before the &--delete, &--empty and &--insert modifiers in &-cell. The same happens in _merge.scss:80 inside &-pane.",
|
|
2640
|
+
"severity": "low"
|
|
2641
|
+
},
|
|
2642
|
+
{
|
|
2643
|
+
"component": "editor/diffs",
|
|
2644
|
+
"file": "src/components/editor/diffs/scss/_diffs.scss",
|
|
2645
|
+
"line": 28,
|
|
2646
|
+
"rule": "index.scss: values come from var(--*), not literals",
|
|
2647
|
+
"issue": "The logic file uses tunable literals and raw tokens: line-height 1.4 (28), padding 0 var(--size-200) (29, 80), gap var(--size-100) (39, 60, 136, 280), top 1px (43), filter brightness(1.1) (76), gap var(--size-200) (163), inset 2px box-shadow (208) and border-radius var(--border-radius-100) (339).",
|
|
2648
|
+
"severity": "low"
|
|
2649
|
+
},
|
|
2650
|
+
{
|
|
2651
|
+
"component": "editor/diffs",
|
|
2652
|
+
"file": "src/components/editor/diffs/scss/_diffs.scss",
|
|
2653
|
+
"line": 75,
|
|
2654
|
+
"rule": "Naming: states use tokens.state(...), not hand-written state selectors",
|
|
2655
|
+
"issue": "`&--primary:not(:disabled):hover` writes the hover state by hand instead of using the state mixin or a --*-hover variable.",
|
|
2656
|
+
"severity": "low"
|
|
2657
|
+
},
|
|
2658
|
+
{
|
|
2659
|
+
"component": "editor/markdown",
|
|
2660
|
+
"file": "src/components/editor/markdown/scss/variables.scss",
|
|
2661
|
+
"line": 20,
|
|
2662
|
+
"rule": "Variables: live on the consuming selector, not a prefixed parent",
|
|
2663
|
+
"issue": "--chip-background and --chip-font-size (20-21) are on .markdown-editor although &-chip exists (117). --code-font-size and --code-radius (22-23) are on the block although &-code exists (123). --code-radius is also reused for &-chip's radius and as &-pre's padding (index.scss:117, 323).",
|
|
2664
|
+
"severity": "medium"
|
|
2665
|
+
},
|
|
2666
|
+
{
|
|
2667
|
+
"component": "editor/markdown",
|
|
2668
|
+
"file": "src/components/editor/markdown/scss/index.scss",
|
|
2669
|
+
"line": 378,
|
|
2670
|
+
"rule": "Ordering: pseudo elements before elements",
|
|
2671
|
+
"issue": "&::-webkit-details-marker comes after the &-icon.icon element in &-summary.",
|
|
2672
|
+
"severity": "low"
|
|
2673
|
+
},
|
|
2674
|
+
{
|
|
2675
|
+
"component": "editor/markdown",
|
|
2676
|
+
"file": "src/components/editor/markdown/scss/index.scss",
|
|
2677
|
+
"line": 289,
|
|
2678
|
+
"rule": "index.scss vs variables.scss: css variables live in variables.scss",
|
|
2679
|
+
"issue": "The logic file defines variables: --background-active and --background-default on &-mark--match (289-290), --scrollbar-behavior (385), and --background-active, --border-color-active and --border-width on &-task.checkbox (403-405).",
|
|
2680
|
+
"severity": "low"
|
|
2681
|
+
},
|
|
2682
|
+
{
|
|
2683
|
+
"component": "editor/markdown",
|
|
2684
|
+
"file": "src/components/editor/markdown/scss/index.scss",
|
|
2685
|
+
"line": 253,
|
|
2686
|
+
"rule": "index.scss: values come from var(--*), not literals",
|
|
2687
|
+
"issue": "Tunable literals in the logic file: background-position 0 55% (253), font-weight: bold (357), gap: var(--size-100) (364) and rotate: -90deg (370).",
|
|
2688
|
+
"severity": "low"
|
|
2689
|
+
},
|
|
2690
|
+
{
|
|
2691
|
+
"component": "editor/tree",
|
|
2692
|
+
"file": "src/components/editor/tree/scss/index.scss",
|
|
2693
|
+
"line": 452,
|
|
2694
|
+
"rule": "Ordering: pseudo elements before modifiers",
|
|
2695
|
+
"issue": "In &-row, the &::before guide rule comes after all &--* modifiers and &.--disabled. The same problem appears at code/scss/_features.scss:281-285, where &--confusable comes before &::after in &-unicode.",
|
|
2696
|
+
"severity": "low"
|
|
2697
|
+
},
|
|
2698
|
+
{
|
|
2699
|
+
"component": "editor/tree",
|
|
2700
|
+
"file": "src/components/editor/tree/scss/index.scss",
|
|
2701
|
+
"line": 442,
|
|
2702
|
+
"rule": "Naming: states use tokens.state(...), not hand-written state classes",
|
|
2703
|
+
"issue": "&.--disabled (442 and 670) and &[aria-pressed='true'] (198) write state selectors by hand. The same goes for &:not(.--active) in workspace/scss/_keybindings.scss:102.",
|
|
2704
|
+
"severity": "low"
|
|
2705
|
+
},
|
|
2706
|
+
{
|
|
2707
|
+
"component": "editor/tree",
|
|
2708
|
+
"file": "src/components/editor/tree/scss/index.scss",
|
|
2709
|
+
"line": 731,
|
|
2710
|
+
"rule": "Keyframes: named after the class using them or prefixed with the block/element path",
|
|
2711
|
+
"issue": "file-tree-reveal (731) and file-tree-fade (725) animate .file-tree-row--reveal but drop the 'row' element from their names, so they should be file-tree-row--reveal or file-tree-row-reveal. file-tree-conceal (708) animates .file-tree-motion-layer--close but is not prefixed with that element path.",
|
|
2712
|
+
"severity": "low"
|
|
2713
|
+
},
|
|
2714
|
+
{
|
|
2715
|
+
"component": "editor/tree",
|
|
2716
|
+
"file": "src/components/editor/tree/scss/index.scss",
|
|
2717
|
+
"line": 374,
|
|
2718
|
+
"rule": "Ordering: modifiers alphabetical",
|
|
2719
|
+
"issue": "&--drop::after (374) comes after &--drop-end and &--drop-only (359) and &--drop-only and &--drop-start (366).",
|
|
2720
|
+
"severity": "low"
|
|
2721
|
+
},
|
|
2722
|
+
{
|
|
2723
|
+
"component": "editor/tree",
|
|
2724
|
+
"file": "src/components/editor/tree/scss/index.scss",
|
|
2725
|
+
"line": 162,
|
|
2726
|
+
"rule": "index.scss: values come from var(--*), not literals",
|
|
2727
|
+
"issue": "Hard-coded 1px border widths (162, 201, 220, 243, 256, 287, 391, 492), opacity 0.4, 0.6 and 0.5 (191, 272, 444), calc(var(--row-height) - 2px) (261), and the toggle's bottom: 4px and height: 32px (523-524).",
|
|
2728
|
+
"severity": "low"
|
|
2729
|
+
},
|
|
2730
|
+
{
|
|
2731
|
+
"component": "editor/tree",
|
|
2732
|
+
"file": "src/components/editor/tree/scss/index.scss",
|
|
2733
|
+
"line": 171,
|
|
2734
|
+
"rule": "index.scss vs variables.scss: css variables live in variables.scss",
|
|
2735
|
+
"issue": "The logic file defines variables: --background-* on &-find-button (171-173, 189, 199-200), --indicator-display and --indicator-opacity modifier overrides (27, 37, 40), --guide-direction (330, 468) and forced-colors overrides (643-644).",
|
|
2736
|
+
"severity": "low"
|
|
2737
|
+
},
|
|
2738
|
+
{
|
|
2739
|
+
"component": "editor/viewer",
|
|
2740
|
+
"file": "src/components/editor/viewer/scss/variables.scss",
|
|
2741
|
+
"line": 28,
|
|
2742
|
+
"rule": "Variables: live on the consuming selector, not a prefixed parent",
|
|
2743
|
+
"issue": "--gutter-border-color and --gutter-border-width are defined on .code-viewer and consumed only by &-gutter. --fold-icon-size (23) is likewise passed down to &-fold-icon.icon.",
|
|
2744
|
+
"severity": "low"
|
|
2745
|
+
},
|
|
2746
|
+
{
|
|
2747
|
+
"component": "editor/viewer",
|
|
2748
|
+
"file": "src/components/editor/viewer/scss/_viewer.scss",
|
|
2749
|
+
"line": 51,
|
|
2750
|
+
"rule": "index.scss vs variables.scss; values from variables",
|
|
2751
|
+
"issue": "&-fold defines --color-default, --color-hover and --color-pressed in the logic file, and &[aria-expanded='false'] sets --fold-rotate (78). &-placeholder uses literals line-height 1.2, margin 1ch and padding 0 var(--size-100) (194-196).",
|
|
2752
|
+
"severity": "low"
|
|
2753
|
+
},
|
|
2754
|
+
{
|
|
2755
|
+
"component": "editor/workspace",
|
|
2756
|
+
"file": "src/components/editor/workspace/scss/variables.scss",
|
|
2757
|
+
"line": 20,
|
|
2758
|
+
"rule": "Variables: live on the consuming selector, not a prefixed parent",
|
|
2759
|
+
"issue": "--confirm-background, --confirm-color and --confirm-hover are on .code-workspace and consumed by &-confirm-button. &-confirm-button--primary (182-186) and .code-workspace-keybindings-button--primary (394-398) override the prefixed parent variables instead of the button's own --background-default and --color-default.",
|
|
2760
|
+
"severity": "low"
|
|
2761
|
+
},
|
|
2762
|
+
{
|
|
2763
|
+
"component": "editor/workspace",
|
|
2764
|
+
"file": "src/components/editor/workspace/scss/_keybindings.scss",
|
|
2765
|
+
"line": 59,
|
|
2766
|
+
"rule": "SCSS style: reuse css-utilities placeholders via @extend",
|
|
2767
|
+
"issue": "&-hidden rewrites the visually-hidden rules by hand (clip-path, 1px size, overflow, absolute position) instead of using @extend %hidden-visually.",
|
|
2768
|
+
"severity": "medium"
|
|
2769
|
+
},
|
|
2770
|
+
{
|
|
2771
|
+
"component": "editor/workspace",
|
|
2772
|
+
"file": "src/components/editor/workspace/scss/_keybindings.scss",
|
|
2773
|
+
"line": 4,
|
|
2774
|
+
"rule": "Naming: build names with &-/&-- nesting rather than repeating the block name",
|
|
2775
|
+
"issue": ".code-workspace-command-icon.icon (4, and again in variables.scss:377) and .code-workspace-keybindings (9, and variables.scss:381) are top-level selectors that repeat the block name. They should be nested in .code-workspace as &-command-icon and &-keybindings.",
|
|
2776
|
+
"severity": "low"
|
|
2777
|
+
},
|
|
2778
|
+
{
|
|
2779
|
+
"component": "editor/workspace",
|
|
2780
|
+
"file": "src/components/editor/workspace/scss/index.scss",
|
|
2781
|
+
"line": 307,
|
|
2782
|
+
"rule": "SCSS style: use nesting wherever possible",
|
|
2783
|
+
"issue": "&-tab-close, &-tab-dirty and &-tab-name (307-321) are flat siblings of &-tab instead of being nested as &-close etc. inside &-tab, as variables.scss does. &-confirm-actions, &-confirm-button, &-confirm-files, &-confirm-text and &-confirm-title (47-77) are also not nested under &-confirm.",
|
|
2784
|
+
"severity": "low"
|
|
2785
|
+
},
|
|
2786
|
+
{
|
|
2787
|
+
"component": "editor/workspace",
|
|
2788
|
+
"file": "src/components/editor/workspace/scss/_tabs.scss",
|
|
2789
|
+
"line": 1,
|
|
2790
|
+
"rule": "Directory structure: partials split index.scss by concern",
|
|
2791
|
+
"issue": "The _tabs.scss partial holds mostly merge-editor and document rules (&-document.diffs, &-merge*), while the tab styles themselves (&-tab, &-tab-close, &-tab-dirty, &-tab-name, &-tabs) live in index.scss.",
|
|
2792
|
+
"severity": "low"
|
|
2793
|
+
},
|
|
2794
|
+
{
|
|
2795
|
+
"component": "editor/code",
|
|
2796
|
+
"file": "src/components/editor/code/scss/_features.scss",
|
|
2797
|
+
"line": 51,
|
|
2798
|
+
"rule": "Naming: build names with & nesting rather than repeating the block name",
|
|
2799
|
+
"issue": "`&--readonly .code-editor-lens-action--accept` repeats the full class name. It can be written as `&--readonly &-action--accept`.",
|
|
2800
|
+
"severity": "low"
|
|
2801
|
+
},
|
|
2802
|
+
{
|
|
2803
|
+
"component": "editor/code",
|
|
2804
|
+
"file": "src/components/editor/code/keymap.ts",
|
|
2805
|
+
"line": 510,
|
|
2806
|
+
"rule": "SCSS style/comments: comments only for a non-obvious why; never restate the code",
|
|
2807
|
+
"issue": "These comments restate the code: '// Runs a command against the editor.' above `commands`, '// How many selections there are.' above `selections: number` (view.ts:195), '// Hides the hover card.' above `hide` (features.ts:35), and '// Returns focus to the text.' above `focus` (find.ts:16).",
|
|
2808
|
+
"severity": "low"
|
|
2809
|
+
}
|
|
2810
|
+
]
|