Skip to content

tsconfig.json actually supports trailing commas #12

@DecimalTurn

Description

@DecimalTurn

The draft spec was recently edited to include reasons why trailing commas should not be supported. A major reason that was mentioned multiple times in issues/discussion in the VS Code repo is that tsconfig.json doesn't support trailing commas.

However, this last statement is incorrect. tsconfig.json files do support trailing commas according to the schema on schemastore.

Note

Because VS Code automatically uses the tsconfig schema for tsconfig.json file, it won't show a warning for tsconfig.json files with trailing commas.

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "$comment": "Note that this schema uses 'null' in various places. The value of 'null' is UNDOCUMENTED (https://github.com/microsoft/TypeScript/pull/18058)",
  "allowTrailingCommas": true,
  "allOf": [
	...

Hence, considering the following... :

Image

... we should should consider removing the mention that tsconfig.json doesn't support trailing commas.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions