Skip to content

Can't disable typescriptMismatch warning #7678

Description

@xnnkmd

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request

When want to disable the typescriptMismatch warning on a project-basis so it only affects a particular project and the warning is automatically disabled for other developers. Hence, I want to disable it from within the angular-cli config file.

Versions.

@angular/cli: 1.4.1
node: 7.7.1
os: win32 x64
@angular/common: 4.3.6
@angular/compiler: 4.3.6
@angular/core: 4.3.6
@angular/forms: 4.3.6
@angular/http: 4.3.6
@angular/platform-browser: 4.3.6
@angular/platform-browser-dynamic: 4.3.6
@angular/router: 4.3.6
@angular/cli: 1.4.1
@angular/compiler-cli: 4.3.6
typescript: 2.5.2

Repro steps.

Setup angular project to use latest typescript.

Add this to .angular-cli.json:

    "warnings": {
        "typescriptMismatch": false
    }

run "ng build"

The output given by the failure.

@angular/compiler-cli@4.3.6 requires typescript@'>=2.1.0 <2.4.0' but 2.5.2 was found instead.
Using this version can result in undefined behaviour and difficult to debug problems.

Please run the following command to install a compatible version of TypeScript.

npm install typescript@'>=2.1.0 <2.4.0'

To disable this warning run "ng set --global warnings.typescriptMismatch=false".

Desired functionality.

When I disable the typescriptMismatch warning in .angular-cli.json I expect the warning to disappear when running ng build.

Mention any other details that might be useful.

It might be possible to disable the warning instead by setting a global flag but I want something that only affects a single project yet is shared with other developers automatically. Setting a global flag won't do that.

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentfeatureLabel used to distinguish feature request from other issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions