4

I'm trying to get my VS code to always indent with tabs.

I use a .eslintrc.json file with the rule indent: ["warn", "tab"], this works for some files. I also have a .editorconfig file with indent_style = tabs. In my user settings, I have "editor.insertSpaces": false and "editor.tabSize": 4.

However, in .js files (and so far, only .js files), whenever I hit save, VS Code auto-converts my tabs to four spaces and messed up my linter.

This happens even if I set the .js file to indent with tabs on a per-file level. Does anyone know if this is a hidden setting, or is it perhaps a bug that I should report?

On OSX Sierra 10.12.1, VS Code 1.8.1.

1 Answers1

4

I was having this same issue and tracked it down to the "JS-CSS-HTML Formatter" extension. After disabling this extension, it fixed the issue for me. I would try disabling any extensions you have that do auto-formatting of javascript files.