Skip to content

Commit 62c80da

Browse files
committed
ci: clear the setter warnings main brought and record its panel line counts
Three panel tests returned a value from a scrollTop setter; give the setters a block body. app.ts and component-tree.ts grew with #490, so record their line counts, and lower the count http-rule-tools.test.ts no longer reaches.
1 parent e44cec9 commit 62c80da

4 files changed

Lines changed: 17 additions & 10 deletions

File tree

‎app/src/__tests__/app-shell.test.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,9 @@ describe('App scroll memory', () => {
334334
Object.defineProperty(main, 'scrollTop', {
335335
configurable: true,
336336
get: () => top,
337-
set: (value: number) => (top = value),
337+
set: (value: number) => {
338+
top = value;
339+
},
338340
});
339341
const buttons = () => [...host(fixture).querySelectorAll<HTMLButtonElement>('nav button')];
340342
// An earlier test can leave another tab in the URL.
@@ -373,7 +375,9 @@ describe('App scroll memory while content loads', () => {
373375
Object.defineProperty(main, 'scrollTop', {
374376
configurable: true,
375377
get: () => top,
376-
set: (value: number) => (top = Math.max(0, Math.min(value, max))),
378+
set: (value: number) => {
379+
top = Math.max(0, Math.min(value, max));
380+
},
377381
});
378382
const buttons = () => [...host(fixture).querySelectorAll<HTMLButtonElement>('nav button')];
379383
buttons()[0].click();

‎app/src/__tests__/network-live-sort.test.ts‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,9 @@ describe('the network live controls', () => {
157157
Object.defineProperty(wrap, 'scrollTop', {
158158
configurable: true,
159159
get: () => top,
160-
set: (value: number) => (top = value),
160+
set: (value: number) => {
161+
top = value;
162+
},
161163
});
162164
const follow = host().querySelector<HTMLInputElement>('app-live-controls input')!;
163165
expect(follow.checked).toBe(false);
@@ -204,7 +206,9 @@ describe('Follow newest with SSR requests on the page', () => {
204206
Object.defineProperty(wrap, 'scrollTop', {
205207
configurable: true,
206208
get: () => tops[i],
207-
set: (value: number) => (tops[i] = value),
209+
set: (value: number) => {
210+
tops[i] = value;
211+
},
208212
}),
209213
);
210214
host().querySelector<HTMLInputElement>('app-live-controls input')!.click();

‎app/src/__tests__/view-memory.test.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ describe('restoreScroll', () => {
7272
Object.defineProperty(el, 'scrollTop', {
7373
configurable: true,
7474
get: () => top,
75-
set: (value: number) => (top = Math.max(0, Math.min(value, max()))),
75+
set: (value: number) => {
76+
top = Math.max(0, Math.min(value, max()));
77+
},
7678
});
7779
return el;
7880
}

‎lint-baseline.json‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212
"eslint(no-setter-return)": 1
1313
},
1414
"app/src/app.ts": {
15-
"pangular(max-lines)": 1970
15+
"pangular(max-lines)": 1999
1616
},
1717
"app/src/pages/analog-inspector.ts": {
1818
"pangular(max-lines)": 2743
1919
},
2020
"app/src/pages/component-tree.ts": {
21-
"pangular(max-lines)": 2974
21+
"pangular(max-lines)": 2982
2222
},
2323
"app/src/pages/di-inspector.ts": {
2424
"pangular(max-lines)": 2742
@@ -132,9 +132,6 @@
132132
"packages/devtools/src/__tests__/forms.test.ts": {
133133
"typescript(no-explicit-any)": 6
134134
},
135-
"packages/devtools/src/__tests__/http-rule-tools.test.ts": {
136-
"eslint(no-unused-vars)": 1
137-
},
138135
"packages/devtools/src/__tests__/http.test.ts": {
139136
"eslint(no-unused-vars)": 1,
140137
"typescript(no-explicit-any)": 1

0 commit comments

Comments
 (0)