Skip to content

Commit 5e8e4b8

Browse files
Lightning00BladeDevtools-frontend LUCI CQ
authored andcommitted
[cleanup] Remove unused disable comments
This is already the case with EsLint, and it prevent issues from being masked by accident. Bug: 397260638 Change-Id: Ibcc80b76118bd398ae48447a827963c18a2a8f56 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6397061 Reviewed-by: Benedikt Meurer <[email protected]> Reviewed-by: Kateryna Prokopenko <[email protected]> Commit-Queue: Nikolay Vitkov <[email protected]>
1 parent 5cd3e51 commit 5e8e4b8

File tree

23 files changed

+43
-74
lines changed

23 files changed

+43
-74
lines changed

.stylelintrc.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
22
"extends": "stylelint-config-standard",
3-
"plugins": [
4-
"./scripts/stylelint_rules/lib/use_theme_colors.mjs"
5-
],
3+
"plugins": ["./scripts/stylelint_rules/lib/use_theme_colors.mjs"],
64
"rules": {
75
"plugin/use_theme_colors": true,
86
"alpha-value-notation": "percentage",
@@ -14,10 +12,7 @@
1412
"selector-type-no-unknown": [
1513
true,
1614
{
17-
"ignoreTypes": [
18-
"/^devtools-/",
19-
"/^dt-/"
20-
]
15+
"ignoreTypes": ["/^devtools-/", "/^dt-/", "x-link"]
2116
}
2217
],
2318
"selector-class-pattern": null,
@@ -27,5 +22,7 @@
2722
"value-no-vendor-prefix": null,
2823
"media-feature-name-no-vendor-prefix": null,
2924
"no-descending-specificity": null
30-
}
25+
},
26+
"reportNeedlessDisables": true,
27+
"reportUnscopedDisables": true
3128
}

front_end/panels/ai_assistance/components/chatView.css

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@
4545

4646
/* Prevents the input form from jumping when the scrollbar is shown */
4747
/* 688px is the max width of the input form + left and right paddings: var(--sys-size-36) + 2 * var(--sys-size-5) */
48-
/* stylelint-disable-next-line at-rule-no-unknown */
4948
@container (width > 688px) {
50-
/* stylelint-disable-next-line unit-no-unknown */
5149
--half-scrollbar-width: calc((100cqw - 100%) / 2);
5250

5351
margin-left: var(--half-scrollbar-width);
@@ -57,7 +55,6 @@
5755
/* when there isn't enough space to view the messages,
5856
do not overlay the input form on top of the messages */
5957
/* height < var(--sys-size-27) */
60-
/* stylelint-disable-next-line at-rule-no-unknown */
6158
@container (height < 224px) {
6259
position: static;
6360
}
@@ -77,7 +74,6 @@
7774
box-shadow: 0 -3px 2px -2px var(--app-color-ai-assistance-input-divider);
7875
animation: reveal;
7976
opacity: 0%;
80-
/* stylelint-disable-next-line property-no-unknown */
8177
animation-timeline: --scroll-timeline;
8278
}
8379
}
@@ -163,7 +159,7 @@
163159
); /* Gap between the button and the edge + icon's width */
164160

165161
scrollbar-width: none;
166-
field-sizing: content; /* stylelint-disable-line property-no-unknown */
162+
field-sizing: content;
167163
resize: none;
168164
width: 100%;
169165
max-height: 84px; /* 4 rows */
@@ -251,9 +247,7 @@
251247

