Skip to content

Create recipe for prettier and consolidate active repos #201

@Siegrift

Description

@Siegrift

The config that we use probably looks similar to this:

{
  "bracketSpacing": true,
  "printWidth": 120,
  "singleQuote": true,
  "tabWidth": 2,
  "trailingComma": "es5",
  "useTabs": false,
  "plugins": ["prettier-plugin-solidity", "prettier-plugin-organize-imports"],
  "overrides": [
    {
      "files": "*.md",
      "options": {
        "parser": "markdown",
        "proseWrap": "always"
      }
    },
    {
      "files": "*.sol",
      "options": {
        "parser": "slang",
        "printWidth": 120,
        "tabWidth": 2,
        "useTabs": false,
        "singleQuote": false,
        "bracketSpacing": false
      }
    }
  ]
}

with small expcetions:

  1. The older contract repos preferred line length of 80 and not 120
  2. Markdown wrapping leads to worse reviews and I've changed my opinion on it. Initially I liked the text alignment, but similar thing can be achived with toggling word wrap.

It's OK for projects to use whatever they want, but we can have a recommended recipe with good default and document what are the reasonable changes the projects can choose.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions