mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-12 10:53:51 +00:00
chore: configure project wide linter (#577)
* chore(lint): configure project-wide linter * chore(lint): improve linting in files * chore(lint): hide warnings in CI
This commit is contained in:
@@ -30,7 +30,7 @@ const whitelistedPayload = {
|
||||
};
|
||||
|
||||
export function parse(field: string, value: unknown) {
|
||||
if (!whitelistedPayload.hasOwnProperty(field)) {
|
||||
if (!Object.hasOwn(whitelistedPayload, field)) {
|
||||
throw new Error(`Field ${field} not permitted`);
|
||||
}
|
||||
const parserFn = whitelistedPayload[field];
|
||||
@@ -51,7 +51,7 @@ export function updateEvent(
|
||||
const event = EventLoader.getEventWithId(eventId);
|
||||
|
||||
if (event) {
|
||||
let propertiesToUpdate = { [propertyName]: newValue };
|
||||
const propertiesToUpdate = { [propertyName]: newValue };
|
||||
|
||||
// Handles the special case for duration
|
||||
// needs to be converted to milliseconds
|
||||
|
||||
@@ -14,7 +14,7 @@ export function dispatchFromAdapter(
|
||||
payload: unknown;
|
||||
params?: Array<string>;
|
||||
},
|
||||
source?: 'osc' | 'ws',
|
||||
_source?: 'osc' | 'ws',
|
||||
) {
|
||||
const payload = args.payload;
|
||||
const typeComponents = type.toLowerCase().split('/');
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
/* eslint-disable no-console -- we are mocking the console */
|
||||
import { vi } from 'vitest';
|
||||
|
||||
import { EndAction, TimerType } from 'ontime-types';
|
||||
import { EndAction, OntimeEvent, TimerType } from 'ontime-types';
|
||||
|
||||
import { dbModel } from '../../models/dataModel.js';
|
||||
import { parseExcel, parseJson, validateEvent } from '../parser.js';
|
||||
|
||||
Reference in New Issue
Block a user