Skip to content

'tsc --init' shouldn't generate an "exclude" field if files are present #7126

@DanielRosenwasser

Description

@DanielRosenwasser
tsc --init foo.ts

Right now, we'll generate the following:

{                              
    "compilerOptions": {       
        "module": "commonjs",  
        "target": "es5",       
        "noImplicitAny": false,
        "sourceMap": false     
    },                         
    "exclude": [               
        "node_modules"         
    ],                         
    "files": [                 
        "foo.ts"     
    ]                          
}                              

which violates the schema that we've specified. If files are present as arguments, we shouldn't emit the "exclude" field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptFixedA PR has been merged for this issueHelp WantedYou can do this

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions