mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 21:03:29 +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:
@@ -3,11 +3,6 @@
|
||||
"browser": true,
|
||||
"node": true
|
||||
},
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"extends": [
|
||||
"eslint:recommended",
|
||||
"plugin:@typescript-eslint/recommended"
|
||||
],
|
||||
"parserOptions": {
|
||||
"ecmaVersion": 2020,
|
||||
"sourceType": "module"
|
||||
|
||||
@@ -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": "",
|
||||
|
||||
@@ -2,4 +2,4 @@ export type Alias = {
|
||||
enabled: boolean;
|
||||
alias: string;
|
||||
pathAndParams: string;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -9,5 +9,4 @@ export type UserFields = {
|
||||
user7: string;
|
||||
user8: string;
|
||||
user9: string;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -6,4 +6,4 @@ export type ViewSettings = {
|
||||
warningThreshold: number;
|
||||
dangerColor: string;
|
||||
dangerThreshold: number;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -23,5 +23,5 @@ export enum LogOrigin {
|
||||
Rx = 'RX',
|
||||
Server = 'SERVER',
|
||||
Tx = 'TX',
|
||||
User = 'USER'
|
||||
User = 'USER',
|
||||
}
|
||||
|
||||
@@ -6,4 +6,4 @@ export type Message = {
|
||||
export type TimerMessage = Message & {
|
||||
timerBlink: boolean;
|
||||
timerBlackout: boolean;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user