Skip to content

Commit

Permalink
no-unused-varを開発時以外はエラーに (VOICEVOX#2097)
Browse files Browse the repository at this point in the history
* no-unused-varをビルド時エラーに

* 修正
  • Loading branch information
Hiroshiba authored May 25, 2024
1 parent d5577c1 commit bba1060
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ module.exports = {
},
],
"@typescript-eslint/no-unused-vars": [
"warn",
process.env.NODE_ENV === "development" ? "warn" : "error", // 開発時のみwarn
{
ignoreRestSiblings: true,
},
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,14 @@ npm run license:generate -- -o voicevox_licenses.json
npm run license:merge -- -o public/licenses.json -i engine_licenses.json -i voicevox_licenses.json
```

## リント(静的解析)

コードの静的解析を行い、バグを未然に防ぎます。プルリクエストを送る前に実行してください。

```bash
npm run lint
```

## コードフォーマット

コードのフォーマットを整えます。プルリクエストを送る前に実行してください。
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/backend/common/configManager.spec.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import pastConfigs from "./pastConfigs";
import configBugDefaultPreset1996 from "./pastConfigs/0.19.1-bug_default_preset.json";
import { BaseConfigManager } from "@/backend/common/ConfigManager";
import { Preset, PresetKey, VoiceId, configSchema } from "@/type/preload";
import { configSchema } from "@/type/preload";

const configBase = {
...configSchema.parse({}),
Expand Down

0 comments on commit bba1060

Please sign in to comment.