Skip to content

Commit d483dfb

Browse files
committed
chore: remove useless codes & fix linting
1 parent ea64855 commit d483dfb

20 files changed

+57
-25
lines changed

deprecate.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ if (!message) {
2323
'glass-easel-miniprogram-adapter',
2424
'glass-easel-miniprogram-webpack-plugin',
2525
'glass-easel-miniprogram-template',
26+
'glass-easel-shadow-sync',
2627
].forEach((p) => {
2728
console.info(`Deprecate ${p}@${version} on npmjs`)
2829
if (

glass-easel-shadow-sync/src/backend.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
/* eslint-disable class-methods-use-this */
1+
/* eslint-disable class-methods-use-this, @typescript-eslint/consistent-type-imports */
22
import type {
33
BackendMode,
4-
DataChange,
54
Element,
65
Event,
76
EventBubbleStatus,
@@ -21,7 +20,7 @@ import type {
2120
import { type Channel } from './message_channel'
2221
import { replayShadowBackend } from './replay'
2322
import { EmptyTemplateEngine } from './template_engine'
24-
import { initValues, updateValues, type IDGenerator } from './utils'
23+
import { type IDGenerator } from './utils'
2524

2625
export const enum ShadowSyncElementType {
2726
Fragment,

glass-easel-shadow-sync/src/message_channel.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ export type ChannelArgs = ExhaustiveChannelEvent<{
269269
boolean,
270270
(string | number)[],
271271
]
272-
[ChannelEventType.CALL_WXS_PROP_CHANGE_LISTENER]: [number, any, any, (string | number)[]]
272+
[ChannelEventType.CALL_WXS_PROP_CHANGE_LISTENER]: [number, unknown, unknown, (string | number)[]]
273273
[ChannelEventType.ON_WXS_CALL_METHOD]: [number, string, string]
274274
}>
275275

glass-easel-shadow-sync/src/template_engine.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ export class EmptyTemplateEngine implements templateEngine.Template {
3434
},
3535
}
3636
: createShadowRoot(comp),
37-
initValues: (data) => {
37+
initValues: (_data) => {
3838
// empty
3939
},
40-
updateValues: (data, changes) => {
40+
updateValues: (_data, _changes) => {
4141
// empty
4242
},
4343
}

glass-easel-shadow-sync/src/view_controller.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* eslint-disable consistent-return, class-methods-use-this, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access */
1+
/* eslint-disable consistent-return, class-methods-use-this, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/consistent-type-imports */
22
import type {
33
BehaviorBuilder,
44
ComponentSpace,
@@ -22,10 +22,13 @@ import type {
2222
import { EmptyTemplateEngine } from './template_engine'
2323
import { dashToCamelCase, initValues, updateValues } from './utils'
2424

25+
// eslint-disable-next-line @typescript-eslint/ban-types
2526
type OptionalKeys<T> = { [P in keyof T]-?: {} extends Pick<T, P> ? P : never }[keyof T]
2627

2728
type CallbackFunction<Args extends any[], Ret> = (...args: [...Args, (ret: Ret) => void]) => void
29+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
2830
type ParametersOrNever<T> = T extends CallbackFunction<infer Arg, infer Ret> ? Arg : never
31+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
2932
type DefaultReturn<T> = T extends CallbackFunction<infer Arg, infer Ret> ? Ret : never
3033

3134
export class Fragment {
@@ -92,7 +95,7 @@ export class ViewController {
9295
//
9396
}
9497

95-
initData(initData: Record<string, unknown>): void {
98+
initData(_initData: Record<string, unknown>): void {
9699
//
97100
}
98101

@@ -331,7 +334,7 @@ export class ViewController {
331334
_glassEasel.Element.setSlotElement(node, slot)
332335
}
333336

334-
setExternalSlot(component: GeneralComponent, slot: Element): void {
337+
setExternalSlot(_component: GeneralComponent, _slot: Element): void {
335338
// TODO
336339
}
337340

@@ -684,7 +687,12 @@ export class ViewController {
684687
)
685688
}
686689

687-
callWXSPropChangeListener(element: Element, newValue: any, oldValue: any, lvaluePath: (string | number)[]): void {
690+
callWXSPropChangeListener(
691+
_element: Element,
692+
_newValue: any,
693+
_oldValue: any,
694+
_lvaluePath: (string | number)[],
695+
): void {
688696
// To be override
689697
}
690698

glass-easel-shadow-sync/tests/core/binding_map.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
import * as coreEnv from 'glass-easel/tests/base/env'
23
import { shadowSyncBackend } from '../base/env'
34

glass-easel-shadow-sync/tests/core/component.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
import * as coreEnv from 'glass-easel/tests/base/env'
23
import { shadowSyncBackend } from '../base/env'
34

glass-easel-shadow-sync/tests/core/event.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
import * as coreEnv from 'glass-easel/tests/base/env'
23
import { shadowSyncBackend } from '../base/env'
34

glass-easel-shadow-sync/tests/core/placehoder.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
import * as coreEnv from 'glass-easel/tests/base/env'
23
import { shadowSyncBackend } from '../base/env'
34

glass-easel-shadow-sync/tests/core/slot.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/* eslint-disable */
12
import * as coreEnv from 'glass-easel/tests/base/env'
23
import { shadowSyncBackend } from '../base/env'
34

0 commit comments

Comments
 (0)