Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

169
Views
Más bonito - nueva línea entre función y comentario

Me gustaría saber si hay una regla para agregar una nueva línea entre función/declaración y comentario en mecanografiado con más bonito (.prettierrc en la raíz del proyecto).

Comportamiento actual:

 } else if (request.type === 'membership-fee') { /** * If type is membership fee */ this.form.get('total')?.setValue(this.gym?.membership_fee?.total); } else { /** * Operation type not recognized */ this.toast.error('Tipo di operazione non riconosciuto'); ($('#editSaleModal') as any).modal('hide'); }

Comportamiento deseado:

 } else if (request.type === 'membership-fee') { /** * If type is membership fee */ this.form.get('total')?.setValue(this.gym?.membership_fee?.total); } else { /** * Operation type not recognized */ this.toast.error('Tipo di operazione non riconosciuto'); ($('#editSaleModal') as any).modal('hide'); }

Mi .prettierc actual:

 { "useTabs": true, "tabWidth": 4, "printWidth": 120 }
over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

No, más bonito no tiene esa regla.

Prettier tiene una lista escasa de opciones por diseño , y esta no es una de ellas.

over 4 years ago · Santiago Trujillo Report

0

Pero puedes lograr este comportamiento con ESLint:

ingrese la descripción de la imagen aquí

Y solucione automáticamente este problema, por ejemplo, al guardar en VSCode:

ingrese la descripción de la imagen aquí

Consulta esta regla para ESLinter. líneas-alrededor-de-comentario

ESLinter le brinda toneladas de beneficios.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!