252248
/* Prevents the container from jumping when the scrollbar is shown */
253249
/* 688px is the max width of the input form + left and right paddings: var(--sys-size-36) + 2 * var(--sys-size-5) */
254-
/* stylelint-disable-next-line at-rule-no-unknown */
255250
@container (width > 688px) {
256-
/* stylelint-disable-next-line unit-no-unknown */
257251
--half-scrollbar-width: calc((100cqw - 100%) / 2);
258252

259253
margin-left: var(--half-scrollbar-width);
@@ -603,16 +597,14 @@ main {
603597
flex-direction: column;
604598
align-items: center;
605599
height: 100%;
606-
container-type: size; /* stylelint-disable-line property-no-unknown */
600+
container-type: size;
607601
scrollbar-width: thin;
608602
/*
609603
Even though `transform: translateZ(1px)` doesn't have a visual effect,
610604
it puts `main` element into another rendering layer which somehow
611605
fixes the `.input-form` jumping on scroll issue.
612606
*/
613607
transform: translateZ(1px);
614-
615-
/* stylelint-disable-next-line property-no-unknown */
616608
scroll-timeline: --scroll-timeline y;
617609
}
618610

@@ -628,9 +620,7 @@ main {
628620

629621
/* Prevents the container from jumping when the scrollbar is shown */
630622
/* 688px is the max width of the input form + left and right paddings: var(--sys-size-36) + 2 * var(--sys-size-5) */
631-
/* stylelint-disable-next-line at-rule-no-unknown */
632623
@container (width > 688px) {
633-
/* stylelint-disable-next-line unit-no-unknown */
634624
--half-scrollbar-width: calc((100cqw - 100%) / 2);
635625

636626
margin-left: var(--half-scrollbar-width);

front_end/panels/application/preloading/components/preloadingDisabledInfobar.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
grid-column-start: span 2;
3131
}
3232

33-
x-link { /* stylelint-disable-line selector-type-no-unknown */
33+
x-link {
3434
color: var(--sys-color-primary);
3535
text-decoration-line: underline;
3636
}

front_end/panels/explain/components/consoleInsight.css

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
.wrapper {
2020
background-color: var(--sys-color-cdt-base-container);
2121
border-radius: 16px;
22-
/* stylelint-disable-next-line property-no-unknown */
2322
container-type: inline-size;
2423
display: grid;
2524
animation: expand var(--sys-motion-duration-medium2) var(--sys-motion-easing-emphasized) forwards;
@@ -177,7 +176,6 @@ footer {
177176
gap: 32px;
178177
}
179178

180-
/* stylelint-disable-next-line at-rule-no-unknown */
181179
@container (max-width: 600px) {
182180
footer {
183181
gap: 8px;
@@ -279,15 +277,13 @@ details {
279277
margin-top: 10px;
280278
}
281279

282-
/* stylelint-disable-next-line selector-pseudo-element-no-unknown */
283280
::details-content {
284281
height: 0;
285282
transition:
286283
height var(--sys-motion-duration-short4) var(--sys-motion-easing-emphasized),
287284
content-visibility var(--sys-motion-duration-short4) var(--sys-motion-easing-emphasized) allow-discrete;
288285
}
289286

290-
/* stylelint-disable-next-line selector-pseudo-element-no-unknown */
291287
[open]::details-content {
292288
height: auto;
293289
}
@@ -364,7 +360,7 @@ h2:focus-visible {
364360
display: table-cell;
365361
}
366362

367-
.sources-list x-link.highlighted { /* stylelint-disable-line selector-type-no-unknown */
363+
.sources-list x-link.highlighted {
368364
animation: highlight-fadeout 2s;
369365
}
370366

front_end/panels/lighthouse/lighthouseDialog.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@
7777

7878
.lighthouse-progress-bar.errored {
7979
width: 100%;
80-
background: var(--sys-color-error); /* stylelint-disable-line plugin/use_theme_colors */
81-
/* See: crbug.com/1152736 for color variable migration. */
80+
background: var(--sys-color-error);
8281
}
8382

8483
.lighthouse-progress-bar.loading {

front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,10 @@
116116
:host-context(.theme-with-dark-background) .highlight-chip:hover > .delete-highlight-container {
117117
display: flex;
118118
/* To avoid issues with stacking semi-transparent colors, we use a hardcoded solid color here. */
119-
background: linear-gradient(90deg, transparent 0%, rgb(41 42 45) 25%); /* stylelint-disable-line plugin/use_theme_colors */
119+
background: linear-gradient(90deg, transparent 0%, rgb(41 42 45) 25%);
120120
}
121121

122122
:host-context(.theme-with-dark-background) .highlight-chip.focused:hover > .delete-highlight-container {
123123
/* To avoid issues with stacking semi-transparent colors, we use a hardcoded solid color here. */
124-
background: linear-gradient(90deg, transparent 0%, rgb(48 55 68) 25%); /* stylelint-disable-line plugin/use_theme_colors */
124+
background: linear-gradient(90deg, transparent 0%, rgb(48 55 68) 25%);
125125
}

front_end/panels/network/components/HeaderSectionRow.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@
131131
color: var(--sys-color-token-subtle);
132132
}
133133

134-
x-link .inline-icon { /* stylelint-disable-line selector-type-no-unknown */
134+
x-link .inline-icon {
135135
padding-right: 3px;
136136
}
137137

front_end/panels/network/components/RequestHeadersView.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ div.raw-headers-row {
147147
color: var(--sys-color-on-surface);
148148
}
149149

150-
x-link { /* stylelint-disable-line selector-type-no-unknown */
150+
x-link {
151151
position: relative;
152152
}
153153

154-
x-link .inline-icon { /* stylelint-disable-line selector-type-no-unknown */
154+
x-link .inline-icon {
155155
padding-right: 3px;
156156
}
157157

front_end/panels/network/networkLogView.css

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -228,8 +228,6 @@
228228

229229
/* Resource preview icons */
230230
/* These rules are grouped by type */
231-
/* stylelint-disable no-duplicate-selectors */
232-
233231
.network-log-grid.data-grid .icon.image {
234232
position: relative;
235233
}
@@ -292,7 +290,7 @@
292290
.network-log-grid.data-grid .trailing-link-icon {
293291
padding-left: 0.5ex;
294292
}
295-
/* stylelint-enable no-duplicate-selectors */
293+
296294
/* This is part of the large color block declared above, but should not be
297295
extracted out. */
298296
.network-dim-cell {

front_end/panels/recorder/components/recordingView.css

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
background-color: var(--sys-color-cdt-base-container);
3333
z-index: 0;
3434
position: relative;
35-
/* stylelint-disable-next-line property-no-unknown */
3635
container: sections / inline-size;
3736
}
3837

@@ -44,7 +43,7 @@
4443
}
4544

4645
.section::after {
47-
content: "";
46+
content: '';
4847
border-bottom: 1px solid var(--sys-color-divider);
4948
position: absolute;
5049
left: 0;
@@ -69,7 +68,6 @@
6968
z-index: 2;
7069
}
7170

72-
/* stylelint-disable-next-line at-rule-no-unknown */
7371
@container sections (max-width: 400px) {
7472
.screenshot-wrapper {
7573
display: none;
@@ -162,7 +160,7 @@
162160
}
163161

164162
.header-title::before {
165-
content: "";
163+
content: '';
166164
min-width: 12px;
167165
height: 12px;
168166
display: inline-block;
@@ -341,19 +339,19 @@ devtools-split-view {
341339
min-height: 0;
342340
}
343341

344-
[slot="main"] {
342+
[slot='main'] {
345343
overflow: hidden auto;
346344
}
347345

348-
[slot="sidebar"] {
346+
[slot='sidebar'] {
349347
display: flex;
350348
flex-direction: column;
351349
overflow: auto;
352350
height: 100%;
353351
width: 100%;
354352
}
355353

356-
[slot="sidebar"] .section-toolbar {
354+
[slot='sidebar'] .section-toolbar {
357355
border-bottom: 1px solid var(--sys-color-divider);
358356
}
359357

0 commit comments

Comments
 (0)