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,