0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

VSCodeでTypeScriptを保存時にBiomeで自動フォーマット&インポート整理する設定

Posted at
.vscode/settings.json
{
  // TypeScriptファイル用の設定
  "[typescript]": {
    // 保存時に自動フォーマットを実行する
    "editor.formatOnSave": true,

    // 使用するフォーマッターをBiomeに設定
    "editor.defaultFormatter": "biomejs.biome",

    // 保存時に実行するコードアクションを定義
    "editor.codeActionsOnSave": {
      // Biomeのクイックフィックス(例:未使用変数の削除など)を適用
      "quickfix.biome": "explicit",

      // Biomeを使ってインポートの整理を行う
      "source.organizeImports.biome": "explicit"
    }
  },

  // TypeScript Reactファイル(.tsx)にも同様の設定を適用
  "[typescriptreact]": {
    "editor.formatOnSave": true,
    "editor.defaultFormatter": "biomejs.biome",
    "editor.codeActionsOnSave": {
      "quickfix.biome": "explicit",
      "source.organizeImports.biome": "explicit"
    }
  }
}


0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?