Skip to content

parse error for trailing comma in tsconfig.json #30

@dominikg

Description

@dominikg

According to this issue on typescript repo, trailing commas in tsconfig are legal (like comments)
microsoft/TypeScript#20384 (comment)

Example:

{
  "extends": "@tsconfig/svelte/tsconfig.json",
  "include": ["src/**/*"],
  "exclude": ["node_modules"], // <- here
}

Comments are stripped here, but the comma is not, resulting in an error.

export function parse (contents: string, filename: string) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions