Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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."
    },
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading