dominikg / tsconfck

A utility to find and parse tsconfig files without depending on typescript
Other
293 stars 14 forks source link

use consistent casing/capitalization for options #100

Closed duanwilliam closed 1 year ago

duanwilliam commented 1 year ago

Describe the feature TSConfckFindOptions has a key tsConfigPaths. However, everywhere else in the file "tsconfig" is written as, well, tsconfig, where the "c" is lowercased. As such, the key should be renamed to tsconfigPaths.

A Usecase mostly just naming consistency

Alternatives the usage of "tsconfig" could alternatively be written out as they are in TSConfckFindOptions, i.e. always capitalizing the "c". However, since there's instances of it written in lowercase in other parts of the public API either way, it'd still be a breaking change.

I personally think keeping it lowercased makes more sense, since "tsconfig" is a "single unit" or idea, but others may disagree.

Additional context It might not be the most convenient because this issue is in the public API and as such adjusting it would be a breaking change for a fairly trivial/minor issue.

dominikg commented 1 year ago

There will be a major release soonish, so if you want to send a PR for this, it could be included then.

The alternative would be to accept both in 3.0, deprecate the camelCased one and remove it in 4, but this is a fairly simple change to do for users and it makes sense to be consistent.

dominikg commented 1 year ago

added in version-3 branch https://github.com/dominikg/tsconfck/tree/version-3