# Prettier

Table of Contents

Standard formatting for all docs after /pre-alpha. If needed run yarn add prettier to install the prettier dependency.

# /.prettierignore

Always ignore /pre-alpha. It is useful to have a discussion with others before updating this file.

# /.prettierrc

Note the "printWidth": 80 which allows VS Code to have two panes open side-by-side, one for the markdown editor and another for a viewer. This allows the editor content to be mostly in view while editing.

{
  "bracketSpacing": true,
  "printWidth": 80,
  "singleQuote": true,
  "tabWidth": 2,
  "trailingComma": "es5",
  "useTabs": false,
  "overrides": [
    {
      "files": "*.md",
      "options": {
        "parser": "markdown",
        "proseWrap": "always"
      }
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

# Editor Settings

It is helpful to format on save and to use prettier as the default formatter over other formatters.

Use VS Code settings.

Search on Editor: Format on Save and Editor: Default Formatter

OR update the .vscode/settings.json file manually.

{
  "cSpell.ignoreWords": ["markdownlint"],
  "cSpell.words": ["Keccak", "MYOISTITLE", "errored"],
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": true
}
1
2
3
4
5
6
Last Updated: 8/9/2022, 2:28:25 PM