Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: add vscode config for prettier #217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 6, 2024

Conversation

Yordan-Ramchev
Copy link
Collaborator

@Yordan-Ramchev Yordan-Ramchev commented Feb 20, 2024

Description

If the user picks prettier, then suggest the prettier .vscode extension, and add the settings.

settings.json

{
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "editor.formatOnSave": true
}

extensions.json

{
  "recommendations": ["esbenp.prettier-vscode"]
}

Related Issue

re #216

Notes for Reviewers

  1. Create template/config/prettier/.vscode:
    1.1. extensions.json
    1.2. settings.json
  2. render('config/prettier') in index.ts
  3. Remove logic from renderEslint.ts for esbenp.prettier-vscode, as it is now moved to a dedicated file (template/config/prettier/.vscode/extensions.json)

Screenshots

Generated project without prettier

Screenshot 2024-02-05 at 20 52 54 Screenshot 2024-02-05 at 20 55 51

Generated project with prettier

Screenshot 2024-02-05 at 20 53 20 Screenshot 2024-02-05 at 20 54 48 Screenshot 2024-02-05 at 20 54 41

@Yordan-Ramchev Yordan-Ramchev added the enhancement New feature or request label Feb 20, 2024
@Yordan-Ramchev Yordan-Ramchev self-assigned this Feb 20, 2024
@Yordan-Ramchev Yordan-Ramchev linked an issue Feb 20, 2024 that may be closed by this pull request
@Yordan-Ramchev Yordan-Ramchev merged commit 598fcb3 into main Mar 6, 2024
@Yordan-Ramchev Yordan-Ramchev deleted the 216-add-vscode-config-for-prettier branch March 6, 2024 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add vscode config for prettier
2 participants