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

436
Views
How to shorten a long line of code? Error ESlint

I really need help. Installed ESlint and got the error "This line has a length of 262. Maximum allowed is 120 max-len". How can I shorten this line? When I just translate with Enter, the code just doesn't work.

     {
    actualTask: 'Актуальне питання? ',
    answer: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem 
    Ipsum has been the industry's standard dummy text ever since the 1500s, when anunknown 
    printer took a galley of type and scrambled it to make a type specimen book."
    },

enter image description here

about 4 years ago · Santiago Gelvez
3 answers
Answer question

0

Just concatenate different parts of the string:

     {
    actualTask: 'Актуальне питання? ',
    answer: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem " +
    "Ipsum has been the industry's standard dummy text ever since the 1500s, when anunknown " +
    "printer took a galley of type and scrambled it to make a type specimen book."
    },
about 4 years ago · Santiago Gelvez Report

0

Did you try using like this

 {
    actualTask: 'Актуальне питання? ',
    answer: `Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem 
    Ipsum has been the industry's standard dummy text ever since the 1500s, when anunknown 
    printer took a galley of type and scrambled it to make a type specimen book.`
  }
about 4 years ago · Santiago Gelvez Report

0

You can use JavaScript Template Literals/Template Strings for this purpose.

about 4 years ago · Santiago Gelvez 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!