this seems to be a less relevant problem, but I spent already 3 hours trying to figure this out and nothing.
Then basic setup: I have a project in node / javascript and I’m currently trying to use TypeScript in order to output a cleaner production code. So tsconfig.json looks like this:
{
"compilerOptions": {
"target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', 'ES2021', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
"lib": [
"DOM",
"es6",
"DOM.Iterable",
"ScriptHost"
], //default /* Specify library files to be included in the compilation. */
"sourceMap": true, /* Generates corresponding '.map' file. */
"removeComments": true, /* Do not emit comments to output. */
"strict": true, /* Enable all strict type-checking options. */
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
"skipLibCheck": true, /* Skip type checking of declaration files. */
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
},
"files": [
"app_js/functions-syncsystem.ts"
]
}
And my prettier .prettierrc file looks like so:
{
"singleQuote": true,
"tabWidth": 2
}
On top of that, I’ve changed all configuration for tab spaces in the visual studio code to 2 spaces (user and workspace), besides unchecking “Detect Indentation”.
The problem: On my editor, everything works fine with the 2 spaces tab. But when I run tsc on the terminal, the output file has tab sizes of 4 and I can’t seem to change anywhere.
I’ve also tried many suggestions on this post: How to change indentation in Visual Studio Code?
Like this one too: https://stackoverflow.com/a/68082579/2510785
After each modification, I made sure I closed the editor and opened again and generated a another compiled file to be sure. Can anyone think of any other possibility that could fix this issue? The only thing I can think of is that it could be a specific problem in my OS / VS Code Instalation.
Thanks, Jorge Mauricio