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

Run the format script on project creation and add a .prettierrc file to JS templates #17100

Open
laoshaw opened this issue Apr 11, 2024 · 2 comments
Labels
area/project-creation Related to project creation process using the commands: `yarn create quasar` and `npm init quasar` flavour/quasar-cli-vite flavour/quasar-cli-webpack kind/feature 💡 Qv2 🔝 Quasar v2 issues

Comments

@laoshaw
Copy link

laoshaw commented Apr 11, 2024

What happened?

after created the initial quasar v2 project without typescript, there is not .prettierrc(which is fine, the default prettier config will be used), and run prettier against src/ will modify nearly all the code, so the initial code base is not prettier clean

What did you expect to happen?

initial code is prettier clean

Reproduction URL

https://codepen.io/rstoenescu/pen/xxEvBLRx

How to reproduce?

yarn create quasar (do not turn on typescript)
cd src
prettier -w (will modify most of the vue files)

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app-webpack | @quasar/app-vite)

Platforms/Browsers

Chrome

Quasar info output

Operating System - Linux(6.2.0-37-generic) - linux/x64
NodeJs - 20.12.0

Global packages
  NPM - 10.5.0
  yarn - 1.22.19
  @quasar/cli - 2.4.0
  @quasar/icongenie - Not installed
  cordova - Not installed

Important local packages
  quasar - 2.15.2 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
  @quasar/app-vite - 1.8.0 -- Quasar Framework App CLI with Vite
  @quasar/extras - 1.16.11 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 3.4.21 -- The progressive JavaScript framework for building modern web UI.
  vue-router - 4.3.0
  pinia - Not installed
  vuex - Not installed
  vite - 2.9.18 -- Native-ESM powered web dev build tool
  eslint - 8.57.0 -- An AST-based pattern checker for JavaScript.
  electron - Not installed
  electron-packager - Not installed
  electron-builder - Not installed
  register-service-worker - 1.7.2 -- Script for registering service worker, with hooks
  @capacitor/core - Not installed
  @capacitor/cli - Not installed
  @capacitor/android - Not installed
  @capacitor/ios - Not installed

Quasar App Extensions
  *None installed*

Networking
  Host - xps8300
  enp3s0 - 192.168.0.167
  wlp2s0b1 - 192.168.0.229

Relevant log output

none

Additional context

none

@laoshaw laoshaw added kind/bug 🐞 Qv2 🔝 Quasar v2 issues labels Apr 11, 2024
@github-actions github-actions bot added area/cli bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite labels Apr 11, 2024
@yusufkandemir
Copy link
Member

  • add .prettierrc to JS templates, just like with TS
  • run the format script if install deps is chosen during installation, just like we are running lint --fix

@yusufkandemir yusufkandemir added kind/feature 💡 flavour/quasar-cli-webpack area/project-creation Related to project creation process using the commands: `yarn create quasar` and `npm init quasar` and removed kind/bug 🐞 bug/1-repro-available A reproduction is available and needs to be confirmed. area/cli labels Apr 11, 2024
@yusufkandemir yusufkandemir changed the title when javascript is chosen, the initial code is not prettier clean Run the format script on project creation and add a .prettierrc file to JS templates Apr 11, 2024
@laoshaw
Copy link
Author

laoshaw commented Apr 11, 2024

ok, I switched to TS now which has .prettierrc, though I use no .prettierrc typically(quasar wants single quote via both .prettierrc and .eslintrc.cjs' so I will just follow that). thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/project-creation Related to project creation process using the commands: `yarn create quasar` and `npm init quasar` flavour/quasar-cli-vite flavour/quasar-cli-webpack kind/feature 💡 Qv2 🔝 Quasar v2 issues
Projects
None yet
Development

No branches or pull requests

2 participants