🛠️ToolsShed

Prettier Config Generator

Generate a .prettierrc configuration file by selecting your preferred code formatting options.

{
  "printWidth": 80,
  "tabWidth": 2,
  "useTabs": false,
  "semi": true,
  "singleQuote": false,
  "trailingComma": "es5",
  "bracketSpacing": true,
  "arrowParens": "always",
  "proseWrap": "preserve",
  "endOfLine": "lf"
}

Sıkça Sorulan Sorular

Kod Uygulaması

import json

# Generate .prettierrc configuration
config = {
    "printWidth": 80,
    "tabWidth": 2,
    "useTabs": False,
    "semi": True,
    "singleQuote": False,
    "trailingComma": "es5",
    "bracketSpacing": True,
    "arrowParens": "always",
    "endOfLine": "lf"
}

with open(".prettierrc", "w") as f:
    json.dump(config, f, indent=2)

print("Generated .prettierrc:")
print(json.dumps(config, indent=2))

Comments & Feedback

Comments are powered by Giscus. Sign in with GitHub to leave a comment.