diff --git a/.eslintignore b/.eslintignore
new file mode 100644
index 000000000..cfdd63c69
--- /dev/null
+++ b/.eslintignore
@@ -0,0 +1 @@
+ "ONTIME_VERSION.js"
diff --git a/.eslintrc b/.eslintrc
index 341ee5eaf..22846dfb2 100644
--- a/.eslintrc
+++ b/.eslintrc
@@ -6,8 +6,16 @@
"es6": true,
"jest": true
},
+ "parser": "@typescript-eslint/parser",
"extends": [
- "eslint:recommended"
+ "eslint:recommended",
+ "plugin:@typescript-eslint/recommended",
+ "prettier",
+ "eslint-config-prettier"
+ ],
+ "plugins": [
+ "@typescript-eslint",
+ "prettier"
],
"overrides": [
{
@@ -21,6 +29,27 @@
}
],
"rules": {
- "no-console": ["warn", { "allow": ["warn", "error"]}]
+ "no-useless-concat": "warn",
+ "prefer-template": "warn",
+ "no-console": [
+ "warn",
+ {
+ "allow": [
+ "warn",
+ "error"
+ ]
+ }
+ ],
+ "@typescript-eslint/no-non-null-assertion": "warn",
+ "@typescript-eslint/no-unused-vars": [
+ "error",
+ {
+ "argsIgnorePattern": "^_",
+ "caughtErrorsIgnorePattern": "^_",
+ "destructuredArrayIgnorePattern": "^_",
+ "varsIgnorePattern": "^_"
+ }
+ ],
+ "prettier/prettier": "warn"
}
}
\ No newline at end of file
diff --git a/.github/workflows/test_v2.yml b/.github/workflows/test_v2.yml
index 0da546dec..4d2e31160 100644
--- a/.github/workflows/test_v2.yml
+++ b/.github/workflows/test_v2.yml
@@ -27,6 +27,23 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile
+ # Run code quality per package
+ - name: React - Run linter
+ run: pnpm lint
+ working-directory: ./apps/client
+
+ - name: Server - Run linter
+ run: pnpm lint
+ working-directory: ./apps/server
+
+ - name: Utils - Run linter
+ run: pnpm lint
+ working-directory: ./packages/utils
+
+ - name: Types - Run linter
+ run: pnpm lint
+ working-directory: ./packages/types
+
# We choose to run tests separately
- name: React - Run unit tests
run: pnpm test:pipeline
diff --git a/apps/client/.eslintrc b/apps/client/.eslintrc
index 402e99e49..aff13e33f 100644
--- a/apps/client/.eslintrc
+++ b/apps/client/.eslintrc
@@ -8,34 +8,18 @@
"browser": true,
"node": true
},
- "parser": "@typescript-eslint/parser",
"extends": [
- "eslint:recommended",
"plugin:react/recommended",
"plugin:react-hooks/recommended",
- "plugin:@typescript-eslint/recommended",
- "eslint-config-prettier",
- "plugin:@tanstack/eslint-plugin-query/recommended",
- "prettier"
+ "plugin:@tanstack/eslint-plugin-query/recommended"
],
"plugins": [
"react",
"testing-library",
"simple-import-sort",
- "@tanstack/query",
- "@typescript-eslint",
- "prettier"
+ "@tanstack/query"
],
"rules": {
- "@typescript-eslint/no-non-null-assertion": "warn",
- "prettier/prettier": [
- "error",
- {
- "endOfLine": "auto"
- }
- ],
- "no-useless-concat": "warn",
- "prefer-template": "warn",
"react/jsx-no-bind": [
"error",
{
diff --git a/apps/client/package.json b/apps/client/package.json
index d504d2321..66aa90bbd 100644
--- a/apps/client/package.json
+++ b/apps/client/package.json
@@ -39,7 +39,7 @@
"build": "vite build",
"build:local": "cross-env NODE_ENV=local vite build",
"build:docker": "vite build",
- "lint": "eslint .",
+ "lint": "eslint . --quiet",
"test": "vitest",
"test:pipeline": "vitest run",
"cleanup": "rm -rf .turbo && rm -rf node_modules && rm -rf build"
diff --git a/apps/client/src/common/components/multi-part-progress-bar/MultiPartProgressBar.tsx b/apps/client/src/common/components/multi-part-progress-bar/MultiPartProgressBar.tsx
index 462987b3c..d44725f52 100644
--- a/apps/client/src/common/components/multi-part-progress-bar/MultiPartProgressBar.tsx
+++ b/apps/client/src/common/components/multi-part-progress-bar/MultiPartProgressBar.tsx
@@ -25,8 +25,14 @@ export default function MultiPartProgressBar(props: MultiPartProgressBar) {
return (
);
diff --git a/apps/client/src/common/components/schedule/ScheduleItem.tsx b/apps/client/src/common/components/schedule/ScheduleItem.tsx
index d154d80b5..af265725c 100644
--- a/apps/client/src/common/components/schedule/ScheduleItem.tsx
+++ b/apps/client/src/common/components/schedule/ScheduleItem.tsx
@@ -14,16 +14,7 @@ interface ScheduleItemProps {
}
export default function ScheduleItem(props: ScheduleItemProps) {
- const {
- selected,
- timeStart,
- timeEnd,
- title,
- presenter,
- backstageEvent,
- colour,
- skip,
- } = props;
+ const { selected, timeStart, timeEnd, title, presenter, backstageEvent, colour, skip } = props;
const start = formatTime(timeStart, { format: 'hh:mm' });
const end = formatTime(timeEnd, { format: 'hh:mm' });
@@ -37,9 +28,7 @@ export default function ScheduleItem(props: ScheduleItemProps) {
{`${start} → ${end} ${backstageEvent ? '*' : ''}`}
{title}
- {presenter && (
- {presenter}
- )}
+ {presenter && {presenter}
}
);
}
diff --git a/apps/client/src/common/components/schedule/ScheduleNav.tsx b/apps/client/src/common/components/schedule/ScheduleNav.tsx
index dfe180b98..da5516951 100644
--- a/apps/client/src/common/components/schedule/ScheduleNav.tsx
+++ b/apps/client/src/common/components/schedule/ScheduleNav.tsx
@@ -13,12 +13,11 @@ export default function ScheduleNav({ className }: ScheduleNavProps) {
{numPages > 1 &&
[...Array(numPages).keys()].map((i) => (
-
- ),
- )}
+
+ ))}
);
}
diff --git a/apps/client/src/common/hooks/useClickOutside.ts b/apps/client/src/common/hooks/useClickOutside.ts
index 33e50b365..7ea1f71c6 100644
--- a/apps/client/src/common/hooks/useClickOutside.ts
+++ b/apps/client/src/common/hooks/useClickOutside.ts
@@ -6,7 +6,6 @@ export default function useClickOutside(
ref: RefObject,
callback: ClickOutsideEventHandler,
) {
-
useEffect(() => {
function handleClick(event: MouseEvent) {
const element = ref?.current;
diff --git a/apps/client/src/common/hooks/useFitText.ts b/apps/client/src/common/hooks/useFitText.ts
index 59a10f398..ff1470e6a 100644
--- a/apps/client/src/common/hooks/useFitText.ts
+++ b/apps/client/src/common/hooks/useFitText.ts
@@ -1,10 +1,4 @@
-import {
- useCallback,
- useEffect,
- useLayoutEffect,
- useRef,
- useState,
-} from 'react';
+import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
export type TLogLevel = 'debug' | 'info' | 'warn' | 'error' | 'none';
@@ -26,13 +20,13 @@ const LOG_LEVEL: Record = {
};
const useFitText = ({
- logLevel: logLevelOption = 'info',
- maxFontSize = 100,
- minFontSize = 20,
- onFinish,
- onStart,
- resolution = 5,
- }: TOptions = {}) => {
+ logLevel: logLevelOption = 'info',
+ maxFontSize = 100,
+ minFontSize = 20,
+ onFinish,
+ onStart,
+ resolution = 5,
+}: TOptions = {}) => {
const logLevel = LOG_LEVEL[logLevelOption];
const initState = useCallback(() => {
@@ -112,8 +106,7 @@ const useFitText = ({
const isWithinResolution = Math.abs(fontSize - fontSizePrev) <= resolution;
const isOverflow =
!!ref.current &&
- (ref.current.scrollHeight > ref.current.offsetHeight ||
- ref.current.scrollWidth > ref.current.offsetWidth);
+ (ref.current.scrollHeight > ref.current.offsetHeight || ref.current.scrollWidth > ref.current.offsetWidth);
const isFailed = isOverflow && fontSize === fontSizePrev;
const isAsc = fontSize > fontSizePrev;
@@ -123,9 +116,7 @@ const useFitText = ({
if (isFailed) {
isCalculatingRef.current = false;
if (logLevel <= LOG_LEVEL.info) {
- console.info(
- `[use-fit-text] reached \`minFontSize = ${minFontSize}\` without fitting text`,
- );
+ console.info(`[use-fit-text] reached \`minFontSize = ${minFontSize}\` without fitting text`);
}
} else if (isOverflow) {
setState({
@@ -160,16 +151,7 @@ const useFitText = ({
fontSizeMin: newMin,
fontSizePrev: fontSize,
});
- }, [
- calcKey,
- fontSize,
- fontSizeMax,
- fontSizeMin,
- fontSizePrev,
- onFinish,
- ref,
- resolution,
- ]);
+ }, [calcKey, fontSize, fontSizeMax, fontSizeMin, fontSizePrev, onFinish, ref, resolution]);
return { fontSize: `${fontSize}%`, ref };
};
diff --git a/apps/client/src/common/hooks/useInterval.js b/apps/client/src/common/hooks/useInterval.js
index 58a9ab5fd..dd25a8585 100644
--- a/apps/client/src/common/hooks/useInterval.js
+++ b/apps/client/src/common/hooks/useInterval.js
@@ -1,4 +1,4 @@
-import { useEffect, useRef } from "react";
+import { useEffect, useRef } from 'react';
/**
* @description utility hook to around setInterval
diff --git a/apps/client/src/common/hooks/useLocalStorage.ts b/apps/client/src/common/hooks/useLocalStorage.ts
index ad59385c6..a6468e7af 100644
--- a/apps/client/src/common/hooks/useLocalStorage.ts
+++ b/apps/client/src/common/hooks/useLocalStorage.ts
@@ -46,7 +46,7 @@ export const useLocalStorage = (key: string, initialValue: T): [T, (value: T
setStoredValue(valueToStore);
window.localStorage.setItem(`ontime-${key}`, JSON.stringify(valueToStore));
} catch (error) {
- console.log(error);
+ console.error(error);
}
};
return [storedValue, setValue];
diff --git a/apps/client/src/common/utils/__tests__/aliases.test.js b/apps/client/src/common/utils/__tests__/aliases.test.js
index 5a50a004b..ab75ce8df 100644
--- a/apps/client/src/common/utils/__tests__/aliases.test.js
+++ b/apps/client/src/common/utils/__tests__/aliases.test.js
@@ -1,5 +1,6 @@
import { resolvePath } from 'react-router-dom';
-import { validateAlias, generateURLFromAlias, getAliasRoute } from '../aliases';
+
+import { generateURLFromAlias, getAliasRoute, validateAlias } from '../aliases';
describe('An alias fails if incorrect', () => {
const testsToFail = [
diff --git a/apps/client/src/common/utils/__tests__/math.test.js b/apps/client/src/common/utils/__tests__/math.test.js
index 81a44585e..35284459b 100644
--- a/apps/client/src/common/utils/__tests__/math.test.js
+++ b/apps/client/src/common/utils/__tests__/math.test.js
@@ -12,7 +12,7 @@ test('Clamps a set of numbers correctly', () => {
{ num: -50, min: 0, max: 0, result: 0 },
{ num: 50.5, min: 0, max: 100, result: 50.5 },
{ num: 50, min: 0, max: 20.32, result: 20.32 },
- { num: 10, min: 20.32, max: 40, result: 20.32 }
+ { num: 10, min: 20.32, max: 40, result: 20.32 },
];
testCases.forEach((t) => expect(clamp(t.num, t.min, t.max)).toBe(t.result));
diff --git a/apps/client/src/declarations/declaration.d.ts b/apps/client/src/declarations/declaration.d.ts
index f2578949b..8c5aaa3cd 100644
--- a/apps/client/src/declarations/declaration.d.ts
+++ b/apps/client/src/declarations/declaration.d.ts
@@ -13,9 +13,8 @@ declare global {
};
process: {
type: string;
- }
+ };
}
}
-// eslint-disable-next-line import/no-anonymous-default-export
-export default {}
\ No newline at end of file
+export default {};
diff --git a/apps/client/src/declarations/test.d.ts b/apps/client/src/declarations/test.d.ts
index 380718b33..bf28ed90f 100644
--- a/apps/client/src/declarations/test.d.ts
+++ b/apps/client/src/declarations/test.d.ts
@@ -6,6 +6,6 @@ import 'vitest';
// https://github.com/testing-library/jest-dom/issues/123
declare global {
namespace Vi {
- interface Assertion extends TestingLibraryMatchers {}
+ type Assertion = TestingLibraryMatchers;
}
}
diff --git a/apps/client/src/features/cuesheet/cuesheet-table-elements/CuesheetRow.tsx b/apps/client/src/features/cuesheet/cuesheet-table-elements/CuesheetRow.tsx
deleted file mode 100644
index 5a0a9ae89..000000000
--- a/apps/client/src/features/cuesheet/cuesheet-table-elements/CuesheetRow.tsx
+++ /dev/null
@@ -1,6 +0,0 @@
-interface CuesheetRowProps {
- row: OntimeRundownEntry;
- isSelected: boolean;
-}
-
-function CuesheetRow() {}
diff --git a/apps/client/src/features/modals/settings-modal/AliasesForm.tsx b/apps/client/src/features/modals/settings-modal/AliasesForm.tsx
index e70837c00..49dbfdf7f 100644
--- a/apps/client/src/features/modals/settings-modal/AliasesForm.tsx
+++ b/apps/client/src/features/modals/settings-modal/AliasesForm.tsx
@@ -21,7 +21,9 @@ import style from './SettingsModal.module.scss';
const aliasesDocsUrl = 'https://ontime.gitbook.io/v2/features/url-aliases';
// we wrap the array in an object to be simplify react-hook-form
-type Aliases = { aliases: Alias[] };
+type Aliases = {
+ aliases: Alias[];
+};
export default function AliasesForm() {
const { data, status, isFetching, refetch } = useAliases();
@@ -93,8 +95,7 @@ export default function AliasesForm() {
Custom aliases allow providing a short name for any ontime URL.
It serves two primary purposes:
- - Providing dynamic URLs for automation or unattended screens
- - Simplifying complex URLs
+ - Providing dynamic URLs for automation or unattended screens
- Simplifying complex URLs
For more information, see the docs
diff --git a/apps/electron/package.json b/apps/electron/package.json
index 1e235f598..375596c44 100644
--- a/apps/electron/package.json
+++ b/apps/electron/package.json
@@ -20,6 +20,7 @@
},
"scripts": {
"postinstall": "",
+ "lint": "eslint . --quiet",
"dev:electron": "cross-env NODE_ENV=development electron .",
"dist-win": "electron-builder --publish=never --x64 --win",
"dist-mac": "electron-builder --publish=never --mac",
diff --git a/apps/electron/src/menu/applicationMenu.js b/apps/electron/src/menu/applicationMenu.js
index d6f6c1a84..b63fa5670 100644
--- a/apps/electron/src/menu/applicationMenu.js
+++ b/apps/electron/src/menu/applicationMenu.js
@@ -8,23 +8,23 @@ function getApplicationMenu(isMac, askToQuit) {
return [
...(isMac
? [
- {
- label: 'Ontime',
- submenu: [
- { role: 'about' },
- { type: 'separator' },
- { role: 'hide' },
- { role: 'hideOthers' },
- { role: 'unhide' },
- { type: 'separator' },
- {
- label: 'quit',
- click: () => askToQuit(),
- accelerator: 'Cmd+Q',
- },
- ],
- },
- ]
+ {
+ label: 'Ontime',
+ submenu: [
+ { role: 'about' },
+ { type: 'separator' },
+ { role: 'hide' },
+ { role: 'hideOthers' },
+ { role: 'unhide' },
+ { type: 'separator' },
+ {
+ label: 'quit',
+ click: () => askToQuit(),
+ accelerator: 'Cmd+Q',
+ },
+ ],
+ },
+ ]
: []),
{
label: 'File',
@@ -41,15 +41,15 @@ function getApplicationMenu(isMac, askToQuit) {
{ role: 'paste' },
...(isMac
? [
- { role: 'pasteAndMatchStyle' },
- { role: 'delete' },
- { role: 'selectAll' },
- { type: 'separator' },
- {
- label: 'Speech',
- submenu: [{ role: 'startSpeaking' }, { role: 'stopSpeaking' }],
- },
- ]
+ { role: 'pasteAndMatchStyle' },
+ { role: 'delete' },
+ { role: 'selectAll' },
+ { type: 'separator' },
+ {
+ label: 'Speech',
+ submenu: [{ role: 'startSpeaking' }, { role: 'stopSpeaking' }],
+ },
+ ]
: [{ role: 'delete' }, { type: 'separator' }, { role: 'selectAll' }]),
],
},
@@ -161,4 +161,4 @@ function getApplicationMenu(isMac, askToQuit) {
];
}
-module.exports = { getApplicationMenu }
+module.exports = { getApplicationMenu };
diff --git a/apps/electron/src/menu/trayMenu.js b/apps/electron/src/menu/trayMenu.js
index 9006ab3c5..89d70a461 100644
--- a/apps/electron/src/menu/trayMenu.js
+++ b/apps/electron/src/menu/trayMenu.js
@@ -13,7 +13,7 @@ function getTrayMenu(showApp, askToQuit) {
label: 'Shutdown',
click: () => askToQuit(),
},
- ]
+ ];
}
-module.exports = { getTrayMenu }
+module.exports = { getTrayMenu };
diff --git a/apps/server/.eslintrc b/apps/server/.eslintrc
index 980f1c59f..9cf87cad5 100644
--- a/apps/server/.eslintrc
+++ b/apps/server/.eslintrc
@@ -2,23 +2,8 @@
"env": {
"node": true
},
- "parser": "@typescript-eslint/parser",
- "extends": [
- "eslint:recommended",
- "plugin:@typescript-eslint/recommended",
- "prettier"
- ],
- "plugins": ["@typescript-eslint", "prettier"],
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
- },
- "rules": {
- "prettier/prettier": [
- "error",
- {
- "endOfLine": "auto"
- }
- ]
}
}
diff --git a/apps/server/package.json b/apps/server/package.json
index 067a9cc61..b4ba77d2e 100644
--- a/apps/server/package.json
+++ b/apps/server/package.json
@@ -52,7 +52,7 @@
"build:local": "pnpm prebuild && esbuild src/index.ts --log-level=error --platform=node --format=cjs --bundle --minify --outfile=dist/index.cjs",
"build:docker": "pnpm prebuild && esbuild src/index.ts --log-level=error --platform=node --format=cjs --minify --bundle --outfile=dist/docker.cjs",
"build:debug": "pnpm prebuild && esbuild src/app.ts --platform=node --format=cjs --bundle --outfile=dist/index.cjs",
- "lint": "eslint .",
+ "lint": "eslint . --quiet",
"test": "cross-env IS_TEST=true vitest",
"test:pipeline": "cross-env IS_TEST=true vitest run",
"typecheck": "tsc --noEmit",
diff --git a/apps/server/src/controllers/integrationController.config.ts b/apps/server/src/controllers/integrationController.config.ts
index aa3bc3cf0..27b93744c 100644
--- a/apps/server/src/controllers/integrationController.config.ts
+++ b/apps/server/src/controllers/integrationController.config.ts
@@ -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
diff --git a/apps/server/src/controllers/integrationController.ts b/apps/server/src/controllers/integrationController.ts
index 4c16f09ee..a8f5bd95d 100644
--- a/apps/server/src/controllers/integrationController.ts
+++ b/apps/server/src/controllers/integrationController.ts
@@ -14,7 +14,7 @@ export function dispatchFromAdapter(
payload: unknown;
params?: Array;
},
- source?: 'osc' | 'ws',
+ _source?: 'osc' | 'ws',
) {
const payload = args.payload;
const typeComponents = type.toLowerCase().split('/');
diff --git a/apps/server/src/utils/__tests__/parser.test.ts b/apps/server/src/utils/__tests__/parser.test.ts
index b868f32b0..81b4a6cb3 100644
--- a/apps/server/src/utils/__tests__/parser.test.ts
+++ b/apps/server/src/utils/__tests__/parser.test.ts
@@ -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';
diff --git a/e2e/.eslintrc b/e2e/.eslintrc
index e061d33fa..e68cd863f 100644
--- a/e2e/.eslintrc
+++ b/e2e/.eslintrc
@@ -4,10 +4,5 @@
},
"env": {
"node": true
- },
- "extends": [
- "eslint:recommended"
- ],
- "plugins": [],
- "rules": {}
+ }
}
diff --git a/package.json b/package.json
index 7b24736f6..60fee2a2f 100644
--- a/package.json
+++ b/package.json
@@ -25,6 +25,7 @@
"dev": "turbo run dev",
"dev:electron": "turbo run dev --filter=ontime",
"dev:server": "turbo run dev --filter=ontime-server",
+ "lint": "turbo run lint",
"build": "turbo run build",
"build:local": "turbo run build:local",
"dist-win": "turbo run dist-win",
diff --git a/packages/types/.eslintrc b/packages/types/.eslintrc
index 3581c4ab2..e2b9aa067 100644
--- a/packages/types/.eslintrc
+++ b/packages/types/.eslintrc
@@ -3,11 +3,6 @@
"browser": true,
"node": true
},
- "parser": "@typescript-eslint/parser",
- "extends": [
- "eslint:recommended",
- "plugin:@typescript-eslint/recommended"
- ],
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
diff --git a/packages/types/package.json b/packages/types/package.json
index 5f44bc21e..3325be1cb 100644
--- a/packages/types/package.json
+++ b/packages/types/package.json
@@ -6,7 +6,8 @@
"private": true,
"description": "shared typings for ontime",
"scripts": {
- "cleanup": "rm -rf .turbo && rm -rf node_modules"
+ "cleanup": "rm -rf .turbo && rm -rf node_modules",
+ "lint": "eslint ."
},
"keywords": [],
"author": "",
diff --git a/packages/types/src/definitions/core/Alias.type.ts b/packages/types/src/definitions/core/Alias.type.ts
index c82d4e678..3835b5aa5 100644
--- a/packages/types/src/definitions/core/Alias.type.ts
+++ b/packages/types/src/definitions/core/Alias.type.ts
@@ -2,4 +2,4 @@ export type Alias = {
enabled: boolean;
alias: string;
pathAndParams: string;
-}
+};
diff --git a/packages/types/src/definitions/core/UserFields.type.ts b/packages/types/src/definitions/core/UserFields.type.ts
index 02401571c..c8962e8be 100644
--- a/packages/types/src/definitions/core/UserFields.type.ts
+++ b/packages/types/src/definitions/core/UserFields.type.ts
@@ -9,5 +9,4 @@ export type UserFields = {
user7: string;
user8: string;
user9: string;
-}
-
+};
diff --git a/packages/types/src/definitions/core/Views.type.ts b/packages/types/src/definitions/core/Views.type.ts
index f4e8ecdd9..1d1d91561 100644
--- a/packages/types/src/definitions/core/Views.type.ts
+++ b/packages/types/src/definitions/core/Views.type.ts
@@ -6,4 +6,4 @@ export type ViewSettings = {
warningThreshold: number;
dangerColor: string;
dangerThreshold: number;
-}
+};
diff --git a/packages/types/src/definitions/runtime/Logger.type.ts b/packages/types/src/definitions/runtime/Logger.type.ts
index 0a903f97f..f339cfa62 100644
--- a/packages/types/src/definitions/runtime/Logger.type.ts
+++ b/packages/types/src/definitions/runtime/Logger.type.ts
@@ -23,5 +23,5 @@ export enum LogOrigin {
Rx = 'RX',
Server = 'SERVER',
Tx = 'TX',
- User = 'USER'
+ User = 'USER',
}
diff --git a/packages/types/src/definitions/runtime/MessageControl.type.ts b/packages/types/src/definitions/runtime/MessageControl.type.ts
index 3020f421f..a08537b29 100644
--- a/packages/types/src/definitions/runtime/MessageControl.type.ts
+++ b/packages/types/src/definitions/runtime/MessageControl.type.ts
@@ -6,4 +6,4 @@ export type Message = {
export type TimerMessage = Message & {
timerBlink: boolean;
timerBlackout: boolean;
-}
+};
diff --git a/packages/utils/.eslintrc b/packages/utils/.eslintrc
index 83854e682..2e12183cf 100644
--- a/packages/utils/.eslintrc
+++ b/packages/utils/.eslintrc
@@ -3,27 +3,14 @@
"browser": true,
"node": true
},
- "parser": "@typescript-eslint/parser",
"plugins": [
- "simple-import-sort",
- "prettier"
- ],
- "extends": [
- "eslint:recommended",
- "plugin:@typescript-eslint/recommended",
- "prettier"
+ "simple-import-sort"
],
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"rules": {
- "prettier/prettier": [
- "error",
- {
- "endOfLine": "auto"
- }
- ],
"simple-import-sort/exports": "error",
"simple-import-sort/imports": "error"
}
diff --git a/packages/utils/package.json b/packages/utils/package.json
index 5cf966fcd..2d1d7dd2b 100644
--- a/packages/utils/package.json
+++ b/packages/utils/package.json
@@ -5,7 +5,7 @@
"private": true,
"description": "shared logic for ontime",
"scripts": {
- "lint": "eslint .",
+ "lint": "eslint . --quiet",
"test": "vitest",
"test:pipeline": "vitest run",
"cleanup": "rm -rf .turbo && rm -rf node_modules"
diff --git a/packages/utils/src/cue-utils/cueUtils.ts b/packages/utils/src/cue-utils/cueUtils.ts
index aecd9b702..0fa66409a 100644
--- a/packages/utils/src/cue-utils/cueUtils.ts
+++ b/packages/utils/src/cue-utils/cueUtils.ts
@@ -17,6 +17,7 @@ export function getIncrement(input: string): string {
const match = regex.exec(input);
if (match) {
// If a number is found, extract the non-numeric prefix, integer part, and decimal part
+ // eslint-disable-next-line prefer-const -- some items in the destructuring are modified
let [, prefix, integerPart, decimalPart] = match;
if (decimalPart) {