From abb53366561105cafa25741fa45a8a300e6edf23 Mon Sep 17 00:00:00 2001 From: sevenc-nanashi Date: Sat, 14 Dec 2024 19:37:03 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=E3=82=A4=E3=83=B3=E3=83=9D=E3=83=BC?= =?UTF-8?q?=E3=83=88=E6=99=82=E3=81=AE=E3=83=88=E3=83=A9=E3=83=83=E3=82=AF?= =?UTF-8?q?=E9=A0=86=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js | 9 ++++----- src/components/Dialog/ImportSongProjectDialog.vue | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 1477adfb4e..193fd55997 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -13,6 +13,9 @@ const tsEslintRules = { // TODO: いずれは有効化する "@typescript-eslint/require-await": "off", + // ミスが起こりやすいため有効化 + "@typescript-eslint/require-array-sort-compare": "error", + "@typescript-eslint/no-misused-promises": [ "error", { @@ -44,11 +47,7 @@ module.exports = { plugins: ["import"], parser: vueEslintParser, parserOptions: vueEslintParserOptions, - ignorePatterns: [ - "dist/**/*", - "dist_*/**/*", - "node_modules/**/*", - ], + ignorePatterns: ["dist/**/*", "dist_*/**/*", "node_modules/**/*"], rules: { "linebreak-style": process.env.NODE_ENV === "production" && process.platform !== "win32" diff --git a/src/components/Dialog/ImportSongProjectDialog.vue b/src/components/Dialog/ImportSongProjectDialog.vue index 94bbef4d93..ea7fc291ec 100644 --- a/src/components/Dialog/ImportSongProjectDialog.vue +++ b/src/components/Dialog/ImportSongProjectDialog.vue @@ -306,7 +306,7 @@ const handleImportTrack = () => { throw new Error("project or selected track is not set"); } // トラックをインポート - const trackIndexes = selectedTrackIndexes.value.toSorted(); + const trackIndexes = selectedTrackIndexes.value.toSorted((a, b) => a - b); if (project.value.type === "vvproj") { void store.actions.COMMAND_IMPORT_VOICEVOX_PROJECT({ project: project.value.project,