microsoft / vscode-generator-code

Visual Studio Code extension generator
Other
1.3k stars 224 forks source link

Feature request: Add a trailing comma to generated tsconfig.json #500

Open akeeton opened 2 weeks ago

akeeton commented 2 weeks ago

It would be nice if the generated tsconfig.json had a trailing comma after the last uncommented compilerOptions setting so that the settings under /* Additional Checks */ can be quickly uncommented without further editing.

For example, after "strict": true in this:

{
    "compilerOptions": {
        "module": "Node16",
        "target": "ES2022",
        "outDir": "out",
        "lib": [
            "ES2022"
        ],
        "sourceMap": true,
        "rootDir": "src",
        "strict": true /* trailing comma */   /* enable all strict type-checking options */
        /* Additional Checks */
        // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
        // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
        // "noUnusedParameters": true,  /* Report errors on unused parameters. */
    }
}