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

133
Views
Impedir funciones de flecha de formato más bonitas en varias líneas

Cuando escribo funciones de flecha en Vue.js usando vscode, obtengo un formato inesperado.

Deseo cambiar la configuración de Prettier al formatear automáticamente las funciones de flecha en vscode.

Esperado:

 <input type="file" @change="(event) => { files = event.target.files; }" accept=".csv" />

Aceptable:

 <input type="file" @change="(event) => {files = event.target.files;}" accept=".csv" />

Actual:

 <input type="file" @change=" (event) => { files = event.target.files; } " accept=".csv" />
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Investigué un poco y descubrí que esta característica ya se solicitó: https://github.com/prettier/prettier/issues/4125

Se realizaron cambios a Prettier ( https://github.com/prettier/prettier/pull/6685 ) y se lanzaron en Prettier 2.0 en 2020. ( https://prettier.io/blog/2020/03/21/2.0. 0.html#método mejorado-de-rompimiento-de-cadena-heurístico-6685httpsgithubcomprettierprettierpull6685-by-mmkalhttpsgithubcommmkal )

Pero mirando el ejemplo que proporcionó, aparentemente todavía no funciona muy bien: /

Si hubiera alguna opción en Prettier para configurar este comportamiento, habría estado aquí: https://prettier.io/docs/en/options.html Pero no he encontrado nada que ayude a su caso.

Me parece que lo único que puedes hacer ahora mismo es usar

 <!-- prettier-ignore -->

..antes de su línea. Puede leer más sobre ignorar más bonito en html aquí: https://prettier.io/docs/en/ignore.html#html

about 4 years ago · Juan Pablo Isaza 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!