![]() |
VOOZH | about |
Sr Technical Content Strategist and Team Lead
Thanks for learning with the DigitalOcean Community. Check out our offerings for compute, storage, networking, and managed databases.
I help Businesses scale with AI x SEO x (authentic) Content that revives traffic and keeps leads flowing | 3,000,000+ Average monthly readers on Medium | Sr Technical Writer(Team Lead) @ DigitalOcean | Ex-Cloud Consultant @ AMEX | Ex-Site Reliability Engineer(DevOps)@Nutanix
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Thanks for this simple, effective introduction to ESLint, especially the section on configuring autofix in VS Code - ESLintโs endless tab warnings were driving me round the twist.
Thank you for this, really helps me. Been searching around and this one is the best.
Formatting on save works for some eslint rules (indent, comma-dangle, quotes, semi) BUT doesnโt seem to work for other (max-len for example). Having the following rules in .eslintrc:
"rules": {
"indent": [
"error",
2
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"comma-dangle": [
"error",
"never"
],
"max-len": [
"error",
{
"code": 90
}
]
}
When I save the file, it does change all double quotes to single quotes, sets proper indentation, adds semi-colons and removes trailing commas, all good. BUT if I have a code line that exceeds the max-length of 90, it does not break that line (although it is underlined and it shows the linting error). And itโs not a line of one long string, itโs simply this:
const someArray = ['asdasd', 'asdasdfgdswgsgs', 'asduhasjkdhkasudhku', 'akhjsdggasfygasfykgas', 'hgashdg', ['a', 'b', 'c']];
It does not format that :(
Everyone whoโs looking for eslint not working on save file.
eslint working with cli and not with save, make sure that this is added. "editor.formatOnSave": true
Everyone whoโs here saying eslint working with cli and not with save, make sure that this is added. "editor.formatOnSave": true
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.