Skip to content

chore(webui): adding prettier - #1916

Merged
netomi merged 7 commits into
eclipse-openvsx:mainfrom
gnugomez:gnugomez/main/prettier
Jun 25, 2026
Merged

chore(webui): adding prettier#1916
netomi merged 7 commits into
eclipse-openvsx:mainfrom
gnugomez:gnugomez/main/prettier

Conversation

@gnugomez

Copy link
Copy Markdown
Member

The problem we're facing right now is that despite we do have some stylistic rules we were not enforcing a full config, meaning that we did not had much formatting rules working, those were really minimal and don't provide help most of the time to keep code formatting consistent.

I tailored a prettier config to reduce how many changes will it produce, although 169 files will be affected.

I'm replacing @stylistic/eslint-plugin with prettier since it's provides a wider more opinionated formatting.

To keep things consistent to how we were working up to now I made prettier work through eslint, this way we will only run prettier once per file.

@gnugomez
gnugomez requested review from amvanbaren and netomi June 16, 2026 13:55
@gnugomez

Copy link
Copy Markdown
Member Author

@amvanbaren I know you added https://eslint.style/ not too long ago to the project, although not many formatting was happening, was this intended?

I'm creating this PR because while working on some patches it got really painful to get things formatted. Things like JSX was not really being formatted. Overall it felt quite inconsistent.

Comment thread webui/eslint.config.mjs
@netomi
netomi force-pushed the gnugomez/main/prettier branch from d67ad45 to 4b149f8 Compare June 24, 2026 18:48
@netomi
netomi force-pushed the gnugomez/main/prettier branch from 4b149f8 to 984ba14 Compare June 24, 2026 18:53
@netomi

netomi commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

I did the following changes:

  • set line width to 120
  • bracketSameLine: true
  • add a pre-commit hook to run yarn lint
  • add an analyse job in the main.yml workflow to run the pre-commit hooks
  • apply yarn lint --fix

@netomi

netomi commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

works really well in my IDE (WebStorm). eslint is automatically detected and when I save a file it applies --fix on it and reformats it.

netomi
netomi previously approved these changes Jun 24, 2026
@netomi
netomi merged commit d5b27b5 into eclipse-openvsx:main Jun 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants