chore: Enforce interfaces for object types (#2544)

This commit is contained in:
Dermot Duffy
2026-06-30 17:45:13 -07:00
committed by dermotduffy
parent c8e7fdd808
commit a87e5b8eeb
5 changed files with 11 additions and 6 deletions
+1
View File
@@ -64,6 +64,7 @@ export default defineConfig([
rules: {
curly: 'error',
'local/no-em-dash': 'error',
'@typescript-eslint/consistent-type-definitions': ['error', 'interface'],
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-non-null-assertion': 'error',
'@typescript-eslint/parameter-properties': 'error',
+2 -2
View File
@@ -1,10 +1,10 @@
import { CameraConfig } from '../../../config/schema/cameras';
import { Endpoint } from '../../../types';
type EndpointOptions = {
interface EndpointOptions {
url?: string;
stream?: string;
};
}
const buildGo2RTCEndpoint = (
cameraConfig: CameraConfig,
+3 -1
View File
@@ -3,7 +3,9 @@ export type EffectComponent = HTMLElement & {
startFadeOut(): Promise<void>;
};
export type EffectModule = { default: new () => EffectComponent };
export interface EffectModule {
default: new () => EffectComponent;
}
export interface EffectOptions {
fadeIn?: boolean;
@@ -29,10 +29,10 @@ type RenderRoot = HTMLElement;
* start the video.
*/
type MediaActionsTarget = {
interface MediaActionsTarget {
selected: boolean;
index: number;
};
}
export class MediaActionsController {
private _options: MediaActionsControllerOptions | null = null;
+3 -1
View File
@@ -1,3 +1,5 @@
import { LitElement } from 'lit';
export type ConstructableLitElement = { new (...args: unknown[]): LitElement };
export interface ConstructableLitElement {
new (...args: unknown[]): LitElement;
}