From aff02248301984d884797927b58cae16c0fb2599 Mon Sep 17 00:00:00 2001 From: lchzh3473 Date: Mon, 27 Nov 2023 09:44:16 +0800 Subject: [PATCH] v0.3.1 --- .gitignore | 5 ++++- package.json | 2 +- src/pec/rpe2json.ts | 1 + tools/eslint-config.cjs | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 76bf3e8..c40bf07 100644 --- a/.gitignore +++ b/.gitignore @@ -23,7 +23,10 @@ dist-ssr *.sln *.sw? -# lock files +# Lock files package-lock.json yarn.lock pnpm-lock.yaml + +# Custom +test diff --git a/package.json b/package.json index dbe57fa..548cfab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sim-phi/extends", - "version": "0.3.0", + "version": "0.3.1", "description": "Third-party chart format conversion functions for sim-phi.", "type": "module", "main": "dist/index.js", diff --git a/src/pec/rpe2json.ts b/src/pec/rpe2json.ts index cfcf5be..2bc5f50 100644 --- a/src/pec/rpe2json.ts +++ b/src/pec/rpe2json.ts @@ -126,6 +126,7 @@ function pushLineEvent(ls: LineEventPecDelta[], le: LineEventRPE2) { } function toSpeedEvent(le: LineEventRPE2[]) { const result = []; + if (!le.length || le[0].startTime > 0) result.push({ time: 0, value: 0 }); for (const i of le) { const { startTime, endTime, start, end } = i; result.push({ time: startTime, value: start }); diff --git a/tools/eslint-config.cjs b/tools/eslint-config.cjs index ed8d0d0..8572dce 100644 --- a/tools/eslint-config.cjs +++ b/tools/eslint-config.cjs @@ -16,7 +16,7 @@ module.exports = { '@stylistic/array-element-newline': ['error', 'consistent'], '@stylistic/arrow-parens': ['error', 'as-needed'], '@stylistic/brace-style': ['error', '1tbs', { allowSingleLine: true }], - '@stylistic/function-call-argument-newline': ['error', 'never'], + '@stylistic/function-call-argument-newline': ['error', 'consistent'], '@stylistic/indent': ['error', 2, { SwitchCase: 1 }], '@stylistic/lines-around-comment': ['error', { beforeBlockComment: false }], '@stylistic/lines-between-class-members': ['error', 'never'],