Skip to content

--watch causes --skipLibCheck to be ignored #924

Open
@nf-wbeck

Description

@nf-wbeck

For a project with the skipLibCheck compilerOption set to false:

npx tsgo --project tsconfig.json

Correctly emits errors inside node_modules and project type declaration files.

npx tsgo --project tsconfig.json --skipLibCheck

Correctly omits errors inside node_modules and project type declaration files.

npx tsgo --project tsconfig.json --skipLibCheck --watch

Incorrectly emits errors inside node_modules and project type declaration files.

Updating the project configuration with skipLibCheck set to true and omitting the CLI --skipLibCheck flag will allow --watch to behave correctly.

tsconfig.common.json

{
    "compilerOptions": {
        "allowJs": false,
        "alwaysStrict": true,
        "baseUrl": "./",
        "rootDir": "./src",
        "forceConsistentCasingInFileNames": true,
        "incremental": true,
        "lib": ["ES2023"],
        "module": "nodenext",
        "moduleResolution": "nodenext",
        "noFallthroughCasesInSwitch": true,
        "noImplicitAny": true,
        "noImplicitReturns": true,
        "noUnusedLocals": true,
        "noUnusedParameters": true,
        "outDir": "./dist",
        "resolveJsonModule": true,
        "sourceMap": true,
        "strict": true,
        "strictBindCallApply": true,
        "strictFunctionTypes": true,
        "strictNullChecks": true,
        "target": "ES2022",
        "typeRoots": ["./types", "./node_modules/@types"]
    }
}

tsconfig.json

{
    "extends": "./tsconfig.common.json",
    "emit": "noEmit",
    "compilerOptions": {
        "skipLibCheck": false,
        "tsBuildInfoFile": "./build/.tsbuildInfo"
    },
    "include": ["./src/**/*.ts", "./types/**/*.d.ts"]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Domain: CLIRelated to the tsc CLI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions