fossar / selfoss

multipurpose rss reader, live stream, mashup, aggregation web application
https://selfoss.aditu.de
GNU General Public License v3.0
2.36k stars 343 forks source link

client: Use prettier for formatting #1493

Closed jtojnar closed 2 months ago

jtojnar commented 2 months ago

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

netlify[bot] commented 2 months ago

Deploy Preview for selfoss canceled.

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