Skip to content

alwaysStrict not read from tsconfig.json #432

@aciccarello

Description

@aciccarello

Problem

When the following compiler options are set in a tsconfig.json grunt-ts fails to read the "alwaysStrict": false option from the tsconfig.json file.

  "strict": true,
  "noImplicitUseStrict": true,
  "alwaysStrict": false

This results in the following error

Using tsc v3.4.5
error TS5053: Option 'noImplicitUseStrict' cannot be specified with option 'alwaysStrict'

Workaround

This can be worked around by adding the additional flag.

        ts: {
            default: {
                tsconfig: './tsconfig.json',
                options: {
                    additionalFlags: '--alwaysStrict false'
                }
            }
        },

This was confusing as a user because the other options were read but alwaysStrict was not. It was only after I realized that tsc would compile that I realize it was a grunt config issue.

Environment

> npm -v
6.9.0
> node -v
v10.11.0
> npm ls grunt-ts grunt-cli grunt typescript
baseDir
├─┬ grunt@1.0.3 
│ └── grunt-cli@1.2.0 
├── grunt-cli@1.3.2 
├── grunt-ts@6.0.0-beta.22
└── typescript@3.4.5 

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions