stackblitz / starters

StackBlitz Starter Project
MIT License
37 stars 16 forks source link

Prettify all the things #16

Closed fvsch closed 1 year ago

fvsch commented 1 year ago

This is a follow-up to #11.

In that PR, I wanted to be conservative, so I only formatted a few templates (mostly EngineBlock projects), and ignored the rest.

Changes in this PR:

  1. I changed the Prettier files pattern in package.json to more explicitly list file types to prettify. I wanted to handle this in .prettierignore initially, but ignoring all the LICENSE and favicon.ico and other patterns was tiresome.
  2. Removed the quasar/.prettierrc file (only .prettierrc in our templates), which was breaking our Prettier config (it overrides it, which means some of our custom rules and parser/plugin definitions don't apply anymore). If we really need to have .prettierrc config files in templates in the future, we'll have to overhaul the way we format everything (probably using a custom Node script that uses the Prettier API and resolves configs).
  3. Removed the bootstrap-5/dist folder. It looked strange to have Webpack output committed, and formatted. Will have to test that it's not breaking this template though! Edit: it does work without it.
  4. Prettify all the templates.
  5. Prettify Vue and Svelte components. Prettier has built-in support for Vue, and we use a plugin for Svelte.