eclipse-wildwebdeveloper / eclipse-wildwebdeveloper/wildwebdeveloper

Prettier Integration

Open
#465 9 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
201
Forks
76
Avg merge
4d 7h
Merged PRs (30d)
21

Description

It'd be nice to integrate Prettier into Wild Web Developer to enable features such as CSS formatting.

Originally, I wanted to propose having a Node.JS project builder, which would use the embedded Node.JS instance from Wild Web Developer to allow running Node applications as a build action. This would allow users to create a package.json for their workspace, add prettier as a dev-dependency and run prettier to format on save/automatic build.

However there are issues with this approach:

  • A user might want to format CSS and not use a package.json
  • Most users who would want to run Node tools such as prettier will most likely have Node on their system. Using the internal/embedded Node from Wild Web Developer might cause differences/issues, and there is a maintance cost for adding options (such as use internal/external node for Node.JS project builder)

So instead, it might be desirable to integrate Prettier directly into Wild Web Developer, and have it run on format.

Prettier is configurable with a configuration file, which will give users nice options such as ignoring certain files when formatting, using single/double quotes, etc.

Prettier is already being used in Spectrum Theme as a project build action.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the proposed package.json and the format-on-save or automatic-build entry points; the issue does not name specific repository files or tests. Read Prettier's configuration and options documentation, then define how direct integration should run formatting and honor project configuration before implementing it.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.