TypeStrong / grunt-ts

A grunt task to manage your complete typescript development to production workflow
https://www.npmjs.com/package/grunt-ts
MIT License
330 stars 121 forks source link

alwaysStrict not read from tsconfig.json #432

Open aciccarello opened 5 years ago

aciccarello commented 5 years ago

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 
nycdotnet commented 5 years ago

Thank you for the report. Will add this to the bug list. I am sorry but I do not have an ETA on a fix as I don't have much time for maintaining this library anymore as I don't use it. PRs definitely accepted.