LoginSignup
0
2

More than 3 years have passed since last update.

VSCode の Prettier でファイル毎にフォーマットを変える

Posted at

プロジェクトのルートに .prettierrc を作成して、下記のように記述
下記の場合は、プロジェクト内の SCSS ファイルはシングルクォートを使って、 JS ファイルはダブルクォートを使いたい場合。

{
  "overrides": [
    {
      "files": "*.scss",
      "options": {
        "singleQuote": true
      }
    },
    {
      "files": "*.js",
      "options": {
        "singleQuote": false
      }
    }
  ]
}

.prettierrc

0
2
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
2