<commit_before># Prettier formatter for Visual Studio Code

VS Code package to format your JavaScript / TypeScript / CSS using [Prettier](https://github.com/prettier/prettier).

## Installation

Install through VS Code extensions. Search for `Prettier - JavaScript formatter`

[Visual Studio Code Market Place: Prettier - JavaScript formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)

Can also be installed using

```
ext install prettier-vscode
```

## Usage

### Using Command Palette (CMD/CTRL + Shift + P)

```
1. CMD + Shift + P -> Format Document
OR
1. Select the text you want to Prettify
2. CMD + Shift + P -> Format Selection
```

### Custom keybindings

If you don't like the defaults, you can rebind `editor.action.formatDocument` and `editor.action.formatSelection` in the keyboard shortcuts menu of vscode.

### Format On Save
Respects `editor.formatOnSave` setting.

## Settings

### Prettier's Settings
Settings will be read from:
1. File system, first matching file in
    1. `package.json` - `prettier` key
    1. `.prettierrc`
    1. `.prettier.config.js`
1. VSCode prettier's settings, described below
1. VSCode prettier's default settings

#### prettier.printWidth (default: 80)
Fit code within this line limit

#### prettier.tabWidth (default: 2)
Number of spaces it should use per tab

#### prettier.singleQuote (default: false)<commit_msg>Fix settings file typo in README (#262)<commit_after># Prettier formatter for Visual Studio Code

VS Code package to format your JavaScript / TypeScript / CSS using [Prettier](https://github.com/prettier/prettier).

## Installation

Install through VS Code extensions. Search for `Prettier - JavaScript formatter`

[Visual Studio Code Market Place: Prettier - JavaScript formatter](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode)

Can also be installed using

```
ext install prettier-vscode
```

## Usage

### Using Command Palette (CMD/CTRL + Shift + P)

```
1. CMD + Shift + P -> Format Document
OR
1. Select the text you want to Prettify
2. CMD + Shift + P -> Format Selection
```

### Custom keybindings

If you don't like the defaults, you can rebind `editor.action.formatDocument` and `editor.action.formatSelection` in the keyboard shortcuts menu of vscode.

### Format On Save
Respects `editor.formatOnSave` setting.

## Settings

### Prettier's Settings
Settings will be read from:
1. File system, first matching file in
    1. `package.json` - `prettier` key
    1. `.prettierrc`
    1. `prettier.config.js`
1. VSCode prettier's settings, described below
1. VSCode prettier's default settings

#### prettier.printWidth (default: 80)
Fit code within this line limit

#### prettier.tabWidth (default: 2)
Number of spaces it should use per tab

#### prettier.singleQuote (default: false)
{'fraction_non_alphanumeric': 0.10634526763559021, 'fraction_numerical': 0.00957107408720312, 'mean_word_length': 4.385496183206107, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3416590', 'n_tokens_mistral': 909, 'n_tokens_neox': 849, 'n_words': 319}