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

Eslint thinks a tab is 4 spaces

When using ESLint in Microsoft Visual Studio Code, ESLint is deciding that my tab is four spaces. When I click ‘quick fix’ and ‘fix this indent problem’ it fixes it fine, but why is my tab key not inserting a tab ESLint recognizes? I have read this and turned off editor.insertSpaces but that does not seem to have fixed it. Any idea how to get ESLint to register my tabs? I would prefer not to disable the rule entirely, but I will if I have to.

Edit: it would seem that this problem only occurs in my index.js file.

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 :

In settings.json file, you should add this line:

"editor.tabSize": 2
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