Skip to content
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

client: Use prettier for formatting #1493

Merged
merged 1 commit into from
Jul 11, 2024
Merged

client: Use prettier for formatting #1493

merged 1 commit into from
Jul 11, 2024

Conversation

jtojnar
Copy link
Member

@jtojnar jtojnar commented Jul 11, 2024

I do not like the formatting very much but at least it is consistent and supports TypeScript. https://typescript-eslint.io/troubleshooting/formatting/

Also replace lint:js npm script in the client/ directory with check:js:lint and add check:js which runs that in addition to newly introduced check:js:prettify. This matches how the stylesheet scripts are structured.

Adding eslint-config-prettier disables stylistic rules that would fight with Prettier. Additionally, I had to remove some clashing from our ESLint config.

We are using eslint-config-prettier instead of eslint-plugin-prettier, the latter would run prettier as part of ESLint but we are already running it separately.

Cherry-picked from #1457

Copy link

netlify bot commented Jul 11, 2024

Deploy Preview for selfoss canceled.

Name Link
🔨 Latest commit 2cbecf9
🔍 Latest deploy log https://app.netlify.com/sites/selfoss/deploys/668f9b7bc16fe70008d62e34

I do not like the formatting very much but at least it is consistent and supports TypeScript.
https://typescript-eslint.io/troubleshooting/formatting/

Also replace `lint:js` npm script in the `client/` directory with `check:js:lint`
and add `check:js` which runs that in addition to newly introduced `check:js:prettify`.
This matches how the stylesheet scripts are structured.

Adding `eslint-config-prettier` disables stylistic rules that would fight with Prettier.
Additionally, I had to remove some clashing from our ESLint config.

We are using `eslint-config-prettier` instead of `eslint-plugin-prettier`,
the latter would run prettier as part of ESLint but we are already running it separately.
@jtojnar jtojnar merged commit 2cbecf9 into master Jul 11, 2024
14 checks passed
@jtojnar jtojnar deleted the prettier branch July 11, 2024 08:49
@jtojnar jtojnar added this to the 2.20 milestone Jul 11, 2024
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.

1 participant